n8n + PostNinja

Automate Social Media Posting with n8n

Build workflows where an AI agent writes and schedules your posts: new blog post in your RSS feed, new row in a sheet, new product in your store. Add PostNinja as an MCP Client Tool and the agent can post to every connected account.

  • Connect once with an API key
  • Draft, schedule and publish by asking
  • 7 platforms: X, Instagram, TikTok, Facebook and more

Setup

How do I connect PostNinja to n8n?

  1. 1

    Create an API key

    In PostNinja, go to Settings → API and create a key. It starts with pn_ and is shown once, so copy it somewhere safe.

  2. 2

    Add PostNinja to n8n

    In your workflow, add an AI Agent node, then add the MCP Client Tool sub-node with these settings:

    MCP Client Tool settings
    Endpoint:          https://postninja.app/api/mcp
    Server Transport:  HTTP Streamable
    Authentication:    Bearer Auth
      Token:           pn_YOUR_KEY
    Tools to Include:  All

    Replace pn_YOUR_KEY with a key from Settings → API.

    Use a recent n8n version: older MCP Client Tool versions only spoke SSE. You can also call the REST API from an HTTP Request node.

  3. 3

    Just ask

    n8n finds the PostNinja tools on its own. Try:

    • “When a new post appears in the blog's RSS feed, write a post for X and Threads and schedule it for the next morning.”
    • “For each new row in the Content sheet, schedule the post at the date and time in the row.”
    • “Every Monday, list last week's failed posts and send them to Slack.”

Tools

What can n8n do with PostNinja?

Write and schedule

Drafts posts, gives each platform its own text, and schedules them for any date and time.

Threads and Stories

Builds multi-post X threads and posts photos or videos as Instagram Stories.

Check what's planned

Lists upcoming posts, drafts and what went out, with links to the live posts.

Fix and reschedule

Moves, edits or deletes drafts and scheduled posts when plans change.

Add images

Uploads images to attach to posts. Larger files and video go through the REST API.

Spot failures

Reads each account's status and error, so it can tell you what didn't go out and why.

One connection, seven platforms

Connect your accounts in PostNinja once. From then on n8n can post to any of them, and PostNinja publishes at the time you set.

FAQ

n8n and PostNinja questions

Can I use n8n without the AI Agent?

Yes. The REST API (/api/v1/posts) works with n8n's HTTP Request node, Make and Zapier for fixed workflows where you don't need an AI to write the text.

Does n8n post without asking me?

That depends on n8n's own settings; most ask before each tool call. If you'd rather review everything, ask it to save posts as drafts, then schedule them from the PostNinja calendar.

Is my API key safe?

PostNinja only stores a hash of each key and shows its first characters so you can tell keys apart. A key works for one workspace, and you can revoke it any time under Settings → API.

Which platforms can n8n post to?

Every account you've connected: X, Instagram, Threads, Facebook Pages, TikTok, YouTube Shorts and Pinterest.

Do posts scheduled by an AI agent cost extra?

No. They're ordinary posts on your plan. As always, X posts use credits (10 each, 80 with a link) because X charges for every post; other platforms are unlimited.

Works with other AI agents too

Let n8n run your social media.

Connect n8n to PostNinja in a couple of minutes. Plans from $15 a month.