Use this comprehensive n8n workflow to automate content publishing across Instagram and Facebook Pages via the Meta Graph API. Features built-in logic for token management and refreshment.
Download this n8n workflow template and start using it instantly.
Social Media Managers who need reliable, scheduled cross-posting.
Technical users and developers leveraging the Meta Graph API for automation.
Anyone seeking pre-built n8n templates to manage complex OAuth token lifecycles.
Users aiming to centralize their marketing operations within an n8n environment.
Managing access tokens for Meta platforms (Facebook and Instagram) can be challenging, as standard user tokens expire quickly. This advanced n8n workflow solves this problem by providing two robust posting mechanisms: a test path using predefined credentials, and a highly recommended production path utilizing long-lived tokens stored via n8n's static data feature.
This n8n workflow seamlessly handles the two-step process required for Instagram posting (creating a media container, then publishing) and dynamically retrieves the necessary Page Access Token for simultaneous Facebook posting. The included guide explains the critical steps for generating a permanent System User Token, ensuring your n8n automation runs without manual token intervention.
This n8n workflow is structured into two main operational branches, focusing on token management and social publishing.
This branch uses a dedicated n8n trigger to ensure the access token remains valid. It is configured to run periodically, optimally every 30 days.
fbexchangetoken grant type to swap the existing token for a new one, extending its life (typically to 60 days).accesstoken is immediately saved back into the n8n static data store for future use, completing the automated token lifecycle management.This sequence executes the actual posting, leveraging the secure token retrieved from static data.
/media endpoint to create the media container, providing the image URL and caption, along with the access token./mediapublish endpoint using the creation_id returned from the previous step to finalize the Instagram post.me/accounts endpoint using the secure token to fetch a list of all managed Facebook Pages and their respective Page Access Tokens.To deploy this powerful n8n workflow, follow these steps:
Facebook Graph account credential configuration., , and with your actual data.This n8n workflow leverages several key n8n node types to achieve complex social media integration:
Manual Trigger / Schedule Trigger: These n8n trigger nodes initiate the workflow. The Manual Trigger is useful for testing, while the Schedule Trigger handles the routine 30-day token refresh.
HTTP Request: This fundamental n8n node is used extensively for all interactions with the Meta Graph API. It handles creating media containers, publishing posts, refreshing tokens, and fetching Page Access Tokens. Key configurations include using POST methods, form-urlencoded content type, and relying on predefined Facebook Graph API credentials.
Code: Several Code n8n node instances are used for critical logic:
Get Current Token and Get Token from static Data: Retrieval of the securely stored access token from n8n's workflow static data.
Push to Static Data: Saving the newly refreshed access token after the exchange process.
Get Correct Page Token (and 1): Custom JavaScript logic to iterate through the list of pages received from the API and isolate the specific Page Access Token needed for Facebook publishing by matching the Page ID.
Deploy this robust n8n workflow to automatically vet, score, and manage influencer applications using live Instagram and YouTube data via RapidAPI. Learn how this powerful n8n template saves marketing teams significant time.

Use this comprehensive n8n workflow to track income and expenses instantly via Telegram. Automatically log transactions, handle approval queues, and update Google Sheets in real-time.

Automate incident response using an n8n workflow that creates Jira tickets, alerts Slack, logs data to Google Sheets, and archives timelines to Google Drive. Use these n8n templates for reliability.

Use this powerful n8n workflow to automatically generate viral Instagram carousels and captions using GPT-5, Nano Banana, and Blotato. Maximize your social growth with cutting-edge n8n templates.


specializing in automation, AI integrations, and workflow optimization. I build high-impact n8n workflows that connect Salesforce, Outlook, RingCentral, and more. Reach out if you need help making your systems talk to each other.







































