n8n AI Agent Social Media Automation: MCP Setup Guide
You can turn any n8n workflow into a social media pipeline by attaching the PostAxis MCP server to an AI Agent node: a trigger fires (new RSS item, form submission, schedule, webhook), the agent writes the posts, and PostAxis schedules them on up to eight networks. Setup takes about five minutes with a PostAxis API key.
This guide is for people who already build in n8n and want posting to be one more step in their workflows, with an AI deciding the wording and PostAxis handling the networks.
What you can automate with n8n
n8n's strength is triggers. Something happens somewhere, and a workflow runs. With an AI Agent node connected to PostAxis, that "something" can end in a scheduled post:
- RSS to social. A new article in your feed becomes an X post and a LinkedIn post at 9:00 the next morning.
- Form to draft. A partner fills in an announcement form, and a LinkedIn and Facebook draft lands in PostAxis for review.
- Scheduled roundups. Every Friday at 16:00, a summary of the week's articles goes to your Telegram channel.
- Webhook from your app. A new product in your store or a closed deal in your CRM triggers a launch post or a case-study draft.
- Morning failure report. Each day, list posts that failed to publish and send the list to Slack or email.
What you need
- A PostAxis account. Sign up at app.postaxis.io; every plan starts with a 7-day free trial.
- Social accounts connected in PostAxis under Accounts.
- The PostAxis API add-on. n8n authenticates with a Bearer API key, and API keys need the add-on.
- n8n (cloud or self-hosted) with the AI Agent node and MCP Client Tool node available, plus credentials for a chat model.
How to connect n8n to PostAxis (step by step)
- Create your PostAxis account. Sign up at app.postaxis.io.
- Connect your social accounts. Open Accounts in PostAxis and connect Instagram, TikTok, YouTube, X, LinkedIn, Facebook, Threads or Telegram. The workflow can only post to accounts connected here and never touches your social media passwords.
- Create an API key. In PostAxis open Settings → API keys and click Create API key. Copy it; it's shown only once.
- Add an AI Agent node. In your workflow, add an AI Agent node after your trigger (RSS Feed Trigger, Form Trigger, Schedule Trigger, Webhook, or any app trigger) and connect a chat model to it.
- Attach the MCP Client Tool. On the agent's Tool input, add MCP Client Tool. Set the endpoint to the URL below and the transport to HTTP Streamable.
https://postaxis.io/api/mcp
- Set authentication. Choose Bearer Auth, create a new credential and paste your PostAxis API key. Leave "Tools to include" on All. Field names can move slightly between n8n versions; look for the endpoint, transport and authentication settings on the node.
- Tell the agent what to do. In the agent's prompt, describe the job and pass in data from the trigger with n8n expressions. For example:
A new article was published.
Title: {{ $json.title }}
Link: {{ $json.link }}
Summary: {{ $json.contentSnippet }}
Write one post for X (under 260 characters, include the link) and one
for LinkedIn (2 short paragraphs, include the link). Schedule both for
9:00 Europe/Berlin tomorrow. Validate before saving.
- Check it works. Run the workflow once with test data. Open the agent node's output: you should see calls to
list_accountsandcreate_post, and the posts should appear in your PostAxis calendar.
4 workflows you can copy
For each one, the trigger and the agent prompt are what matter. The MCP Client Tool stays the same across all of them, so you can save it once and reuse it.
RSS feed to X and LinkedIn
Trigger: RSS Feed Trigger on your blog's feed.
New article: {{ $json.title }} ({{ $json.link }}).
Write a post for X and a post for LinkedIn about it and schedule both
for 9:00 America/New_York the next morning. X: a single sharp sentence
plus the link. LinkedIn: what the reader will learn, in 3 to 4 lines,
plus the link. No emojis.
The agent calls list_accounts, get_platform_rules and create_post with a per-account caption for each network. You get something like: "Scheduled 2 posts for 9:00 tomorrow: X (243 characters) and LinkedIn, both linking to the new article."
Weekly roundup on Telegram
Trigger: Schedule Trigger, Fridays at 16:00. Add an RSS Read node (or HTTP Request to your CMS) before the agent to collect the week's articles.
Here are this week's articles: {{ JSON.stringify($json) }}
Write one Telegram post that rounds them up: a one-line intro, then each
title with its link on its own line. Publish it to our Telegram channel
now.
The agent uses a single create_post with publish set to now. Telegram allows 4,096 characters for a text post, which comfortably fits a weekly list.
Form submission to drafts for approval
Trigger: n8n Form Trigger with fields for headline, details and link.
A partner submitted an announcement:
Headline: {{ $json.headline }}
Details: {{ $json.details }}
Link: {{ $json.link }}
Write a LinkedIn post and a Facebook post announcing it, in our voice:
warm, specific, no hype. Save both as drafts. Do not schedule.
The drafts appear under Drafts in PostAxis, where someone on your team edits and schedules them. This is the safest pattern for anything triggered by outside input: the agent writes, a human decides.
Daily failure report
Trigger: Schedule Trigger, every day at 8:00. Connect a Slack or email node after the agent.
List posts from the last 24 hours that failed to publish on Instagram,
TikTok or YouTube. For each, give the network, scheduled time and the
error in one line. If there are none, reply "No failures."
The agent calls list_posts with a date range and status, then get_post on each failure for the per-network status. The agent's text output feeds your Slack or email node.
MCP Client Tool or HTTP Request node?
Use the MCP Client Tool when an AI Agent decides what to post: wording changes every time, the agent picks networks or adapts captions to each network's limits.
Use the PostAxis REST API with an HTTP Request node for fixed workflows: the same post at the same time, or data that's already formatted and just needs to be sent. There's no model in the loop, so it's simpler, cheaper and fully predictable. You can mix both in one n8n instance: HTTP Request for templated posts, an AI Agent with MCP for anything that needs writing.
Network limits your n8n agent works within
PostAxis checks every post against the network's rules before saving it. If the agent writes a 300-character X post, the tool call fails with a clear error, and the agent can shorten it and retry within the same execution.
| Network | Caption limit | Media rules |
|---|---|---|
| X (Twitter) | 280 characters | Optional; up to 4 images or one video |
| 3,000 characters | Optional; up to 9 images or one video | |
| 63,206 characters | Pages only; up to 10 images or one video | |
| Telegram | 4,096 characters, or 1,024 with media | Optional; up to 10 images or one video |
| 2,200 characters | Required; professional account, 1 to 10 images or one video | |
| YouTube | 5,000 characters | Exactly one video (Shorts); title up to 100 characters |
Tips for better posts
- Validate first in batch workflows. If a run schedules many posts, tell the agent to call
create_posts_bulkwithvalidate_only=truefirst. It checks everything and saves nothing. Bulk calls take up to 50 posts. - Put the timezone in the prompt. "9:00 Europe/Berlin", always. Otherwise the agent uses whatever timezone it was told or UTC, regardless of your n8n instance settings.
- Default to drafts for untrusted triggers. Forms and webhooks can be fed junk. Save drafts, and let a person schedule them.
- Keep your brand voice in the system message. The AI Agent node has a system message option; put tone, banned words and hashtag rules there so every workflow shares them.
- Attach media you already have. PostAxis doesn't generate images or video. Pass the agent a public image URL from your CMS and it can use
upload_media_from_url. - Mind the cap on loops. PostAxis allows up to 300 posts per 24 hours per account through MCP. A misconfigured loop or a feed that replays old items hits that ceiling instead of flooding your accounts.
Troubleshooting
401 Unauthorized. Check the credential uses Bearer Auth with the full key, the key is still active under Settings → API keys, and your plan has the API add-on.
The agent says no accounts are connected. Connect at least one account under Accounts in PostAxis. If you have several workspaces, name it in the prompt: "use my Acme workspace".
A post was rejected before saving. The error explains which rule failed (caption length, media count, video length or format). Tell the agent in its system message to fix and retry when a post is rejected.
Posts are scheduled at the wrong time. Add an explicit timezone to the agent prompt, like "9:00 Europe/Berlin".
You need to stop the workflow from posting. Deactivate the workflow in n8n, and revoke the API key under Settings → API keys in PostAxis. Access ends immediately.
FAQ
Can n8n post to social media with AI?
Yes. Connect an AI Agent node to the PostAxis MCP server with the MCP Client Tool, and the agent can write and schedule posts on Instagram, TikTok, YouTube Shorts, X, LinkedIn, Facebook Pages, Threads and Telegram channels.
Can n8n save drafts for approval?
Yes. Tell the agent to save posts as drafts. They appear in PostAxis under Drafts, where someone can edit and schedule them.
Can I use the REST API instead of MCP?
Yes. For fixed workflows, the PostAxis REST API with an HTTP Request node is simpler. The MCP Client Tool is best when an AI Agent decides what to post.
Does n8n need an API key?
Yes. n8n authenticates with a Bearer API key, which you create under Settings → API keys. API keys need the PostAxis API add-on.
Can I publish immediately instead of scheduling?
Yes, one post at a time with create_post. Bulk calls only schedule or save drafts; publishing now isn't allowed in bulk.
Find the endpoint and settings on the n8n agent page and the full tool list in the PostAxis MCP reference. For how n8n compares to chat assistants and autonomous agents, read the complete guide to AI agents for social media. If you want a goal-driven agent instead of a workflow, see running social media on autopilot with OpenClaw. Start your 7-day free trial at app.postaxis.io.
Ready to simplify your social media?
PostAxis helps builders and creators publish to all platforms from one dashboard with scheduling, cross-posting, and automation.
Join the waitlist →