How to automate social media posting with n8n
Use n8n's HTTP Request node and the Postbroad API to turn new articles into drafts, and a Webhook node to react when a post goes live or fails.
· The Postbroad team
n8n is a good home for posting rules that never change: every new article becomes a draft, every failure reaches the team. n8n talks to Postbroad through the REST API with its HTTP Request node, and Postbroad's webhooks start a workflow when something happens.
Postbroad nodes for n8n are coming soon. Everything below works today with the nodes n8n already has.
What you need
- A Postbroad account with a brand and at least one connected channel.
- An API key. In Postbroad, open your organization settings, then API keys, and give the key only the brands this workflow needs.
- An n8n credential for the key, such as Header Auth with the header name Authorization and the value Bearer followed by your key.
A workflow: new article to a draft
- RSS Feed Trigger: a new article on your blog.
- HTTP Request: a POST to the Postbroad API that creates a draft for the channels you pick, with the article's title and link.
POST https://app.postbroad.com/v1/posts
Headers
Authorization (from your Header Auth credential)
Idempotency-Key {{ $execution.id }}
Content-Type application/json
Body
{
"brandId": "<brandId>",
"baseText": "{{ $json.title }} {{ $json.link }}",
"destinations": [{ "channelId": "<channelId>" }]
}The draft waits in Postbroad. A person reads it, changes it if needed, and schedules it, or sends it for approval if the brand needs one.
Scheduling from n8n
You can schedule from the workflow too. It takes two more calls: a preview, which returns the checks and a receipt, then a schedule call with that receipt. A post that fails a check, such as text that is too long for a network, stops there with the reason. Many teams keep that step in Postbroad, where a person sees the preview.
A workflow: tell the team when something fails
- Webhook node: copy its production address.
- In Postbroad, add that address as a webhook endpoint for delivery.failed, and keep the signing secret it shows once.
- A message to your team chat with the network, the post and the reason.
Every webhook is signed in the Standard Webhooks format. Check the signature and the time with that secret before the workflow acts on the request.
No duplicate posts on a retry
Send an Idempotency-Key header with every write, built from the execution. If n8n retries a step, Postbroad recognises the request and does not create a second post.
Where to go next
- n8n setup page with the same steps.
- Use Make or Zapier with the API.
- Read about the API and the states each network reports.
- See every channel a workflow can post to.