Skip to content

Post to social media from n8n

One HTTP Request node posts to X, LinkedIn, Instagram, Facebook and more. Copy the ready workflow, paste it into n8n and swap in your key.

No card required.

postkey-n8n-workflow.json
{
  "name": "Postkey: post new blog articles",
  "nodes": [
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyHour"
            }
          ]
        },
        "feedUrl": "https://example.com/blog/rss.xml"
      },
      "name": "New blog post",
      "type": "n8n-nodes-base.rssFeedReadTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.postkey.dev/v1/posts",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "x-access-key",
              "value": "pk_live_your_key"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ content: $json.title + '\\n\\n' + $json.link, platforms: [{ platform: 'linkedin', accountId: 'int_li_456' }, { platform: 'facebook', accountId: 'int_fb_312' }], publishNow: true }) }}",
        "options": {}
      },
      "name": "Post with Postkey",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        300,
        0
      ]
    }
  ],
  "connections": {
    "New blog post": {
      "main": [
        [
          {
            "node": "Post with Postkey",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Copy it, then press Ctrl+V (⌘V on a Mac) on an empty n8n canvas.

What it looks like in n8n

A new blog post goes out to LinkedIn and Facebook. Swap the RSS trigger for a form, a schedule, a database row or anything else n8n can start from.

OutputPost with Postkey · 1 item
{
  "success": true,
  "postId": "post_2Wf7m",
  "status": "published",
  "platforms": [
    { "platform": "linkedin", "success": true, "platformPostUrl": "https://www.linkedin.com/feed/update/…" },
    { "platform": "facebook", "success": true, "platformPostUrl": "https://www.facebook.com/…" }
  ]
}

Set it up in four steps

Copy each step as it is. Replace the key with yours.

  1. Get your key

    Reserve a free key. The same key works for the REST API and the MCP server, and you can make one key per agent so you can revoke it alone.

    export POSTKEY_API_KEY=pk_live_…
    # put it in your shell profile or .env, never in a repo
  2. Paste the workflow

    Copy the workflow JSON from this page and press Ctrl+V (⌘V on a Mac) on an empty n8n canvas. Both nodes appear, already wired.

    New blog post  →  Post with Postkey
    # 2 nodes pasted
  3. Add your key and accounts

    In the HTTP Request node, put your key in the x-access-key header, or save it once as a Header Auth credential. Replace the accountId values with yours from the dashboard.

    x-access-key: pk_live_…
    accountId: "int_li_456"
  4. Run it

    Click Execute workflow. The node's output shows the result and live URL for every network.

    POST https://api.postkey.dev/v1/posts
    { "status": "published", "platforms": [ … ] }

n8n questions

Something not here? Email hello@postkey.dev. I answer every one myself.

Book a 15-minute call
  • No. The HTTP Request node calls the REST API directly. If you build an AI Agent in n8n, you can still point its MCP Client tool at the hosted server.

  • Yes. It only needs the built-in HTTP Request node.

  • No. Each tool call costs the same credits as the API call behind it: 1 per network, 5 on X (50 with a link). Listing accounts, reading posts and moving scheduled posts cost nothing.

Give your agent a key.

$ curl -X POST api.postkey.dev/v1/posts -H "x-access-key: …"

No card required.