Reference · Tools

Facebook Graph API

Make arbitrary requests to the Facebook Graph API with support for binary file uploads (photos, videos).

Action (binary) Marketing v1 Binary data

The Facebook Graph API node makes authenticated requests to any node and edge in the Graph API — GET, POST, or DELETE — including multipart uploads for photos and videos. Use it to publish images to a Facebook Page, read post engagement data, or delete content programmatically. A typical build might pull page posts on a schedule and route them into a spreadsheet, or accept an uploaded image from a form and push it straight to a Page's photo album.

Node type
Action (binary)
Parameters
10
Outputs
Output, Error
Credentials
Facebook Graph API

Facebook Graph API

Make requests to the Facebook Graph API with binary upload support

Overview

A general-purpose client for the Facebook Graph API. Point it at any node and edge — me, a page ID, a post ID, photos, feed, videos — choose GET, POST or DELETE, and the node makes the call and returns the response. POST requests can upload a file held on the item as multipart form-data, which is how photos and videos are published. Authentication uses the access token from your credential, the Graph API version is selectable, and both graph.facebook.com and the graph-video.facebook.com upload host are available. Extra query parameters are supplied as a JSON object, and GET requests can name the fields they want back.

Category: Marketing
Tool Name: facebook
Version: 1

Appearance: Icon: si-facebook | Color: #1877F2

Node Type

Action (Binary) — handles file/binary data operations

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Facebook Graph API credentials. See the Credentials Guide for setup instructions.

Parameters

ParameterTypeRequiredDefaultDescription
Host URLoptionsNograph.facebook.comThe Host URL of the request. Use graph-video.facebook.com for video uploads.
Options: graph.facebook.com (Default), graph-video.facebook.com (Video Uploads)
HTTP Request MethodoptionsNoGETThe HTTP method to use for the request.
Options: GET, POST, DELETE
Graph API VersionoptionsNov23.0The version of the Graph API to use. Leave as Default to use Facebook’s current default version.
Options: "" (Default — empty value, no version segment in the URL), v23.0, v22.0, v21.0, v20.0, v19.0, v18.0, v17.0, v16.0, v15.0, v14.0, v13.0
NodestringYesThe Graph API node ID to operate on (e.g. “me”, a page ID, a user ID, a post ID). Supports expressions like {{ $json.pageId }}.
EdgestringNoEdge of the node to operate on (e.g. “photos”, “videos”, “feed”, “posts”). Leave empty to operate on the node itself.
Send Binary DatabooleanNofalseWhether to upload binary data as multipart form-data. Only applicable for POST requests. (shown when HTTP Request Method is POST)
Binary PropertystringNodataName of the binary property containing the file to upload. Use format “sendKey:binaryProperty” to set a custom form field name (default form field is “file”). For example, “source:data” sends the “data” binary property with form field name “source”. Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use. (shown when Send Binary Data is true)
FieldsstringNoComma-separated list of fields to request from the Graph API (e.g. “id,name,message,created_time”). Only used for GET requests. (shown when HTTP Request Method is GET)
Query ParametersjsonNo{}Additional query parameters as a JSON object. These are merged with the access_token and fields parameters.
Max ConcurrencynumberNo10Maximum number of items to process concurrently.

Output Data

One output item per input item — this node never fans out, even when the Graph API returns a paged collection. The response is merged onto the input item JSON, so the fields Facebook returns sit alongside the fields already on the item and upstream data survives. Binary on the input item is forwarded unchanged, and the node does not create binary of its own.

  • A JSON object response (the normal case) is spread across the item. A collection endpoint returns Facebook’s own envelope, so you get data (the array of records) and paging on the item — use a Split Out node on data to fan out, and read the next cursor from paging to page through.
  • A non-object response is placed on response instead of being spread.
  • A successful DELETE returns Facebook’s confirmation object, typically carrying success.
  • A successful POST upload returns the created object’s identifiers — for a photo or video that is its id, plus a post_id where Facebook supplies one.

Reference the result downstream by expression, e.g. {{ $json.id }} or {{ $json.data }}.

Usage Examples

  • Post a photo to a Facebook page
  • Upload a video to Facebook
  • Get a page feed with specific fields
  • Publish a post to a page
  • Delete a Facebook post
  • Get user profile information

Example Configuration

Read your own profile with a chosen set of fields:

