Automate Instagram & Facebook posting with Meta Graph API & System User Tokens
Ready for 3.0What this workflow does
This workflow has 18 nodes and runs on a schedule (every 30 days at 01:00) (plus 1 other trigger). It uses only n8n's built-in nodes. It also calls graph.facebook.com over HTTP.
How it runs
Trigger: On a schedule (every 30 days at 01:00) (plus 1 other trigger).
- Get Current Token (Code): runs custom JavaScript code
- Post to Instagram (HTTP Request): calls graph.facebook.com (POST)
- Refresh token (HTTP Request): calls graph.facebook.com
- Wait: waits 2 seconds
- Push to Static Data (Code): runs custom JavaScript code
- Publish instagram post (HTTP Request): calls graph.facebook.com (POST)
- Use System token to get page token (HTTP Request): calls graph.facebook.com
- Get Correct Page Token (Code): runs custom JavaScript code
- Post to Facebook (HTTP Request): calls graph.facebook.com (POST)
- Get Token from static Data (Code): runs custom JavaScript code
…plus 6 more steps. See the full node list below.
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 (5)
- Manual Trigger
n8n-nodes-base.manualTrigger - HTTP Request
n8n-nodes-base.httpRequest - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Code
n8n-nodes-base.code - Wait
n8n-nodes-base.wait
From the author
This template automates posting to Instagram Business and Facebook Pages using the Meta Graph API. It supports both short-lived and long-lived tokens, with a secure approach using System User tokens for reliable, ongoing automation. Includes detailed guidance…