n8n Social Media Automation: A Publishing Workflow You Can Import
n8n ships nodes for Slack, Discord, Google, and a long list of other services, but it has no TikTok, Instagram, Threads, or YouTube publishing node. That gap is the reason most social media automation in n8n gets built with the HTTP Request node instead. This article walks through one workflow that publishes and schedules posts through the Wahdx Connection API, including the JSON you can import, the authentication setup, and the error branches that keep a failed post from disappearing.
Why n8n needs an HTTP Request node for social publishing
Check the n8n node library and you will find Facebook, LinkedIn, Reddit, and Twitter. You will not find a node for publishing a video to TikTok, a Reel to Instagram, a thread to Threads, or a Short to YouTube. Those APIs involve multi-step uploads and platform-specific settings, so the nodes either do not exist or only cover a slice of the work. The HTTP Request node covers the rest, because it can call any REST API. The trade is that you own the payload shape and the error handling, which is exactly what the workflow below sets up once so every later automation can reuse it.
What the workflow does
The workflow has four nodes. A schedule trigger fires on the days you choose. A Code node builds the post payload from a caption variable and a media URL. An HTTP Request node sends that payload to the Wahdx Connection publish endpoint with your API key. An If node checks the success flag, so a failed publish reaches its own branch instead of ending silently. When you want to schedule a post for later instead of publishing now, the same HTTP Request node targets a different endpoint and adds a timestamp, which the next section covers.
Set up the credential once
Wahdx Connection authenticates with an X-API-Key header. In n8n, create one credential of type Header Auth and reuse it in every HTTP Request node.
- In n8n, open Credentials, add a new credential, and pick Header Auth.
- Name it, for example, Wahdx API.
- Set Name to X-API-Key and Value to your API key from the profile page.
- Save. The HTTP Request node references the credential by name, so the key is never written into the workflow JSON.
The publish request
The HTTP Request node sends a POST to /api/content/post with a JSON body. The body carries the platform, the account ID, the caption, and a mediaItems array. The response returns a publish ID and a status, which is what the Filter node checks. This request publishes immediately. To schedule the same post instead, point the node at POST /api/posts with accountIds, mediaType, and scheduledAt, which the scheduling section describes.
{
"platform": "instagram",
"accountId": "INSTAGRAM_ACCOUNT_ID",
"content": "Campaign caption",
"mediaItems": [
{ "url": "https://your-domain.com/reel.mp4" }
],
"instagramSettings": {
"share_to_feed": true
}
}Workflow JSON you can import
This workflow publishes one Instagram Reel on a weekly schedule. Import it from the n8n canvas with Import from File or by pasting it into a new workflow, then attach the Wahdx API credential to the HTTP Request node and set your account ID. The Code node holds the caption and media URL, so the only edits are the account ID and the credential.
{
"name": "Wahdx Reel publisher",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "weeks",
"triggerAtDay": [1],
"triggerAtHour": 9
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [-220, 0],
"id": "a1b2c3d4-0001-4000-8000-000000000001",
"name": "Weekly trigger"
},
{
"parameters": {
"jsCode": "return [{\n json: {\n platform: 'instagram',\n accountId: 'INSTAGRAM_ACCOUNT_ID',\n content: 'Campaign caption',\n mediaItems: [{ url: 'https://your-domain.com/reel.mp4' }],\n instagramSettings: { share_to_feed: true }\n }\n}];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [0, 0],
"id": "a1b2c3d4-0002-4000-8000-000000000002",
"name": "Build payload"
},
{
"parameters": {
"method": "POST",
"url": "https://api.wahdx.com/api/content/post",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"contentType": "json",
"specifyBody": "json",
"jsonBody": "={{ JSON.stringify($json) }}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [220, 0],
"id": "a1b2c3d4-0003-4000-8000-000000000003",
"name": "Publish to Wahdx"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "c1d2e3f4-0004-4000-8000-000000000004",
"leftValue": "={{ $json.success }}",
"operator": {
"type": "boolean",
"operation": "true"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [440, 0],
"id": "a1b2c3d4-0005-4000-8000-000000000005",
"name": "Published?"
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [660, 120],
"id": "a1b2c3d4-0006-4000-8000-000000000006",
"name": "Review failure"
}
],
"connections": {
"Weekly trigger": {
"main": [[{ "node": "Build payload", "type": "main", "index": 0 }]]
},
"Build payload": {
"main": [[{ "node": "Publish to Wahdx", "type": "main", "index": 0 }]]
},
"Publish to Wahdx": {
"main": [[{ "node": "Published?", "type": "main", "index": 0 }]]
},
"Published?": {
"main": [
[],
[{ "node": "Review failure", "type": "main", "index": 0 }]
]
}
},
"settings": { "executionOrder": "v1" }
}Scheduling instead of publishing now
An immediate post goes to /api/content/post. A scheduled post goes to POST /api/posts with a different body, and the API holds it until the timestamp arrives. The scheduled body uses accountIds as an array, requires mediaType, and adds scheduledAt as an ISO 8601 timestamp. Two rules are worth knowing before you wire it in: the timestamp must be in the future, and it must be within 7 days. A post scheduled beyond that window is rejected when you submit it, not when it is due.
{
"platform": "facebook",
"mediaType": "text",
"content": "Scheduled text post",
"accountIds": ["FACEBOOK_ACCOUNT_ID"],
"scheduledAt": "2026-09-24T09:00:00.000Z"
}Error handling that keeps failures visible
An automation that fails quietly is worse than a manual process, because nobody knows to step in. Three settings cover most of it. Turn on Retry On Fail on the HTTP Request node so a transient network error retries without a rerun. Keep the default behavior where a non-2xx response raises an error, instead of enabling Never Error, so a rejected payload lands in the error branch. Add an error workflow under workflow settings so any unhandled failure sends a message to Slack, Discord, or email. With those three in place, a post that does not publish produces a message that someone reads.
Where this workflow saves time
The value shows up past the first post, because the payload logic, the credential, and the error branch are built once and reused. Once the HTTP Request node works, the same node shapes a morning digest of scheduled content, a nightly sweep that pulls status for the day, or a workflow that turns a spreadsheet row into a post. The publishing call stays the same and the trigger changes, which is the part n8n is good at.
Questions
Does n8n have a TikTok or Instagram publishing node?
No. n8n ships nodes for Facebook, LinkedIn, Reddit, and Twitter, but not for publishing to TikTok, Instagram, Threads, or YouTube. Use the HTTP Request node to call an API that handles those platforms.
How do I authenticate an API key in n8n?
Create a Header Auth credential, set the header name to X-API-Key and the value to your key, then select it on the HTTP Request node. The key stays in the credential and is not written into the workflow JSON.
Can n8n schedule a post for later through the API?
Yes. Send the request to POST /api/posts with a scheduledAt timestamp instead of the immediate publish endpoint. The timestamp must be in the future and within 7 days.
What happens if the publish request fails in n8n?
Keep the node default so a non-2xx response raises an error, enable Retry On Fail for transient errors, and set an error workflow so the failure reaches Slack, Discord, or email instead of stopping silently.
Can one n8n workflow post to several platforms?
Yes. The publish endpoint targets one account per request, so a workflow can loop over account IDs and send one request per platform, or branch into parallel HTTP Request nodes.