Facebook Page Trigger icon

Facebook Page Trigger

Triggers on Facebook Page events (posts, comments, messages)

Facebook Page Trigger

AI-generated

Overview

This node triggers workflows based on events occurring on a specified Facebook Page. It supports monitoring new posts, new comments on posts, new messages received by the page, and mentions of the page in posts or comments. Users can choose between real-time event detection using Facebook webhooks or periodic polling to check for new events. This node is useful for automating responses, notifications, or data processing related to Facebook Page interactions.

Use Case Examples

  1. Automatically respond to new comments on your Facebook Page posts.
  2. Trigger a workflow when your page receives a new message to provide customer support.
  3. Monitor new posts on your page to analyze engagement or content performance.
  4. Detect when your page is mentioned in posts or comments to track brand mentions.

Properties

Name Meaning
Page Select the Facebook Page to monitor for events.
Trigger On Specify which type of event should trigger the workflow: new post, new comment, new message, or page mention.
Trigger Method Choose how to detect new events: via real-time Facebook webhooks or by polling at intervals.
Polling Interval How often to check for new events when using polling (in seconds).
Webhook URL The URL to configure in the Facebook App for webhook subscriptions (displayed after saving the workflow).
Webhook Verify Token Verification token used to validate the Facebook webhook subscription.
Setup Instructions Step-by-step instructions to configure the Facebook webhook in the Facebook Developers Console.

Output

JSON

  • type - Type of event triggered (e.g., new_post, new_comment, new_message, page_mention, postback).
  • postId - ID of the Facebook post related to the event (if applicable).
  • commentId - ID of the comment related to the event (if applicable).
  • messageId - ID of the message related to the event (if applicable).
  • text - Text content of the message or comment (if applicable).
  • createdTime - Timestamp when the event occurred.
  • from - Information about the user who created the post, comment, or message.
  • pageId - ID of the Facebook Page where the event occurred.
  • timestamp - Timestamp of the event entry.
  • rawEvent - Raw event data received from Facebook for detailed inspection.
  • payload - Payload of a postback event (if applicable).
  • title - Title of a postback event (if applicable).
  • senderId - ID of the sender in messaging events.
  • recipientId - ID of the recipient in messaging events.
  • conversationId - ID of the conversation in messaging events.

Dependencies

  • Facebook OAuth2 API credentials

Troubleshooting

  • Ensure the Facebook OAuth2 API credentials are correctly configured and have the necessary permissions to access the Facebook Page data.
  • If using webhooks, verify that the webhook URL and verify token are correctly set in the Facebook Developers Console and match the node configuration.
  • Common error: 'No access token found' - reconnect the Facebook account to refresh the token.
  • If no events are triggering, check that the selected Facebook Page matches the page ID in the webhook events or polling requests.
  • For polling, ensure the polling interval is set appropriately to avoid missing events or excessive API calls.

Links

Discussion