{
  "type": "facebook",
  "parameters": {
    "httpRequestMethod": "GET",
    "node": "me",
    "fields": "id,name,email,picture"
  }
}

Fetch a page’s posts, filtered and paged through Query Parameters:

{
  "type": "facebook",
  "parameters": {
    "httpRequestMethod": "GET",
    "node": "{{ $json.pageId }}",
    "edge": "posts",
    "fields": "id,message,created_time",
    "queryParameters": "{\"limit\": 50, \"since\": \"2026-01-01\"}"
  }
}

Publish a photo held on the item’s imageData binary property, sent as the source form field:

{
  "type": "facebook",
  "parameters": {
    "httpRequestMethod": "POST",
    "node": "{{ $json.pageId }}",
    "edge": "photos",
    "sendBinaryData": true,
    "binaryPropertyName": "source:imageData",
    "queryParameters": "{\"message\": \"{{ $json.caption }}\", \"published\": true}"
  }
}

Upload a video — note the video host:

{
  "type": "facebook",
  "parameters": {
    "hostUrl": "graph-video.facebook.com",
    "httpRequestMethod": "POST",
    "node": "{{ $json.pageId }}",
    "edge": "videos",
    "sendBinaryData": true,
    "binaryPropertyName": "file:videoData",
    "queryParameters": "{\"title\": \"{{ $json.title }}\"}"
  }
}

Delete a post by ID:

{
  "type": "facebook",
  "parameters": {
    "httpRequestMethod": "DELETE",
    "node": "{{ $json.postId }}"
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Make GET/POST/DELETE requests to the Facebook Graph API, with optional binary file uploads for photos and videos.

Notes

  • Node and Edge together form the path. node is the object you are addressing and edge is its sub-collection: node me with no edge reads your profile; node <pageId> with edge photos publishes to that page’s photos.
  • Videos need the video host. Set Host URL to graph-video.facebook.com for uploads to the videos edge; ordinary calls stay on graph.facebook.com.
  • Binary Property takes an optional form-field prefix. Plain data sends that binary property under the form field file; source:data sends the same property under the form field source, which is what the photos edge expects. The binary property name is case-sensitive and must match what the upstream node produced, or the item fails before the request is made.
  • Fields only applies to GET. On POST and DELETE it is ignored — put anything the write needs into Query Parameters.
  • Query Parameters is merged into the query string alongside the access token and fields. Invalid JSON is skipped rather than failing the item, so a call that silently ignores your filters is worth checking for a typo.
  • Permissions come from the token, not this node. A Graph call that fails with a permissions error needs the scope added to the access token in your credential.
  • Paged collections are not split for you. The item receives Facebook’s data and paging envelope; add a Split Out node when you want one workflow item per record.

Frequently asked questions

How do I publish a photo to a Facebook Page?

Set the node to POST, use the page ID as the Node and `photos` as the Edge, and point the Binary Property field at the binary data from an upstream node. Use the prefix `source:data` rather than plain `data` — the `photos` edge expects the file under the form field `source`, and omitting the prefix will cause the upload to fail silently or error. Any caption or additional parameters go into Query Parameters as a JSON object.

Why do video uploads need a different host URL?

Facebook routes large media uploads through a separate endpoint. When posting to the `videos` edge, change the Host URL parameter from `graph.facebook.com` to `graph-video.facebook.com`. Leaving it on the default host will likely return an error or a malformed response. All non-video calls stay on the standard host.

My Query Parameters object is being ignored — what's wrong?

The node skips invalid JSON in the Query Parameters field rather than failing the item, so a syntax error (a trailing comma, an unquoted key) will cause your parameters to be silently dropped and the call will proceed without them. Double-check your JSON is valid if filters or fields you specified aren't appearing in results.

How do I get more than the default fields back from a GET request?

Use the Fields parameter to name the specific fields you want, such as `id,name,fan_count`. Fields is only applied on GET requests — on POST and DELETE it is ignored entirely, so anything a write operation needs must go into Query Parameters instead.

The node returns a `paging` envelope instead of individual records — how do I process each item separately?

The node returns Facebook's raw response, which for collections includes a `data` array and a `paging` object for cursor-based navigation. It does not split paged results into individual workflow items automatically. Add a Split Out node after this one to turn the `data` array into one item per record, and handle `paging.next` with a loop if you need to traverse multiple pages.

Build with the Facebook Graph API node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Facebook Graph API credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.