Automate Your Social Media Posting with n8n: X, LinkedIn & Instagram
An n8n workflow that publishes to X, LinkedIn and Instagram from a content queue: scheduling, AI captions with a review step, API setup and error handling.
Hamza El Haissouf
3 min readUpdated EN

Key takeaways
- Give each network its own branch with Continue On Fail, so an Instagram error doesn't stop the post on X.
- Let AI draft the captions, but publish nothing until a person has read them and marked the row ready.
- Instagram needs a professional account and a JPEG at a public URL; a private Google Drive link won't work.
- Start with one network, run it for a week, then add the next.
- Automate the publishing only: replies and comments stay with a person.
Short answer
An n8n Schedule Trigger reads the next ready post from a Google Sheet or Notion queue and publishes it to X, LinkedIn and Instagram, one branch per network. Captions come from the Claude API and are reviewed in the sheet first. The workflow writes the status back and sends a Telegram message with the links or errors.
Posting the same idea to X, LinkedIn and Instagram, in the right format for each, was taking me 30 to 45 minutes a day. So I built an n8n workflow for the repetitive part: it picks the next post from a queue, adapts the caption for each network, publishes, and tells me what went out. This is how it's put together, and what I'd do differently today.
The architecture
Content queue (Google Sheets or Notion)
→ n8n Schedule Trigger (every morning)
→ captions (Claude API), reviewed before publishing
→ X (API v2)
→ LinkedIn (n8n LinkedIn node, or a draft for review)
→ Instagram (Graph API: container, then publish)
→ Telegram notification with the links or the errors

n8n is the orchestrator. Each network is its own branch, so a failure on Instagram doesn't stop the post on X.
The content queue
A Google Sheet is enough:
| Date | Topic | Caption X | Caption LinkedIn | Caption Instagram | Image URL | Status |
|---|
The workflow reads the rows where Status is ready and the date is today, then writes back posted with the post links, or error with the message. Writing the status back is what stops the same post from going out twice if the workflow runs again.
Captions with AI, and a review step
I use the Claude API to turn one topic into a short version for X, a longer professional version for LinkedIn and a caption with hashtags for Instagram. The captions go back into the sheet first: nothing is published until I've read them and switched the row to ready. Publishing straight from the model saves two minutes, and costs credibility the day one post is wrong.
X (Twitter)
Posting uses the API v2 endpoint POST /2/tweets with OAuth. n8n has an X node for it; an HTTP Request node works too:
// n8n HTTP Request node
{
method: "POST",
url: "https://api.twitter.com/2/tweets",
authentication: "oAuth2",
body: { text: "{{ $json.caption_x }}" }
}
For a thread, post the first tweet, keep its id, then post each reply with reply: { in_reply_to_tweet_id }. Check your API access level before you start: X changes its tiers and posting limits regularly.
n8n's LinkedIn node can publish to your own profile once you connect a LinkedIn app with permission to post on your behalf. I still keep LinkedIn as a draft: the workflow emails me the text and the image, and I post it by hand. LinkedIn is where clients read me, so a two-minute review is worth it.
Publishing goes through Meta's Graph API and needs a professional (business or creator) account; depending on how you connect it, a linked Facebook Page may be required too. It takes two calls:
// 1. Create a media container from an image hosted at a public URL
POST https://graph.facebook.com/{api-version}/{ig-user-id}/media
{ image_url: "https://…/post.jpg", caption: "…" }
// 2. Publish the container
POST https://graph.facebook.com/{api-version}/{ig-user-id}/media_publish
{ creation_id: "{container-id}" }
Use the endpoint and the API version from Meta's current documentation. The image must be a JPEG at a public URL when Instagram fetches it: a private Google Drive link won't work.
Errors, limits and duplicates
- Run each network in its own branch with Continue On Fail, so one failure doesn't block the others.
- Send yourself a message when a branch fails, with the row and the error. Silent failures are the real risk of automated posting.
- One post a day per network stays far below the API rate limits, but retry with a delay rather than in a tight loop.
- Store the post IDs or links in the sheet: they prove what was published and prevent duplicates.

What I don't automate
Replies and comments. The workflow publishes; conversations stay with a person. Automated replies on social networks look automated, because they are.
Build it step by step
The workflow is about a dozen nodes: Schedule Trigger, Google Sheets (read), Filter, the caption step, one branch per network, Google Sheets (update) and Telegram. Start with one network, run it for a week, then add the next. If you're deciding whether this kind of workflow belongs in n8n or in custom code, read n8n vs custom automation.
Need a workflow like this for your business? Book a 30-minute call or see my AI automation service.
Frequently asked questions
Can n8n post to Instagram automatically?
Yes, through Meta's Graph API with a professional (business or creator) account, and sometimes a linked Facebook Page. It takes two calls: create a media container from a JPEG at a public URL, then publish that container.
How do I post to X (Twitter) from n8n?
Use n8n's X node or an HTTP Request node that calls the API v2 endpoint POST /2/tweets with OAuth. For a thread, post the first tweet, keep its id, then post each reply with in_reply_to_tweet_id. Check your API access level first: X changes its tiers and posting limits regularly.
Can n8n publish to LinkedIn?
Yes. n8n's LinkedIn node can publish to your own profile once you connect a LinkedIn app with permission to post on your behalf. I still keep LinkedIn as a draft that the workflow emails me, and post it by hand after a two-minute review.
How do I stop the workflow from posting the same thing twice?
The workflow only reads rows marked ready for today, and after each run it writes back posted with the post links, or error with the message. That status is what stops the same post from going out again if the workflow reruns.
Will automated posting hit the API rate limits?
One post a day per network stays far below the limits. When a call fails, retry with a delay rather than in a tight loop, and send yourself a message with the row and the error so no failure goes unnoticed.

Hamza El Haissouf
Full-stack developer for 6 years · Morocco
I build WhatsApp assistants and websites for private clinics and logistics companies. Remote, in English and French.
Related reading


