The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "40_40_PUBLISH_SOCIAL",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "publish-social",
"responseMode": "responseNode",
"options": {}
},
"id": "webhook-trigger",
"name": "Webhook Trigger",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
240,
300
]
},
{
"parameters": {
"jsCode": "// Input: { pipeline_job_id, content_text, image_url?, platforms? }\nconst body = $input.first().json.body ?? $input.first().json;\n\nif (!body.pipeline_job_id) throw new Error('pipeline_job_id fehlt');\nif (!body.content_text) throw new Error('content_text fehlt');\n\nconst platforms = body.platforms ?? ['instagram', 'linkedin', 'twitter'];\n\nreturn [{ json: {\n pipeline_job_id: body.pipeline_job_id,\n content_text: body.content_text,\n image_url: body.image_url ?? null,\n platforms,\n platformsStr: platforms.join(',')\n} }];"
},
"id": "prepare-post",
"name": "Post vorbereiten",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
460,
300
]
},
{
"parameters": {
"method": "POST",
"url": "https://postiz.automation-plus-ki.de/api/posts",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $env.POSTIZ_API_TOKEN }}"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"contentType": "json",
"bodyParameters": {
"parameters": [
{
"name": "content",
"value": "={{ $json.content_text }}"
},
{
"name": "platforms",
"value": "={{ $json.platforms }}"
},
{
"name": "mediaUrls",
"value": "={{ $json.image_url ? [$json.image_url] : [] }}"
},
{
"name": "publishNow",
"value": true
}
]
},
"options": {
"timeout": 30000
}
},
"id": "postiz-publish",
"name": "Postiz: Post ver\u00f6ffentlichen",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
680,
300
]
},
{
"parameters": {
"jsCode": "const postizResp = $input.first().json;\nconst prepareData = $('Post vorbereiten').item.json;\n\n// Postiz gibt Einzel-Post oder Array zur\u00fcck\nconst posts = Array.isArray(postizResp) ? postizResp : [postizResp];\n\nreturn posts.map(p => ({ json: {\n pipeline_job_id: prepareData.pipeline_job_id,\n platform: p.platform ?? 'social',\n postiz_post_id: p.id ?? p.postId ?? '',\n post_url: p.url ?? p.postUrl ?? '',\n status: p.status === 'published' ? 'published' : 'pending',\n published_at: new Date().toISOString()\n} }));"
},
"id": "map-results",
"name": "Ergebnisse mappen",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
900,
300
]
},
{
"parameters": {
"method": "POST",
"url": "https://directus.automation-plus-ki.de/items/440_publish_log",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer ={{ $env.DIRECTUS_TOKEN }}"
}
]
},
"sendBody": true,
"contentType": "json",
"bodyParameters": {
"parameters": [
{
"name": "pipeline_job_id",
"value": "={{ $json.pipeline_job_id }}"
},
{
"name": "platform",
"value": "={{ $json.platform }}"
},
{
"name": "post_url",
"value": "={{ $json.post_url }}"
},
{
"name": "postiz_post_id",
"value": "={{ $json.postiz_post_id }}"
},
{
"name": "status",
"value": "={{ $json.status }}"
},
{
"name": "published_at",
"value": "={{ $json.published_at }}"
},
{
"name": "created_at",
"value": "={{ $now.toISO() }}"
}
]
}
},
"id": "nocodb-log",
"name": "NocoDB: publish_log schreiben",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1120,
300
]
},
{
"parameters": {
"method": "PATCH",
"url": "https://directus.automation-plus-ki.de/items/400_content_pipeline",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer ={{ $env.DIRECTUS_TOKEN }}"
}
]
},
"sendBody": true,
"contentType": "json",
"bodyParameters": {
"parameters": [
{
"name": "Id",
"value": "={{ $('Post vorbereiten').item.json.pipeline_job_id }}"
},
{
"name": "stage",
"value": "done"
},
{
"name": "status",
"value": "done"
},
{
"name": "updated_at",
"value": "={{ $now.toISO() }}"
}
]
}
},
"id": "update-pipeline",
"name": "Pipeline: done setzen",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1340,
300
]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={ \"ok\": true, \"pipeline_job_id\": \"{{ $('Post vorbereiten').item.json.pipeline_job_id }}\", \"platforms\": \"{{ $('Post vorbereiten').item.json.platformsStr }}\" }"
},
"id": "respond-ok",
"name": "Response OK",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
1560,
300
]
}
],
"connections": {
"Webhook Trigger": {
"main": [
[
{
"node": "Post vorbereiten",
"type": "main",
"index": 0
}
]
]
},
"Post vorbereiten": {
"main": [
[
{
"node": "Postiz: Post ver\u00f6ffentlichen",
"type": "main",
"index": 0
}
]
]
},
"Postiz: Post ver\u00f6ffentlichen": {
"main": [
[
{
"node": "Ergebnisse mappen",
"type": "main",
"index": 0
}
]
]
},
"Ergebnisse mappen": {
"main": [
[
{
"node": "NocoDB: publish_log schreiben",
"type": "main",
"index": 0
}
]
]
},
"NocoDB: publish_log schreiben": {
"main": [
[
{
"node": "Pipeline: done setzen",
"type": "main",
"index": 0
}
]
]
},
"Pipeline: done setzen": {
"main": [
[
{
"node": "Response OK",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1",
"saveManualExecutions": true,
"callerPolicy": "workflowsFromSameOwner"
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"versionId": "40_40_PUBLISH_SOCIAL_v1",
"tags": [
{
"name": "publishing"
}
]
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
40_40_PUBLISH_SOCIAL. Uses httpRequest. Webhook trigger; 7 nodes.
Source: https://github.com/timo-goetz-ai/apki-core-platform/blob/main/automations/n8n-workflows/content-pipeline/40_40_PUBLISH_SOCIAL.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This n8n template provides enterprise-level version control for your workflows using GitHub integration. Stop losing hours to broken workflows and manual exports – get proper commit history, visual di
This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .
eek-Go v2 (Batch-Then-Review). Uses httpRequest. Webhook trigger; 75 nodes.
This workflow receives webhook requests from a content calendar and uses the X API v2 to publish text posts, threads, image/video posts, and polls, as well as delete existing posts and run a credentia
This workflow acts as a central API gateway for all technical indicator agents in the Binance Spot Market Quant AI system. It listens for incoming webhook requests and dynamically routes them to the c