通过PostPulse的AI社交发布器
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 16 个节点。主要使用 Set, Code, Merge, ManualTrigger, OpenAi 等节点。 使用GPT-4.1和PostPulse生成多平台社交媒体帖子
- •OpenAI API Key
{
"id": "FS1zmh5zmaLSg0jw",
"meta": {
"instanceId": "bf246f909c2b838648f333c22c98b9bde186937bc00a5918bd9a27f4ec3914d3",
"templateCredsSetupCompleted": true
},
"name": "AI Social Publisher via PostPulse",
"tags": [],
"nodes": [
{
"id": "c5aa58f2-1be9-405e-93d3-d5011b6dfa05",
"name": "When clicking ‘Execute workflow’",
"type": "n8n-nodes-base.manualTrigger",
"position": [
0,
192
],
"parameters": {},
"typeVersion": 1
},
{
"id": "6900757a-86f1-45ed-a976-e041383e510b",
"name": "Get connected accounts",
"type": "@postpulse/n8n-nodes-postpulse.postPulse",
"position": [
768,
448
],
"parameters": {
"resource": "account"
},
"credentials": {
"postPulseOAuth2Api": {
"id": "nrEYznJjQaKGajyK",
"name": "PostPulse account"
}
},
"typeVersion": 1
},
{
"id": "cb6c4037-384f-4cff-b31e-8d2a1a5b2934",
"name": "idea",
"type": "n8n-nodes-base.set",
"position": [
304,
32
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "1279a713-d71c-44a0-a65e-01679663007c",
"name": "idea",
"type": "string",
"value": "Write a post for my restaurant called \"West Coast\", write that oysters and squid have appeared on our menu and many new items from Asian cuisine, in honor of this, a discount on Asian cuisine and seafood dishes minus 40 percent!"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "b2b9f6da-0586-4fc8-9c7b-88cdf4b638ac",
"name": "AI Content Adapter",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
784,
-80
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1",
"cachedResultName": "GPT-4.1"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "You are an expert in creating content for social media, adapting content for different platforms while maintaining the core message and maximizing engagement for each platform's unique audience. Write in English only."
},
{
"content": "={{$json[\"text\"]}}"
}
]
}
},
"credentials": {
"openAiApi": {
"id": "PSmGB8tfEOzisT6A",
"name": "OpenAi account 2"
}
},
"typeVersion": 1
},
{
"id": "4bf62121-7d1b-45c0-88da-25d61eee5c72",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"position": [
1440,
176
],
"parameters": {
"mode": "combine",
"options": {},
"fieldsToMatchString": "platform"
},
"typeVersion": 3.2
},
{
"id": "ef889214-42cf-4346-afea-fed139035937",
"name": "Publish Post",
"type": "@postpulse/n8n-nodes-postpulse.postPulse",
"position": [
1664,
144
],
"parameters": {
"isDraft": true,
"publications": {
"publication": [
{
"posts": {
"post": [
{
"content": "={{ (function(){\n const fullText = $json.text || '';\n const p = $json.platform;\n let max = 500;\n if(p==='X_TWITTER') max = 280;\n if(p==='BLUE_SKY') max = 300;\n if(fullText.length <= max) return fullText;\n const d = fullText.lastIndexOf('.', max),\n e = fullText.lastIndexOf('!', max),\n q = fullText.lastIndexOf('?', max),\n s = Math.max(d,e,q),\n l = max*0.6;\n if(s>0 && s>=l) return fullText.substring(0,s+1);\n const w = fullText.lastIndexOf(' ', max);\n return fullText.substring(0, w>0?w:max) + '...';\n})() }}\n"
}
]
},
"platformSettings": "={{ (function() { const platformMapping = { 'X_TWITTER': 'TWITTER', 'YOUTUBE': 'YOUTUBE', 'THREADS': 'THREADS', 'TIKTOK': 'TIK_TOK', 'INSTAGRAM': 'INSTAGRAM', 'FACEBOOK': 'FACEBOOK', 'LINKEDIN': 'LINKEDIN', 'BLUE_SKY': 'BLUE_SKY', 'TELEGRAM': 'TELEGRAM' }; return JSON.stringify({ \"type\": platformMapping[$json.platform] }); })() }}",
"socialMediaAccountId": "={{ $json.id }}"
}
]
},
"scheduledTime": "={{$now.toUTC()}}"
},
"credentials": {
"postPulseOAuth2Api": {
"id": "nrEYznJjQaKGajyK",
"name": "PostPulse account"
}
},
"typeVersion": 1
},
{
"id": "a7072966-6003-4e56-a918-8a8e3a195300",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-224,
-416
],
"parameters": {
"width": 624,
"height": 144,
"content": "## AI Social Publisher via PostPulse\nThis workflow automatically adapts your ideas into social media posts with AI, adjusts content for different platforms (Twitter, LinkedIn, TikTok, Telegram, YouTube, etc.), and schedules them as drafts in PostPulse for further review or publishing.\n"
},
"typeVersion": 1
},
{
"id": "87a7b4cb-a406-4afa-9aea-9781419ac9d2",
"name": "Setting Restrictions and Hashtags",
"type": "n8n-nodes-base.code",
"position": [
544,
-32
],
"parameters": {
"jsCode": "// Get the user's idea from the previous Set node\nlet idea = items[0].json.idea;\n\n// Define platforms with character limits\nconst platforms = {\n TELEGRAM: 800,\n TIKTOK: 800,\n LINKEDIN: 800,\n X_TWITTER: 280,\n YOUTUBE: 400\n};\n\n// Return one item per platform with platform name + text\nreturn Object.entries(platforms).map(([platform, maxLength]) => {\n return {\n json: {\n platform: platform, // THIS IS IMPORTANT\n text: `${idea} \\nCreate a post for ${platform} within ${maxLength} characters and add 3-4 relevant hashtags based on the topic. Write in English only.`\n }\n };\n});\n"
},
"typeVersion": 2
},
{
"id": "8cc19030-7f06-4f7a-b01f-cc00cdba5503",
"name": "Unification of Platforms and Text",
"type": "n8n-nodes-base.code",
"position": [
1184,
-48
],
"parameters": {
"jsCode": "// Define platforms in the same порядок, що використовувався перед OpenAI\nconst platforms = [\"TELEGRAM\", \"TIKTOK\", \"LINKEDIN\", \"X_TWITTER\", \"YOUTUBE\"];\n\n// Output array from OpenAI\nconst aiItems = items; // items — це вхідні дані з OpenAI ноди\n\n// We iterate and add platform to each item\nreturn aiItems.map((item, index) => {\n return {\n json: {\n platform: platforms[index] || \"unknown\", // protection in case there are more or less items\n text: item.json?.message?.content || \"\" // text from OpenAI\n }\n };\n});\n"
},
"typeVersion": 2
},
{
"id": "89db40dc-4dbc-46c2-bf97-b52acf6486b4",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
352,
176
],
"parameters": {
"width": 176,
"height": 96,
"content": "## Idea \nEnter your post idea here.\n"
},
"typeVersion": 1
},
{
"id": "472b4241-842b-4bb5-86ba-7b7531d98c68",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
256,
-208
],
"parameters": {
"width": 464,
"content": "## Setting Restrictions and Hashtags \nHere the idea is adapted for each platform with limits and hashtags. \nOptionally, you can change character limits (within each platform’s max), adjust hashtag count, or tweak prompts. \nBy default, everything works fine — changes are optional.\n"
},
"typeVersion": 1
},
{
"id": "08b3e28e-798c-4c6f-abc3-89fbf65a21ef",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
800,
-224
],
"parameters": {
"width": 272,
"height": 128,
"content": "## AI Content Adapter \nThis is the AI node that generates platform-specific content variations. \nIt adapts the idea into ready posts.\n"
},
"typeVersion": 1
},
{
"id": "f171cec9-22dc-4e90-b705-1ca03aca4304",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1200,
-192
],
"parameters": {
"width": 288,
"height": 128,
"content": "## Unification of Platforms and Text \nCombines AI-generated text with the corresponding platform for publishing.\n"
},
"typeVersion": 1
},
{
"id": "47116afa-50d0-4ab0-b1c8-c3346b10c71d",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
640,
304
],
"parameters": {
"width": 352,
"height": 128,
"content": "## PostPulse Get Connected Accounts\nRetrieves your linked social media accounts for publishing posts.\n"
},
"typeVersion": 1
},
{
"id": "ec553756-5bfa-42c6-b2f9-c624b698cea8",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1312,
336
],
"parameters": {
"width": 288,
"height": 144,
"content": "## Merge \nMerges the platform info from connected accounts with the AI-generated posts, preparing data for publishing.\n"
},
"typeVersion": 1
},
{
"id": "d47184a4-74f7-40ec-b79a-2b8b15dba73b",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1600,
16
],
"parameters": {
"width": 304,
"height": 112,
"content": "## Publish Post \nSends the prepared posts to PostPulse as drafts, ready for scheduling or publishing. \n"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "ef6f4402-3c77-4ec4-8df8-b3df02ba6208",
"connections": {
"cb6c4037-384f-4cff-b31e-8d2a1a5b2934": {
"main": [
[
{
"node": "87a7b4cb-a406-4afa-9aea-9781419ac9d2",
"type": "main",
"index": 0
}
]
]
},
"4bf62121-7d1b-45c0-88da-25d61eee5c72": {
"main": [
[
{
"node": "ef889214-42cf-4346-afea-fed139035937",
"type": "main",
"index": 0
}
]
]
},
"b2b9f6da-0586-4fc8-9c7b-88cdf4b638ac": {
"main": [
[
{
"node": "8cc19030-7f06-4f7a-b01f-cc00cdba5503",
"type": "main",
"index": 0
}
]
]
},
"6900757a-86f1-45ed-a976-e041383e510b": {
"main": [
[
{
"node": "4bf62121-7d1b-45c0-88da-25d61eee5c72",
"type": "main",
"index": 1
}
]
]
},
"87a7b4cb-a406-4afa-9aea-9781419ac9d2": {
"main": [
[
{
"node": "b2b9f6da-0586-4fc8-9c7b-88cdf4b638ac",
"type": "main",
"index": 0
}
]
]
},
"8cc19030-7f06-4f7a-b01f-cc00cdba5503": {
"main": [
[
{
"node": "4bf62121-7d1b-45c0-88da-25d61eee5c72",
"type": "main",
"index": 0
}
]
]
},
"c5aa58f2-1be9-405e-93d3-d5011b6dfa05": {
"main": [
[
{
"node": "6900757a-86f1-45ed-a976-e041383e510b",
"type": "main",
"index": 0
},
{
"node": "cb6c4037-384f-4cff-b31e-8d2a1a5b2934",
"type": "main",
"index": 0
}
]
]
}
}
}如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
Dmytro
@dmytro-hnatiukHnatiuk Dmytro is a Content Manager at PostPulse, experienced in copywriting, localization, and social media marketing. Skilled in creating engaging content strategies, managing multi-platform campaigns, and optimizing posts for audience engagement. He also has technical skills in HTML, JavaScript, Node.js, and C#, with a background in cybersecurity. Outside of work, Dmytro is a musician, enjoys playing and listening to music, stays active through sports, and values connecting with people
分享此工作流