Updated

Post to social media from n8n

Yes, an n8n workflow can post to social media through Postgale in two ways: the HTTP Request node calls the Postgale REST API when the workflow decides what to publish, and the MCP Client Tool node gives an n8n AI Agent node the Postgale tools when the model decides. Both authenticate with one Postgale API key as a bearer token.

Can n8n post to Instagram, Threads or TikTok?

Postgale is the secure layer for AI agents on social media. The platform APIs each need their own app review and token handling. Postgale is one HTTP endpoint and one MCP server in front of all of them, so a workflow needs one credential.

MCP (Model Context Protocol) is the open standard that lets AI assistants such as Claude and Cursor use outside tools. An MCP server is what they connect to. n8n’s AI Agent node can use MCP servers as tools through the MCP Client Tool node.

Once connected, the agent can work on Instagram, Facebook Pages, Threads, TikTok, Bluesky and Mastodon, and answer customers on WhatsApp. X, Telegram and Discord are coming soon.

HTTP Request node or MCP Client Tool node?

UseNodeWhen
Fixed stepsHTTP RequestYour workflow knows what to post (a new blog post, a product update, a form submission). Call POST /api/v1/posts with the content and the account ids.
An agent decidesMCP Client Tool attached to an AI Agent nodeThe model reads the input (an inbox, a brief, a trigger) and chooses among Postgale’s tools: list accounts, upload media, create or schedule posts, read and reply to comments and messages.

How do I set up the HTTP Request node?

  1. In Postgale, open Dashboard → API keys, create a key and copy it (it starts with sk_ and is shown once). Connect the social accounts the agent may use under Dashboard → Accounts.
  2. In n8n create a credential of type Header Auth with name Authorization and value Bearer sk_… (your key).
  3. Add an HTTP Request node: method POST, URL https://postgale.com/api/v1/posts, authentication Header Auth with that credential, body type JSON:
HTTP Request body (JSON)
{
  "content": "{{ $json.caption }}",
  "scheduledFor": "{{ $json.publishAt }}",
  "platforms": [
    {
      "accountId": "acc_instagram",
      "platformSpecificData": {
        "mediaUrl": "{{ $json.imageUrl }}"
      }
    },
    {
      "accountId": "acc_threads"
    }
  ]
}
  1. Get the account ids once with a GET to https://postgale.com/api/v1/accounts using the same credential.
  2. Optional: send an x-request-id header built from your trigger id, so a re-run of the workflow returns the same post instead of a duplicate.
  3. To know when the post is live, add a Webhook node and register its URL in Postgale (Dashboard → Webhooks); Postgale sends post.published or post.failed, signed with HMAC-SHA256.

How do I set up the MCP Client Tool node?

  1. In Postgale, open Dashboard → API keys, create a key and copy it (it starts with sk_ and is shown once). Connect the social accounts the agent may use under Dashboard → Accounts.
  2. Add an AI Agent node with your model, and attach an MCP Client Tool node to it.
  3. In the MCP Client Tool node set the endpoint to https://postgale.com/mcp, the transport to HTTP streamable, and authentication to a Bearer or Header Auth credential carrying Authorization: Bearer sk_….
  4. Leave the tool list on “all” to start, or select only the read-only tools until you trust the workflow.
  5. Give the agent a system prompt that states the account ids it may use and whether it must save drafts or may schedule.
Ask your agent“You manage the Northline accounts in Postgale (ids in the context). For each new blog post in the input, draft one Instagram caption with the cover image and one Threads post, save them as drafts, and reply with the Postgale post ids.”

How do I keep a person in the loop?

  • Approval: tick “Hold posts from this app for approval” when you sign in, or in the Postgale dashboard require approval for the API key the agent uses (or for the whole workspace, or one account). Posts then wait as pending approval; comment replies and moderation, direct messages, WhatsApp sends and edits to live posts wait in the same queue. A person approves, edits or rejects each one in Dashboard → Approvals; the agent’s own key or sign-in cannot approve.
  • Tool annotations: every Postgale tool declares whether it only reads, writes, or publishes live, deletes or spends. Clients that honour annotations ask before destructive tools run.
  • Audit log: every write the agent makes is recorded with the key or the connected app, the action and the time.
  • Revoking: each sign-in appears under Dashboard → Connected apps and each key under Dashboard → API keys; either can be revoked at any time.

What are the limits?

  • Postgale has no dedicated n8n node; the integration is n8n’s standard HTTP Request and MCP Client Tool nodes with a bearer header. The same approach works from Make or Zapier with their HTTP modules.
  • Each platform’s rules still apply and Postgale enforces them: Instagram needs an image or video (JPEG for images), Threads allows 500 characters, Bluesky 300, Mastodon 500 by default, and TikTok needs a privacy level chosen from the creator’s options; direct TikTok posts from an agent always wait for a person to confirm the settings.
  • Requests from one key are limited to 60 per minute by default; batch posts in one request (up to 20 targets) rather than one request per platform.

Common questions

No. Use the HTTP Request node for the REST API or the MCP Client Tool node for the MCP server; both take the Postgale API key as a bearer header.

Yes. With the MCP Client Tool attached, the agent can list comments on a post and reply, hide or delete them; with approval on for the key, each reply waits for a person first.

Register an n8n Webhook node URL in Postgale. Postgale sends post.published or post.failed (and comment, mention, message and approval events) with an HMAC-SHA256 signature you can verify in the workflow.

Through their HTTP modules, yes: the REST API is plain JSON over HTTPS with a bearer token. Postgale does not ship a Make or Zapier app.