Updated
Post to Bluesky from n8n with an AI agent
Yes, an n8n workflow can post to Bluesky through Postgale. Attach an MCP Client Tool node pointed at https://postgale.com/mcp to an n8n AI Agent node (or call the REST API from an HTTP Request node) with a Postgale API key, connect your Bluesky account in Postgale once, and the agent can posts, threads, replies, images, video and link cards. A person can be required to approve every post, reply and message before it goes out.
Can n8n post to Bluesky?
Postgale is the secure layer for AI agents on social media. 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 does not reach Bluesky on its own; with Postgale connected it gets tools for the Bluesky accounts you connected and nothing else.
| Task | What Postgale does |
|---|---|
| Publish | Posts up to 300 characters with clickable links, mentions and hashtags; up to 4 images or one video with alt text; a link card for the first link; scheduling. |
| Threads and replies | A thread of up to 25 posts in one request, or a reply to any Bluesky post. |
| Delete | Remove a post it published. |
What do you need?
- A Bluesky account and an app password (Settings → Privacy and security → App passwords). Never your account password.
- A Postgale workspace, and a sign-in or an API key for the agent.
- Optional images or a video on a public HTTPS URL (upload them with
upload_media). - n8n, set up as below (Workflows with the HTTP Request or MCP Client Tool node).
Step 1: connect your Bluesky account
- In Bluesky, open Settings → Privacy and security → App passwords and add one named Postgale.
- Create a Postgale workspace, open Dashboard → Accounts → Bluesky and enter your handle and the app password.
- Connect your AI tool: add
https://postgale.com/mcpin ChatGPT, Claude or Cursor and sign in to Postgale, or create a key under Dashboard → API keys for n8n or your own code. - Ask the agent for a draft first. Turn on approval in the dashboard if a person should sign off before anything goes live.
From your own code, POST /api/v1/connect/bluesky with the handle and app password connects the account directly. Postgale stores the app password encrypted and renews the session by itself.
Step 2: connect n8n to Postgale
| Use | Node | When |
|---|---|---|
| Fixed steps | HTTP Request | Your 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 decides | MCP Client Tool attached to an AI Agent node | The 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 MCP Client Tool node?
- 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. - Add an AI Agent node with your model, and attach an MCP Client Tool node to it.
- 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 carryingAuthorization: Bearer sk_…. - Leave the tool list on “all” to start, or select only the read-only tools until you trust the workflow.
- 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 set up the HTTP Request node?
- 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. - In n8n create a credential of type Header Auth with name
Authorizationand valueBearer sk_…(your key). - Add an HTTP Request node: method POST, URL
https://postgale.com/api/v1/posts, authentication Header Auth with that credential, body type JSON:
{
"content": "{{ $json.caption }}",
"scheduledFor": "{{ $json.publishAt }}",
"platforms": [
{
"accountId": "acc_instagram",
"platformSpecificData": {
"mediaUrl": "{{ $json.imageUrl }}"
}
},
{
"accountId": "acc_threads"
}
]
}- Get the account ids once with a GET to
https://postgale.com/api/v1/accountsusing the same credential. - Optional: send an
x-request-idheader built from your trigger id, so a re-run of the workflow returns the same post instead of a duplicate. - 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.
What can I ask the agent to do on Bluesky?
Check the connection first: “Which Bluesky accounts are connected in Postgale?” Then, in plain language:
Ask your agent“Post this announcement to Bluesky with the link to the launch post as a card.”
Ask your agent“Split this paragraph into a Bluesky thread, 300 characters per post at most. Drafts only.”
Ask your agent“Show me today’s Bluesky mentions and draft replies.”
{
"content": "ignored",
"platforms": [
{
"accountId": "acc_bsky",
"platformSpecificData": {
"threadItems": [
{
"content": "Release 2.4 is out 🎉",
"mediaUrl": "https://media.example.com/screenshot.png",
"altText": "The new dashboard"
},
{
"content": "Faster sync and dark mode."
},
{
"content": "Full changelog: https://example.com/changelog"
}
]
}
}
],
"publishNow": true
}Which Bluesky rules does Postgale enforce?
- Text is limited to 300 characters as Bluesky counts them (an emoji counts once); a longer post is refused before it reaches Bluesky.
- Images: JPEG, PNG, WebP or GIF, up to 1 MB each and 4 per post. Video: one MP4 up to 100 MB and 3 minutes. Images and video are not mixed.
- Mentions of handles that do not exist stay plain text instead of breaking the post.
- Only app passwords are accepted. If you delete it in Bluesky, the account is marked as needing reconnection and your webhook hears about it.
- When Bluesky asks to slow down, Postgale waits until the limit resets before retrying.
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 can’t an agent do on Bluesky through Postgale?
- Edit a post. Bluesky posts cannot be edited; delete and post again instead.
- Read likes, reposts or views yet.
- Send direct messages.
Common questions
Yes, an n8n workflow can post to Bluesky through Postgale. Attach an MCP Client Tool node pointed at https://postgale.com/mcp to an n8n AI Agent node (or call the REST API from an HTTP Request node) with a Postgale API key, connect your Bluesky account in Postgale once, and the agent can posts, threads, replies, images, video and link cards. A person can be required to approve every post, reply and message before it goes out.
No. The account owner signs in on Postgale with a Bluesky app password once, and Postgale stores the resulting tokens encrypted. An n8n AI agent only holds a Postgale API key or sign-in, which you can revoke at any time.
Yes. Turn on approval for the API key it uses, the account or the whole workspace. Posts, replies and messages then wait in the Postgale dashboard until a person approves, edits or rejects them; an n8n AI agent’s own access cannot approve.
Yes. Ask for a date and time; Postgale stores the post as scheduled and publishes it then, and reports the result (post.published or post.failed) on your webhook and in get_post.