Facebook token retrieval & management
Ready for 3.0What this workflow does
This workflow has 8 nodes and runs when an HTTP GET request hits its webhook URL. It uses only n8n's built-in nodes. It also calls graph.facebook.com over HTTP.
How it runs
Trigger: When an HTTP GET request hits its webhook URL.
- Config (Edit Fields (Set)): sets 3 fields: fb_redirect_uri, app_id, app_secret
- If: checks a condition and branches into true / false
- Short-Lived Token (HTTP Request): calls graph.facebook.com
- Redirect URL (Code): runs custom JavaScript code
- Long-Lived Token (HTTP Request): calls graph.facebook.com
- Redirect (Respond to Webhook): sends the response back to the webhook caller
- Token (Respond to Webhook): sends the response back to the webhook caller
HTTP calls to: graph.facebook.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (6)
- Webhook
n8n-nodes-base.webhook - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - Respond to Webhook
n8n-nodes-base.respondToWebhook - Edit Fields (Set)
n8n-nodes-base.set
From the author
Pre-Conditions 1. A Facebook Developer account with an active app. 2. Basic understanding of n8n workflows. 3. Access to a database (optional, for storing tokens). Setup 1. Webhook Activation: - Configure the Webhook to receive user requests and process input…