Automating Facebook posts with n8n: a deployment guide
An n8n workflow for automated Facebook posting uses the Facebook Graph API to publish to a Page through a Page access token with the pages_manage_posts permission — it cannot post to a personal profile or a group. This guide covers the architecture from a Google Sheets content calendar to a live post, how to handle media, token expiry, and risks to avoid.
What Facebook officially lets you automate
Facebook only officially supports automated posting to a Page, not to a personal profile. This runs through the Facebook Graph API and requires a Page access token with the pages_manage_posts permission — tied to the Page, not to your personal account.
Automated posting to a personal profile used to be possible through the publish_actions permission, but Facebook removed it from the Graph API in 2018 after the Cambridge Analytica incident. There is currently no official way for a workflow to post on behalf of a personal account.
The same applies to groups. The API for posting to a group (along with the publish_to_groups permission) was removed from every version of the Graph API in April 2024. If a tool advertises 'automatic posting to Facebook groups', ask exactly how it does it — an unofficial method can get the account suspended.
For a Page you manage yourself, you can keep the Meta app in development mode and add yourself as admin/tester — full App Review isn't required. If you're building this workflow to post on behalf of another business's Page (an agency model), Facebook will require App Review and Business Verification before granting pages_manage_posts at full access — check the current requirements at the time you apply, since Meta adjusts them often.
The architecture of an automated posting workflow
An automated posting workflow runs in a straight line: write the content once, and the machine handles the rest.
| Step | Tool in n8n | What the machine does |
|---|---|---|
| 1. Content calendar | Google Sheets | The content team fills in the post text, image/video, posting time and target platform in one row, and sets the status to 'pending' |
| 2. Time-based trigger | Schedule Trigger | Scans the Sheet every 15–30 minutes for rows whose time has come and are still 'pending' |
| 3. Format per platform | Switch + Set | Splits the content by Facebook/TikTok/Threads, adjusting text length and media dimensions for each |
| 4. Publish | Facebook Graph API / HTTP Request | Sends the image, video and text to the correct endpoint for each platform |
| 5. Log the result | Google Sheets (row update) | Marks the row 'published', with the actual posting time and post link — or an error code if it failed |
| 6. Alert on failure | Zalo/Email | Sends an alert as soon as a post fails, so someone can handle it manually in time |
Formatting content for each platform
A Facebook Page accepts a long caption, a link with a preview image, and multiple images in one post — the least restrictive of the three platforms.
TikTok and Threads also have official posting APIs, but with app-review conditions and format limits that are stricter and change more often than Facebook's. Before committing to full automation for these two platforms, check the current review status — AdSys's multi-platform posting engine handles all three platforms, with the TikTok/Threads part built to the API conditions in place at deployment time.
- Facebook: long captions, image/video with text, or a link with a preview image
- TikTok: requires vertical video (9:16 ratio), short description text
- Threads: favors short text, a single image or short video, no link preview image like Facebook's
Handling images and video in the workflow
The Graph API doesn't accept a local file path — it needs a publicly reachable URL for the image/video, or the binary data sent directly in the request. A common approach: keep a Google Drive link (with public sharing enabled) in the Sheet, and have n8n download the file and push it to the correct Facebook image/video endpoint.
Large videos need a separate upload endpoint (chunked upload) instead of a single request — check Facebook's current size and format limits before adding long videos to the automated schedule.
- Confirm the Drive link is shared as 'anyone with the link can view' before adding it to the Sheet
- Resize images/video to the correct dimensions for each platform before posting, so Facebook doesn't compress them and reduce quality
- Use the separate upload endpoint for long videos rather than sending them with a text post
- Always post a test on a test Page before turning on the schedule for the real Page
Token expiry and app review — where it usually breaks
A Page access token taken directly from the Graph API Explorer usually lasts only a few hours. To get a long-lived token: exchange the short-lived user token for a long-lived one (around 60 days), then call /me/accounts with that long-lived token to obtain a Page access token — a token obtained this way has no fixed expiry.
'No fixed expiry' doesn't mean permanent. The token still dies if the person who created it changes their password, revokes access, is removed as a Page admin, or the app gets suspended by Facebook. For a workflow running in production long-term, use a system user in Business Manager instead of a token tied to a personal account — it depends less on one person's account changes.
- Schedule a token check every few months — don't wait for the workflow to fail before remembering
- Don't use a token taken directly from the Graph API Explorer in a production environment — that token is usually short-lived
- Agencies managing multiple client Pages: consider a system user so the token doesn't depend on one personal account
Spam risk and compliance with Facebook's policies
Posting the same content in bulk across many Pages, or posting too densely in a short window, can draw the attention of Facebook's spam systems — even when posting through the official API. The issue isn't using a workflow, it's how you use it.
- Keep a reasonable gap between posts — don't push dozens of posts within a few minutes
- Don't reuse identical content across many unrelated Pages
- Avoid engagement-bait content (asking for comments/likes to 'get to the top') — it violates Facebook's content policy
- Content still needs human review before entering the queue — the workflow automates publishing, not moderation
- Check the Page's status in Meta Business Suite regularly to catch any restriction early
Checklist before you deploy
- The Facebook Page already exists and you are an admin with full permissions
- A Meta app has been created with the correct pages_manage_posts permission (and pages_read_engagement if needed)
- A long-lived token has been obtained via /me/accounts, not a temporary token from the Graph API Explorer
- The Google Sheet has all the needed columns: content, image/video, posting time, platform, status, result link
- There's a failure-alert branch to Zalo/email when a post fails
- A test post has been tried on a test Page before turning on the schedule for the real Page
- There's a human reviewing content before it enters the queue — the machine isn't generating and posting unsupervised
Build it yourself or use a ready-made setup
Building this workflow from scratch takes a few days for someone already comfortable with n8n: requesting Facebook permissions, building the Sheets flow, handling media, writing the failure-alert branch. For a beginner, chasing down permission and media-format errors usually takes longer than building the workflow itself.
AdSys's multi-platform posting engine (990,000 VND) comes pre-built for this exact flow across Facebook, TikTok and Threads, with a sample Google Sheets file and a setup guide. If you also need ad performance reporting alongside the posting schedule, the AdSys MarketingFlow package combines both into one system.
