社交媒体工厂
高级
这是一个Social Media, AI Chatbot领域的自动化工作流,包含 48 个节点。主要使用 If, Set, Gmail, Merge, Switch 等节点。 基于AI的社交媒体内容创建器,支持多平台发布与审批
前置要求
- •Google 账号和 Gmail API 凭证
- •Twitter API 凭证
- •LinkedIn API 凭证
- •Google Drive API 凭证
- •可能需要目标 API 的认证凭证
- •Facebook Graph API 凭证
- •OpenAI API Key
使用的节点 (48)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"templateCredsSetupCompleted": true
},
"name": "社交媒体工厂",
"tags": [],
"nodes": [
{
"id": "de10dba7-e575-403a-a1f4-ec12a0fff90f",
"name": "当收到聊天消息时",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-2780,
140
],
"webhookId": "FAKE-WEBHOOK-ID-CHAT-TRIGGER-REPLACE-ME",
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "f2071d25-2913-49f2-8064-12b37c0223bf",
"name": "便签20",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2860,
500
],
"parameters": {
"color": 7,
"height": 240,
"content": "## LLM"
},
"typeVersion": 1
},
{
"id": "4a7d3f36-789d-40ce-8bd1-59abe0595602",
"name": "便签21",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2860,
760
],
"parameters": {
"color": 7,
"height": 240,
"content": "## 聊天记忆"
},
"typeVersion": 1
},
{
"id": "267020ae-e09b-4792-ab93-007d90c164bc",
"name": "便签22",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2880,
60
],
"parameters": {
"color": 4,
"width": 300,
"height": 280,
"content": "## 👍从这里开始"
},
"typeVersion": 1
},
{
"id": "09d540c9-6485-452e-8af2-6551b1ab7d89",
"name": "Sticky Note32",
"type": "n8n-nodes-base.stickyNote",
"position": [
-280,
220
],
"parameters": {
"color": 2,
"width": 340,
"height": 420,
"content": "## 社交媒体发布路由器"
},
"typeVersion": 1
},
{
"id": "10547372-df1f-4e50-bd11-3f18b276594d",
"name": "便签33",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2560,
580
],
"parameters": {
"color": 6,
"height": 240,
"content": "## 1️⃣ X - Twitter"
},
"typeVersion": 1
},
{
"id": "7dbf2703-f44d-481c-bc72-581cf73a739f",
"name": "X-Twitter",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
-2480,
680
],
"parameters": {
"name": "create_x_twitter_posts_tool",
"fields": {
"values": [
{
"name": "route",
"stringValue": "=xtwitter"
},
{
"name": "user_prompt",
"stringValue": "={{ $('When chat message received').item.json.chatInput }}"
}
]
},
"workflowId": {
"__rl": true,
"mode": "id",
"value": "={{ $workflow.id }}"
},
"description": "使用此工具创建 XTwitter 帖子",
"jsonSchemaExample": ""
},
"typeVersion": 1.2
},
{
"id": "d6791bd0-6c50-46b5-8bf5-b179c13fe12d",
"name": "便签34",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2300,
580
],
"parameters": {
"color": 6,
"height": 240,
"content": "## 2️⃣ Instagram"
},
"typeVersion": 1
},
{
"id": "c7026e0d-1210-48f4-a6a9-9bb02639244a",
"name": "Instagram",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
-2220,
680
],
"parameters": {
"name": "create_instagram_posts_tool",
"fields": {
"values": [
{
"name": "route",
"stringValue": "=instagram"
},
{
"name": "user_prompt",
"stringValue": "={{ $('When chat message received').item.json.chatInput }}"
}
]
},
"workflowId": {
"__rl": true,
"mode": "id",
"value": "={{ $workflow.id }}"
},
"description": "使用此工具创建 Instagram 帖子",
"jsonSchemaExample": ""
},
"typeVersion": 1.2
},
{
"id": "74653483-7c34-4f3f-aab8-a63bef6cb3cb",
"name": "窗口缓冲内存",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-2780,
860
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "a5db3f94-6574-4e88-b275-e51ba8dbc686",
"name": "便签35",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2040,
580
],
"parameters": {
"color": 6,
"height": 240,
"content": "## 3️⃣ Facebook"
},
"typeVersion": 1
},
{
"id": "6bc7fb2c-0744-4ff5-9416-fe622ad51240",
"name": "便签36",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1780,
580
],
"parameters": {
"color": 6,
"height": 240,
"content": "## 4️⃣ LinkedIn"
},
"typeVersion": 1
},
{
"id": "45e33076-dc3f-44fd-96a8-11b9e0818cc6",
"name": "Facebook",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
-1960,
680
],
"parameters": {
"name": "create_facebook_posts_tool",
"fields": {
"values": [
{
"name": "route",
"stringValue": "=facebook"
},
{
"name": "user_prompt",
"stringValue": "={{ $('When chat message received').item.json.chatInput }}"
}
]
},
"workflowId": {
"__rl": true,
"mode": "id",
"value": "={{ $workflow.id }}"
},
"description": "使用此工具创建 Facebook 帖子",
"jsonSchemaExample": ""
},
"typeVersion": 1.2
},
{
"id": "7ef25d66-07cd-4804-a983-7f4407b03f8d",
"name": "LinkedIn",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
-1700,
680
],
"parameters": {
"name": "create_linkedin_posts_tool",
"fields": {
"values": [
{
"name": "route",
"stringValue": "=linkedin"
},
{
"name": "user_prompt",
"stringValue": "={{ $('When chat message received').item.json.chatInput }}"
}
]
},
"workflowId": {
"__rl": true,
"mode": "id",
"value": "={{ $workflow.id }}"
},
"description": "使用此工具创建 LinkedIn 帖子",
"jsonSchemaExample": ""
},
"typeVersion": 1.2
},
{
"id": "60c5ecd3-5978-4f71-bb32-a1532558f7b8",
"name": "便签37",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2300,
840
],
"parameters": {
"color": 6,
"height": 240,
"content": "## 5️⃣ Threads"
},
"typeVersion": 1
},
{
"id": "731eccad-ec70-4d63-a201-b074cf46760a",
"name": "便签38",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2040,
840
],
"parameters": {
"color": 6,
"height": 240,
"content": "## 6️⃣ YouTube Shorts"
},
"typeVersion": 1
},
{
"id": "7e48978f-2f7c-4eb9-9ff1-452de36844fa",
"name": "Short",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
-2220,
940
],
"parameters": {
"name": "create_threads_posts_tool",
"fields": {
"values": [
{
"name": "route",
"stringValue": "=threads"
},
{
"name": "user_prompt",
"stringValue": "={{ $('When chat message received').item.json.chatInput }}"
}
]
},
"workflowId": {
"__rl": true,
"mode": "id",
"value": "={{ $workflow.id }}"
},
"description": "使用此工具创建 Threads 帖子",
"jsonSchemaExample": ""
},
"typeVersion": 1.2
},
{
"id": "2fd22bf2-7a24-463f-bfa5-0bcc6cd22077",
"name": "YouTube Short",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
-1960,
940
],
"parameters": {
"name": "create_youtube_short_tool",
"fields": {
"values": [
{
"name": "route",
"stringValue": "=youtube_short"
},
{
"name": "user_prompt",
"stringValue": "={{ $('When chat message received').item.json.chatInput }}"
},
{
"name": "llm",
"stringValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Value', ``, 'string') }}"
}
]
},
"workflowId": {
"__rl": true,
"mode": "id",
"value": "={{ $workflow.id }}"
},
"description": "使用此工具创建 YouTube Short",
"jsonSchemaExample": ""
},
"typeVersion": 1.2
},
{
"id": "fdb97bf0-e3d4-498c-b577-36112003cb15",
"name": "便签18",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2600,
500
],
"parameters": {
"color": 7,
"width": 1100,
"height": 620,
"content": "## 社交媒体代理工具"
},
"typeVersion": 1
},
{
"id": "80f88e74-0264-4aa8-bde7-5700150a64b7",
"name": "便签41",
"type": "n8n-nodes-base.stickyNote",
"position": [
-280,
-60
],
"parameters": {
"width": 340,
"height": 180,
"content": "💡注意事项"
},
"typeVersion": 1
},
{
"id": "bcea54be-9bf4-478d-b3f2-8c1e86ae51d7",
"name": "便签42",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1020,
460
],
"parameters": {
"color": 4,
"width": 400,
"height": 360,
"content": "# 👍 批准内容后再继续"
},
"typeVersion": 1
},
{
"id": "73235560-b836-4200-b140-d36312ba3341",
"name": "Instagram 图片",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
180,
280
],
"parameters": {
"url": "https://graph.facebook.com/v20.0/[your-unique-id]/media",
"method": "POST",
"options": {},
"sendQuery": true,
"authentication": "predefinedCredentialType",
"queryParameters": {
"parameters": [
{
"name": "image_url",
"value": "={{ $json.output.social_image.medium.url }}"
},
{
"name": "caption",
"value": "={{ $json.output.caption }}"
}
]
},
"nodeCredentialType": "facebookGraphApi"
},
"typeVersion": 4.2
},
{
"id": "8eed482a-3ef0-4e64-bf60-366548bd1fd5",
"name": "X 帖子",
"type": "n8n-nodes-base.twitter",
"onError": "continueRegularOutput",
"position": [
380,
40
],
"parameters": {
"text": "={{ $json.data.social_content.schema.post }}",
"additionalFields": {}
},
"typeVersion": 2,
"alwaysOutputData": true
},
{
"id": "627dc547-62f5-4f44-864f-2f44e41281ce",
"name": "Instagram 帖子",
"type": "n8n-nodes-base.facebookGraphApi",
"onError": "continueRegularOutput",
"position": [
380,
220
],
"parameters": {
"edge": "media_publish",
"node": "[your-unique-id]",
"options": {
"queryParameters": {
"parameter": [
{
"name": "creation_id",
"value": "={{ $json.id }}"
},
{
"name": "caption",
"value": "={{ $('Social Media Publishing Router').item.json.output.caption }}"
}
]
}
},
"graphApiVersion": "v20.0",
"httpRequestMethod": "POST"
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "6f280c9a-c6ac-4348-be63-58a64901b671",
"name": "Facebook 帖子",
"type": "n8n-nodes-base.facebookGraphApi",
"onError": "continueRegularOutput",
"position": [
380,
400
],
"parameters": {
"edge": "photos",
"node": "[your-unique-id]",
"options": {
"queryParameters": {
"parameter": [
{
"name": "message",
"value": "={{ $json.output.post }}\n\n{{ $json.output.call_to_action }}\n"
}
]
}
},
"sendBinaryData": true,
"graphApiVersion": "v20.0",
"httpRequestMethod": "POST",
"binaryPropertyName": "data"
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "b0408663-48e2-48ef-85e3-41ed5f802340",
"name": "LinkedIn 帖子",
"type": "n8n-nodes-base.linkedIn",
"onError": "continueRegularOutput",
"position": [
380,
580
],
"parameters": {
"text": "={{ $json.data.social_content.schema.post }}\n{{ $json.data.social_content.schema.call_to_action }}\n{{ $json.data.social_content.common_schema.hashtags }}\n",
"postAs": "organization",
"organization": "YOUR_LINKEDIN_ORGANIZATION_ID",
"additionalFields": {},
"binaryPropertyName": "=data",
"shareMediaCategory": "IMAGE"
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "dfce0575-a893-4068-b1ce-99b760f0a588",
"name": "用于批准的 Gmail 用户",
"type": "n8n-nodes-base.gmail",
"position": [
-880,
620
],
"webhookId": "FAKE-WEBHOOK-ID-GMAIL-APPROVAL-REPLACE-ME",
"parameters": {
"sendTo": "={{ $env.TELEGRAM_CHAT_ID }}",
"message": "={{ $json.output }}",
"options": {
"limitWaitTime": {
"values": {
"resumeUnit": "minutes",
"resumeAmount": 45
}
}
},
"subject": "=🔥FOR APPROVAL🔥 {{$('Extract as JSON').item.json.data.social_content.root_schema.name }}",
"operation": "sendAndWait",
"approvalOptions": {
"values": {
"approvalType": "double"
}
}
},
"typeVersion": 2.1
},
{
"id": "ea487552-41d5-40f3-9787-47822503fe1a",
"name": "获取社交媒体帖子图片",
"type": "n8n-nodes-base.httpRequest",
"position": [
-620,
880
],
"parameters": {
"url": "={{ $('Extract as JSON').item.json.data.social_image.medium.url }}",
"options": {}
},
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "9fd75add-927f-42a8-b1d6-5a440e5014df",
"name": "gpt-40-mini1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-1400,
800
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "gpt-4o-mini"
},
"options": {
"responseFormat": "text"
}
},
"typeVersion": 1.2
},
{
"id": "a59ecfb3-d774-4d43-a818-e0eaf42a9442",
"name": "便签 6",
"type": "n8n-nodes-base.stickyNote",
"position": [
120,
-60
],
"parameters": {
"color": 6,
"width": 700,
"height": 1240,
"content": "# 📄 发布到社交媒体"
},
"typeVersion": 1
},
{
"id": "3ee1540e-8fc6-48c5-94d6-f44edd487feb",
"name": "社交媒体发布路由器",
"type": "n8n-nodes-base.switch",
"position": [
-180,
320
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "1️⃣X-Twitter",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.route }}",
"rightValue": "xtwitter"
}
]
},
"renameOutput": true
},
{
"outputKey": " 2️⃣Instagram",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "86d44336-bab7-422f-9266-fcb513252d19",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.route }}",
"rightValue": "instagram"
}
]
},
"renameOutput": true
},
{
"outputKey": " 3️⃣Facebook",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "29f37628-6381-46af-babb-74bf00b4a849",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.route }}",
"rightValue": "facebook"
}
]
},
"renameOutput": true
},
{
"outputKey": "4️⃣Linkedin",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "fdb7c8aa-4108-43f6-8f6b-71cd8f383d2a",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.route }}",
"rightValue": "=linkedin"
}
]
},
"renameOutput": true
},
{
"outputKey": "5️⃣Threads",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "956baedd-4a0b-4e41-b85c-ef2c84332bdc",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.route }}",
"rightValue": "threads"
}
]
},
"renameOutput": true
},
{
"outputKey": "6️⃣YouTube Short",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "4d690442-197c-4ff9-b176-b55dfabaecc9",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.route }}",
"rightValue": "youtube_short"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "7a1d0613-f3fa-41e6-bb7d-cd383a6a9f89",
"name": "准备邮件内容",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1380,
620
],
"parameters": {
"text": "=Use the HTML template and populate [fields] as required from this: {{ $json.data.social_content.toJsonString() }}\n-----\nOnly output HTML without code block tags, preamble or further explanation in the format provided.\n\n## HTML Template\n<table style=\"max-width:640px;min-width:320px;width:100%;border-collapse:collapse;font-family:Arial,sans-serif;margin:20px auto\">\n <tbody>\n <tr>\n <td colspan=\"2\" style=\"background-color:#ffffff;padding:15px;text-align:left\">\n <img src=\"{{ $json.data.google_drive_image.thumbnailLink }}\" alt=\"{{ $json.data.social_content.root_schema.name }}\" style=\"max-width:100%;height:auto;\">\n </td>\n </tr>\n <tr>\n <td colspan=\"2\" style=\"background-color:#efefef;padding:15px;font-size:20px;text-align:left;font-weight:bold\">\n {{ $json.data.social_content.root_schema.name }}\n </td>\n </tr>\n <tr>\n <td style=\"background-color:#f9f9f9;padding:15px;width:30%;text-align:left\"><strong>[label_1]:</strong></td>\n <td style=\"background-color:#f9f9f9;padding:15px;text-align:left\">[content_1]</td>\n </tr>\n <tr>\n <td style=\"background-color:#f1f1f1;padding:15px;text-align:left\"><strong>[label_2]:</strong></td>\n <td style=\"background-color:#f1f1f1;padding:15px;text-align:left\">[content_2]</td>\n </tr>\n\n [continue the pattern ...]\n\n <tr>\n <td colspan=\"2\" style=\"background-color:#efefef;padding:15px;text-align:left\">\n <strong>[footer_label]:</strong> [footer_content]\n </td>\n </tr>\n </tbody>\n</table>\n\n",
"options": {},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "381a7aba-e9e1-4ff8-beac-8f2b13cdeb11",
"name": "是否已批准?",
"type": "n8n-nodes-base.if",
"position": [
-880,
880
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "313cec9b-aad5-4f9c-a209-afe83af53df0",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.data.approved }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "7ec33130-bbb4-4fa7-a76c-87516c5cbe4a",
"name": "文件 ID",
"type": "n8n-nodes-base.set",
"position": [
-1060,
140
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "efb1c03b-8465-443d-a442-b76b8cd86a73",
"name": "output",
"type": "object",
"value": "={{ $json.output }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "f66196c1-fc5b-4a0e-8b47-3f486ffb7a83",
"name": "从 Google Drive 获取社交媒体帖子",
"type": "n8n-nodes-base.googleDrive",
"position": [
-880,
140
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.output.response }}"
},
"options": {},
"operation": "download"
},
"typeVersion": 3
},
{
"id": "fc593f3a-edcb-4c1c-9105-0c4e81f4d812",
"name": "提取为 JSON",
"type": "n8n-nodes-base.extractFromFile",
"position": [
-700,
140
],
"parameters": {
"options": {},
"operation": "fromJson"
},
"typeVersion": 1
},
{
"id": "72ea1c32-5abc-48ac-804c-156c5f93a69e",
"name": "合并图片和帖子内容",
"type": "n8n-nodes-base.merge",
"position": [
-440,
380
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineByPosition"
},
"typeVersion": 3
},
{
"id": "44d91742-53cd-4592-ac71-61bee629a01f",
"name": "便签10",
"type": "n8n-nodes-base.stickyNote",
"position": [
280,
760
],
"parameters": {
"width": 320,
"height": 380,
"content": ""
},
"typeVersion": 1
},
{
"id": "d9d29645-69c1-44e6-a4a1-6c5fd5d84f18",
"name": "在此处实现 Threads",
"type": "n8n-nodes-base.noOp",
"position": [
380,
800
],
"parameters": {},
"typeVersion": 1
},
{
"id": "3ea05d00-072d-488a-a95b-671c7de8f450",
"name": "在此处实现 YouTube Shorts",
"type": "n8n-nodes-base.noOp",
"position": [
380,
960
],
"parameters": {},
"typeVersion": 1
},
{
"id": "258e1d87-d285-4eb9-8321-909a5968d61c",
"name": "X 响应",
"type": "n8n-nodes-base.set",
"position": [
580,
40
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "4015bb20-da3b-4781-ab8c-46f4d826138e",
"name": "output",
"type": "string",
"value": "={{ $('Social Media Publishing Router').item.json.data.route }}\n\n{{ $('Social Media Publishing Router').item.json.data.social_content.root_schema.name }}\n\n{{ $('Social Media Publishing Router').item.json.data.social_content.schema.post }}\n\n.item.json.data.social_image.thumb.url }})"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "95fd0a62-1d30-4a4c-9a5c-4a2ddbe48a76",
"name": "Instagram 响应",
"type": "n8n-nodes-base.set",
"position": [
580,
220
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "da8fe7e3-e74d-46b6-91eb-1bf4432b73b0",
"name": "output",
"type": "string",
"value": "={{ $('Social Media Publishing Router').item.json.data.route }} \n{{ $('Social Media Publishing Router').item.json.data.social_content.root_schema.name }}\n{{ $('Social Media Publishing Router').item.json.data.social_content.schema.caption }}\n.item.json.data.social_image.thumb.url }})"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "d087cdfb-5e4f-4f46-bfd0-46c9a4994134",
"name": "Facebook 响应",
"type": "n8n-nodes-base.set",
"position": [
580,
400
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "e349e314-2967-456f-856a-85727bdf94f3",
"name": "output",
"type": "string",
"value": "={{ $('Social Media Publishing Router').item.json.data.route }}\n\n{{ $('Social Media Publishing Router').item.json.data.social_content.root_schema.name }}\n\n{{ $('Social Media Publishing Router').item.json.data.social_content.schema.post }}\n\n.item.json.data.social_image.thumb.url }})"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "fea22992-fd38-46e0-b7c7-75a86a1d68bb",
"name": "LinkedIn 响应",
"type": "n8n-nodes-base.set",
"position": [
580,
580
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "88404fde-a41b-4da5-bbdb-0e41b879a52c",
"name": "output",
"type": "string",
"value": "={{ $('Social Media Publishing Router').item.json.data.route }}\n\n{{ $('Social Media Publishing Router').item.json.data.social_content.root_schema.name }}\n\n{{ $('Social Media Publishing Router').item.json.data.social_content.schema.post }}\n\n.item.json.data.social_image.thumb.url }})\n"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "e49c8c85-e81e-4da3-8b15-bc865f75f2d2",
"name": "便签13",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2380,
20
],
"parameters": {
"width": 620,
"height": 320,
"content": "# 社交媒体路由器代理"
},
"typeVersion": 1
},
{
"id": "07c69cfa-f8b1-4562-b242-8ea85f4670a5",
"name": "🤖社交媒体路由器代理",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-2200,
140
],
"parameters": {
"text": "=You are a helpful assistant that uses the provided tools. Respond with a valid JSON object.\n\nUser prompt: {{ $json.chatInput }}",
"options": {
"systemMessage": "## RULES\n- You do not answer the users questions directly and your sole purpose is to call the appropriate tool to and provide the verbatim response.\n\n## TOOLS\n- create_x_twitter_posts_tool: Use this tool to create X-Twitter posts\n- create_instagram_posts_tool: Use this tool to create Instagram posts\n- create_facebook_posts_tool: Use this tool to create Facebook posts\n- create_linkedin_posts_tool: Use this tool to create LinkedIn posts\n- create_threads_posts_tool: Use this tool to create Threads posts\n- create_youtube_short_tool: Use this tool to create a YouTube short\n\n\n"
},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "8b19c050-88ad-472e-8e3e-32803759e257",
"name": "便签14",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1460,
500
],
"parameters": {
"width": 400,
"height": 440,
"content": "## 准备 HTML 格式的邮件批准内容"
},
"typeVersion": 1
},
{
"id": "c1545e70-b577-4dfe-92c0-e7aa9523b9f3",
"name": "gpt-4o",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-2780,
600
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {
"responseFormat": "json_object"
}
},
"typeVersion": 1.2
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "",
"connections": {
"Short": {
"ai_tool": [
[
{
"node": "🤖Social Media Router Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"X Post": {
"main": [
[
{
"node": "X Response",
"type": "main",
"index": 0
}
]
]
},
"gpt-4o": {
"ai_languageModel": [
[
{
"node": "🤖Social Media Router Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"File Id": {
"main": [
[
{
"node": "Get Social Post from Google Drive",
"type": "main",
"index": 0
}
]
]
},
"Facebook": {
"ai_tool": [
[
{
"node": "🤖Social Media Router Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"LinkedIn": {
"ai_tool": [
[
{
"node": "🤖Social Media Router Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"X-Twiter": {
"ai_tool": [
[
{
"node": "🤖Social Media Router Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Instagram": {
"ai_tool": [
[
{
"node": "🤖Social Media Router Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Is Approved?": {
"main": [
[
{
"node": "Get Social Post Image",
"type": "main",
"index": 0
}
]
]
},
"gpt-40-mini1": {
"ai_languageModel": [
[
{
"node": "Prepare Email Contents",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Facebook Post": {
"main": [
[
{
"node": "Facebook Response",
"type": "main",
"index": 0
}
]
]
},
"LinkedIn Post": {
"main": [
[
{
"node": "LinkedIn Response",
"type": "main",
"index": 0
}
]
]
},
"YouTube Short": {
"ai_tool": [
[
{
"node": "🤖Social Media Router Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Extract as JSON": {
"main": [
[
{
"node": "Merge Image and Post Contents",
"type": "main",
"index": 0
},
{
"node": "Prepare Email Contents",
"type": "main",
"index": 0
}
]
]
},
"Instagram Image": {
"main": [
[
{
"node": "Instragram Post",
"type": "main",
"index": 0
}
]
]
},
"Instragram Post": {
"main": [
[
{
"node": "Instagram Response",
"type": "main",
"index": 0
}
]
]
},
"Window Buffer Memory": {
"ai_memory": [
[
{
"node": "🤖Social Media Router Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Get Social Post Image": {
"main": [
[
{
"node": "Merge Image and Post Contents",
"type": "main",
"index": 1
}
]
]
},
"Prepare Email Contents": {
"main": [
[
{
"node": "Gmail User for Approval",
"type": "main",
"index": 0
}
]
]
},
"Gmail User for Approval": {
"main": [
[
{
"node": "Is Approved?",
"type": "main",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "🤖Social Media Router Agent",
"type": "main",
"index": 0
}
]
]
},
"Merge Image and Post Contents": {
"main": [
[
{
"node": "Social Media Publishing Router",
"type": "main",
"index": 0
}
]
]
},
"🤖Social Media Router Agent": {
"main": [
[
{
"node": "File Id",
"type": "main",
"index": 0
}
]
]
},
"Social Media Publishing Router": {
"main": [
[
{
"node": "X Post",
"type": "main",
"index": 0
}
],
[
{
"node": "Instagram Image",
"type": "main",
"index": 0
}
],
[
{
"node": "Facebook Post",
"type": "main",
"index": 0
}
],
[
{
"node": "LinkedIn Post",
"type": "main",
"index": 0
}
],
[
{
"node": "Implement Threads Here",
"type": "main",
"index": 0
}
],
[
{
"node": "Implement YouTube Shorts Here",
"type": "main",
"index": 0
}
]
]
},
"Get Social Post from Google Drive": {
"main": [
[
{
"node": "Extract as JSON",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 社交媒体, AI 聊天机器人
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
✨🩷自动化社交媒体内容发布工厂 + 系统提示组合
使用GPT-4o为6个平台生成平台优化的社交媒体内容
If
Set
Code
+20
100 节点Luan Correia
社交媒体
✨🩷自动化社交媒体内容发布工厂 + 系统提示组合
基于动态系统提示和GPT-4o的AI驱动多平台社交媒体内容工厂
If
Set
Code
+20
100 节点Amit Mehta
内容创作
✨🩷 自动化社交媒体内容发布工厂 + 系统提示组合
✨🩷 自动化社交媒体内容发布工厂 + 系统提示组合
If
Set
Code
+20
100 节点Joseph LePage
营销
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
使用 Redis 和 Anthropic 在 Go High Level 中自动化 WhatsApp 回复
使用 Go High Level、Redis 和 Anthropic 自动化 WhatsApp 回复
If
Set
Code
+15
31 节点Jorge Martínez
AI 聊天机器人
在Braze中更新现有邮件模板
使用AI为Instagram、Facebook、LinkedIn和X自动化社交媒体内容
Set
Gmail
Merge
+22
73 节点LukaszB
设计