Social media automation with n8n
The dependable way to post from n8n is two built-in nodes: a Schedule Trigger that starts the workflow, and an HTTP Request node that calls a publishing API with a Bearer token. The same call runs every time, with no AI model deciding anything. n8n then never touches TikTok or Instagram directly; the API does.
Why not let an AI agent node do it?
n8n has an MCP Client Tool node, and it is tempting to hand an AI Agent node a set of posting tools. Two reasons to hold back for a scheduled job.
First, the MCP Client Tool only acts when the agent decides to call a tool, so the result depends on the model. A posting job should do the same thing every Tuesday. Second, n8n's documentation names only an "SSE Endpoint" for that node, and whether it works with a Streamable HTTP server is not confirmed (November 2026).
Use the agent for writing captions if you like. Use a plain HTTP Request for the posting.
The workflow in four nodes
- Schedule Trigger. Runs "at fixed intervals and times". Save and publish the workflow, or it will not run.
- A source node. Whatever hands you the next item: a spreadsheet row, a list of links, the output of an earlier step. It should give you a caption and a public link to the video, or the id of a file already uploaded.
- HTTP Request: validate. A dry run against the publishing API that returns the exact problems and changes nothing.
- HTTP Request: create. Only if step 3 came back clean.
Add an IF node between 3 and 4 so a failed check stops the run and sends you a message instead of a broken post.
Setting up the credential
In n8n, create a generic credential of type "Bearer auth". n8n's own explanation: it "is actually just header authentication with the Name set to Authorization". You enter one field, the token.
With apublished, the token is an API key made in the web app under "API keys". Keys are scoped and can be revoked. For a scheduled workflow, think about which scopes you give it:
- With write and publish, the workflow can post immediately.
- With write but not publish, it can only create drafts and scheduled posts. Immediate publishing is refused. That is a cheap approval step: the workflow fills the calendar, a person checks it.
The two requests
Both are POST requests with a JSON body. Here they are as curl commands, which you can paste into the HTTP Request node with its curl import.
Validate:
curl -X POST https://apublished.com/v1/posts:validate \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{
"body": { "items": [{ "text": "Hello" }] },
"targets": [{ "channelId": "…", "settings": { } }]
}'
Create, with an idempotency key:
curl -X POST https://apublished.com/v1/posts \
-H "Authorization: Bearer $KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"body": { "items": [{ "text": "Hello" }] },
"targets": [{ "channelId": "…", "settings": { } }],
"scheduleMode": "AT",
"scheduledAt": "2026-09-01T09:00:00Z"
}'
Three notes. Each target is one connected account, so one request can go to TikTok, Instagram and YouTube at once. Instead of a fixed time, "scheduleMode": "NEXT_SLOT" takes the account's next free slot. And the Idempotency-Key matters in n8n: if a run is retried with the same key and body, you get the first answer back instead of a second post. Generate it from something stable, such as the row id, not a fresh random value per retry.
Videos are uploaded first and then referenced by their asset id, or fetched from a URL with POST /v1/media:from-url. The full recipes are in the API docs.
n8n and Instagram, n8n and TikTok
The empty settings object above is where each platform's own rules go, and the validation call tells you when one is missing.
- Instagram needs a placement: feed or story. The account must be a professional account linked to a Facebook Page. Photos must be JPEG. Details: Instagram posting API.
- TikTok needs a privacy level, chosen from the options your account offers. Comments, duets and stitches stay off unless you set them on. A workflow cannot pick these "for" a creator in a way TikTok would accept as a default, so decide them once and write them into the node. Details: TikTok posting API.
- YouTube needs the made-for-kids declaration on every video. See uploading to YouTube with n8n.
- Facebook needs nothing extra. Pages only.
Time zones bite
The Schedule Trigger uses the workflow's time zone, then the instance's. A self-hosted n8n defaults to America/New York. n8n Cloud tries to detect yours at sign-up and falls back to GMT. Set it on the workflow before you trust a "9 am" trigger.
The scheduledAt field, by contrast, is in UTC, as the trailing Z shows.
Other ways to post from n8n
Some publishing tools ship their own n8n node, which saves you writing JSON. Postiz, Blotato and Upload-Post all mention n8n support on their own pages (checked 11 November 2026). See Postiz alternatives and Blotato alternatives for how they differ.
apublished has no n8n node; it is the plain HTTP route above. It is a Swiss product billed in Swiss francs, from CHF 19 a month, with API access on every plan, a 7-day free trial and no free plan. It posts only to TikTok, YouTube, Instagram and Facebook.
What the workflow still cannot do
- Connect a social account. A person signs in once in a browser.
- Reply to comments. apublished has no inbox.
Questions
Can n8n post to Instagram without an API? Not in a way Instagram allows. Its terms forbid automated access without permission.
Is the HTTP Request node enough, or do I need code? Enough. n8n's node handles POST, JSON bodies and Bearer credentials.
Can I use the AI Agent node to write captions? Yes. Keep the posting itself in a fixed HTTP step.
What happens if the workflow runs twice? With the same Idempotency-Key and body, the second call returns the first result.
Sources
- n8n docs: HTTP Request node, HTTP credentials, Schedule Trigger, MCP Client Tool, read 11 November 2026.
- apublished agent docs (recipes), checked November 2026.
Published November 11, 2026