Facebook, Instagram & Threads icon

Facebook, Instagram & Threads

Create and publish content to Facebook, Instagram, and Threads

Overview

This node enables users to create and publish photo posts on Facebook, specifically targeting Facebook Pages, Groups, or User Profiles. It leverages the Facebook Graph API to upload a photo from a provided URL along with an optional caption. This functionality is useful for automating social media content publishing workflows, such as scheduling marketing images, sharing event photos, or posting updates directly from other systems.

Practical examples:

  • Automatically post promotional images to a Facebook Page after a new product launch.
  • Share event photos to a Facebook Group dedicated to community members.
  • Post personal photos to a user profile (where available) as part of a personal automation workflow.

Properties

Name Meaning
Target Type Select where to publish the content. Options: "Page" (post to a Facebook Page), "Group" (post to a Facebook Group), "User Profile" (post to user profile; limited availability).
Target ID The unique identifier of the Facebook Page, Group, or User Profile where the photo will be posted. Required.
Photo URL The URL of the photo to upload and post. Required.
Caption Optional text caption to accompany the photo in the post.

Output

The node outputs JSON data representing the response from the Facebook Graph API after creating the photo post. This typically includes identifiers and metadata about the created post or photo object.

If an error occurs during the API request, the output JSON will contain error details including error code, type, message, and trace ID, allowing for troubleshooting.

The node does not output binary data.

Dependencies

  • Requires an API authentication token credential configured in n8n that grants access to the Facebook Graph API.
  • Uses the Facebook Graph API v23.0 endpoint (https://graph.facebook.com/v23.0).
  • The authenticated user or app must have appropriate permissions to post photos to the specified target (Page, Group, or User Profile).

Troubleshooting

  • Common issues:

    • Invalid or missing Target ID: Ensure the ID corresponds to a valid Facebook Page, Group, or User Profile accessible by the authenticated account.
    • Insufficient permissions: The API token must have rights to post on the selected target.
    • Invalid photo URL: The URL must be publicly accessible and point directly to an image file.
    • Limited availability for posting to User Profiles: Facebook restricts posting to user profiles via API in many cases.
  • Error messages:

    • Errors returned from the Facebook API include detailed messages and codes. For example:
      • "OAuthException" indicating authentication or permission problems.
      • "Invalid parameter" if required fields are missing or malformed.
    • To resolve errors, verify credentials, permissions, and input parameters.
    • If the node is set to continue on fail, error details will be included in the output JSON for each failed item.

Links and References

Discussion