Actions72
- Pages Actions
- Posts Actions
- Groups Actions
- Events Actions
- Insights Actions
- Marketing/Ads Actions
- Videos Actions
- Messaging Actions
- Shop/Catalog Actions
- Lead Ads Actions
- Webhooks Actions
Webhooks → Create App Webhook
AI-generatedOverview
This node operation "Create App Webhook" under the "Webhooks" resource allows users to create a webhook subscription for a Facebook App. It registers a callback URL with Facebook to receive real-time updates about specified fields (such as feed, messages, lead generation, page changes, or Instagram comments) related to the app.
Common scenarios where this node is beneficial include:
- Automatically receiving notifications when new posts or comments are made on a Facebook Page or Instagram account.
- Tracking lead generation events in real time.
- Monitoring changes to a Facebook Page or Instagram content without polling the API repeatedly.
Practical example:
- A marketing automation workflow that triggers whenever a new lead form is submitted on Facebook by subscribing to the "leadgen" webhook field.
- An application that updates its database or UI instantly when a new message arrives on a Facebook Page by subscribing to the "messages" webhook field.
Properties
| Name | Meaning |
|---|---|
| App ID | The Facebook App ID for which the webhook will be created. |
| Callback URL | The URL where Facebook will send webhook event notifications. |
| Verify Token | A token used by Facebook to verify the webhook subscription during setup. |
| Webhook Fields | The specific Facebook data fields to subscribe to for webhook events. Options: Feed, Messages, Leadgen, Page Changes, Instagram Comments |
Output
The node outputs JSON data representing the response from the Facebook API after creating the webhook subscription. This typically includes confirmation details of the webhook creation such as subscription status and subscribed fields.
No binary data output is indicated for this operation.
Example output JSON structure might look like:
{
"success": true,
"object": "page",
"callback_url": "https://your-callback-url.com/webhook",
"fields": ["feed", "messages"],
"verify_token": "yourVerifyToken"
}
Dependencies
- Requires a valid Facebook App ID.
- Needs an API key credential for the external N8N Tools API service to validate subscription and usage.
- Requires proper Facebook API credentials configured in n8n (OAuth2 or API key).
- The node uses an internal helper class to interact with the Facebook Graph API.
Troubleshooting
- Invalid subscription or API key error: If the node throws an error indicating invalid subscription or API key, verify that the API key credential for the external validation service is correct and active.
- Webhook verification failure: Ensure the callback URL is publicly accessible and correctly responds to Facebook's verification requests using the provided verify token.
- Permission errors: The Facebook App must have the necessary permissions to manage webhooks; check app settings and Facebook developer console.
- Incorrect webhook fields: Selecting unsupported or misspelled webhook fields may cause failures; use only the listed options.