社交媒体营销内容生成
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 19 个节点。主要使用 If, Set, Code, GoogleDocs, GoogleSheets 等节点。 使用GPT-4、Google表格和文档自动生成平台特定的营销内容
- •Google Sheets API 凭证
- •OpenAI API Key
{
"id": "9wHCw6CrpD1hr2jR",
"meta": {
"instanceId": "0dce4a8577fc7818af4d5063da85aecc2e78c224380b158fcc7b79f366de29cf",
"templateCredsSetupCompleted": true
},
"name": "社交媒体营销内容生成",
"tags": [
{
"id": "uQd7FWi0SXP9QXfs",
"name": "ConceptRecall",
"createdAt": "2025-08-22T10:41:32.059Z",
"updatedAt": "2025-08-22T10:41:32.059Z"
}
],
"nodes": [
{
"id": "36afa140-35c2-4431-87df-f4129a536b98",
"name": "OpenAI",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
2140,
-820
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4",
"cachedResultName": "GPT-4"
},
"options": {},
"messages": {
"values": [
{
"content": "={{ $json.prompt }}"
}
]
}
},
"credentials": {
"openAiApi": {
"id": "",
"name": "ChatGpt"
}
},
"typeVersion": 1.8
},
{
"id": "2249c864-f1eb-4094-944b-e6244291e18d",
"name": "更新状态触发器",
"type": "n8n-nodes-base.googleSheetsTrigger",
"position": [
-820,
-720
],
"parameters": {
"event": "rowUpdate",
"options": {
"columnsToWatch": [
"Status"
]
},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "",
"cachedResultName": "Topics"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1R1QpTXinI8zLi5MqoiywTE5Kfr_Eb0i5N9kiJKnKn4w",
"cachedResultUrl": "",
"cachedResultName": "Marketing Content"
}
},
"credentials": {
"googleSheetsTriggerOAuth2Api": {
"id": "",
"name": "Google Sheets"
}
},
"typeVersion": 1
},
{
"id": "b6cdcd63-1ceb-48e1-89e6-4fa81f7ad22e",
"name": "过滤出启用状态行",
"type": "n8n-nodes-base.if",
"position": [
-120,
-720
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "52c7fefa-0582-4bab-9e9d-41ebacb8b2ab",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.Status }}",
"rightValue": "Enabled"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "35a85739-721b-41db-8534-e600f2c5675c",
"name": "获取社交平台限制",
"type": "n8n-nodes-base.googleSheets",
"position": [
400,
-740
],
"parameters": {
"options": {
"returnFirstMatch": false
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 106670834,
"cachedResultUrl": "",
"cachedResultName": "Platform Limits"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1R1QpTXinI8zLi5MqoiywTE5Kfr_Eb0i5N9kiJKnKn4w",
"cachedResultUrl": "",
"cachedResultName": "Marketing Content"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "zBY5kSBHNzMp7NUo",
"name": "Google Sheets Read"
}
},
"typeVersion": 4.5
},
{
"id": "e70be485-a1aa-4b79-9e3e-7466503861ba",
"name": "为平台限制创建 JSON",
"type": "n8n-nodes-base.code",
"position": [
1020,
-740
],
"parameters": {
"jsCode": "let obj = {};\n\nfor (const item of $input.all()) {\n const platform = item.json.Platform;\n const min = item.json.Min_Limit;\n const max = item.json.Max_Limit;\n\n obj[platform] = {\n platform,\n min: min,\n max: max\n };\n}\n\n// Return the object inside an array with `json` key (required by n8n)\nreturn [\n {\n json: obj\n }\n];"
},
"typeVersion": 2
},
{
"id": "95b5e43f-8533-4ef6-8511-637df9ac04e2",
"name": "创建提示",
"type": "n8n-nodes-base.set",
"position": [
1680,
-1200
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "0c6acd31-1c0b-4b3b-bd5f-9f61a93fa29a",
"name": "prompt",
"type": "string",
"value": "=You are a marketing content creation AI.\nBased on the provided details, create the requested content in the correct format.\n\nDetails:\nTopic: {{ $('Filter out Enabled Status Row').first().json.Topic }}\nKeywords: {{ $('Filter out Enabled Status Row').first().json.Keyword }}\nTone: {{ $('Filter out Enabled Status Row').first().json.Tone }}\nSocial Platforms: {{ $('Filter out Enabled Status Row').first().json['Social Platform'] }}\n\nCharacter Limits by Platform:\n\nFacebook: {{ $json.Facebook.min }}–{{ $json.Facebook.max }} characters (aim for engaging and concise posts within this range)\n\nInstagram: {{ $json.Instagram.min }}–{{ $json.Instagram.max }} characters (write captivating captions, include hashtags)\n\nTwitter (X): {{ $json.Twitter.min }}–{{ $json.Twitter.max }} characters (strict limit, concise and impactful)\n\nOutput Requirements:\n\nEnsure the post fits within the respective platform's character range (min to max) and follows platform-specific best practices.\n"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "dd2e9db6-353c-4cce-b529-d1011bb5ccfe",
"name": "创建新文档",
"type": "n8n-nodes-base.googleDocs",
"position": [
2960,
-1240
],
"parameters": {
"title": "={{ $('Update Status Trigger').first().json.Topic }} - {{ $now }}",
"folderId": "default"
},
"credentials": {
"googleDocsOAuth2Api": {
"id": "",
"name": "Google Docs account"
}
},
"typeVersion": 2
},
{
"id": "2540c189-db5b-4565-b9e1-9449d4410100",
"name": "更新新创建的文档",
"type": "n8n-nodes-base.googleDocs",
"position": [
3620,
-1240
],
"parameters": {
"actionsUi": {
"actionFields": [
{
"text": "={{ $('OpenAI').first().json.message.content }}",
"action": "insert"
}
]
},
"operation": "update",
"documentURL": "={{ $json.id}}"
},
"credentials": {
"googleDocsOAuth2Api": {
"id": "",
"name": "Google Docs account"
}
},
"typeVersion": 2
},
{
"id": "8d4d09f7-fdaa-4be5-b6b9-c60cbf9790b4",
"name": "在表格中将状态更新为已完成",
"type": "n8n-nodes-base.googleSheets",
"position": [
4520,
-460
],
"parameters": {
"columns": {
"value": {
"ID": "={{ $('Filter out Enabled Status Row').first().json.ID }}",
"Status": "Completed"
},
"schema": [
{
"id": "ID",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Topic",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Topic",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Keyword",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Keyword",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Tone",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Tone",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Social Platform",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Social Platform",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"ID"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "",
"cachedResultName": "Topics"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1R1QpTXinI8zLi5MqoiywTE5Kfr_Eb0i5N9kiJKnKn4w",
"cachedResultUrl": "",
"cachedResultName": "Marketing Content"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "",
"name": "Google Sheets Read"
}
},
"typeVersion": 4.5
},
{
"id": "4cf64e42-2a59-4c7f-9859-042d7bde3e24",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1020,
-1880
],
"parameters": {
"width": 940,
"height": 760,
"content": "# 试试看!"
},
"typeVersion": 1
},
{
"id": "9a8b1fd5-8a5b-4ae7-a325-132117c96d5e",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-900,
-540
],
"parameters": {
"width": 320,
"height": 220,
"content": "## 更新状态触发器"
},
"typeVersion": 1
},
{
"id": "ec82bc9c-157b-44fa-8a64-bcf1c9604fd3",
"name": "便签 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-220,
-540
],
"parameters": {
"width": 320,
"height": 240,
"content": "## 过滤出启用状态行"
},
"typeVersion": 1
},
{
"id": "6adcdfe0-92ca-4595-a30f-2ac065be7887",
"name": "便签 3",
"type": "n8n-nodes-base.stickyNote",
"position": [
300,
-540
],
"parameters": {
"width": 320,
"height": 260,
"content": "## 获取社交平台限制"
},
"typeVersion": 1
},
{
"id": "427346e1-9c72-4e50-8517-051a413e43ae",
"name": "便签 4",
"type": "n8n-nodes-base.stickyNote",
"position": [
900,
-540
],
"parameters": {
"width": 320,
"height": 240,
"content": "## 为平台限制创建 JSON"
},
"typeVersion": 1
},
{
"id": "0391a8ba-3f0b-49e3-8ca6-dc072850cb44",
"name": "便签 5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1560,
-1440
],
"parameters": {
"width": 340,
"height": 200,
"content": "## 创建提示"
},
"typeVersion": 1
},
{
"id": "5741f277-9e76-40c6-a2a5-9f1392d0214e",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
2100,
-560
],
"parameters": {
"width": 340,
"height": 200,
"content": "## OpenAI(消息模型)"
},
"typeVersion": 1
},
{
"id": "23acbbe6-bf71-4780-95d4-001aa818c4bf",
"name": "便签7",
"type": "n8n-nodes-base.stickyNote",
"position": [
2840,
-1000
],
"parameters": {
"width": 340,
"height": 220,
"content": "## 创建新文档"
},
"typeVersion": 1
},
{
"id": "53ae7f55-e557-4e07-b2b8-ee6a3c347073",
"name": "便签8",
"type": "n8n-nodes-base.stickyNote",
"position": [
3500,
-1000
],
"parameters": {
"width": 360,
"height": 220,
"content": "## 更新新创建的文档"
},
"typeVersion": 1
},
{
"id": "c6954d57-c8fa-49ff-93b7-cb953e52f414",
"name": "### 替换 Airtable 连接",
"type": "n8n-nodes-base.stickyNote",
"position": [
4400,
-780
],
"parameters": {
"width": 360,
"height": 220,
"content": "## 在表格中将状态更新为已完成"
},
"typeVersion": 1
}
],
"active": true,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "fef355ed-99a3-4539-b179-25316c72d8a3",
"connections": {
"36afa140-35c2-4431-87df-f4129a536b98": {
"main": [
[
{
"node": "dd2e9db6-353c-4cce-b529-d1011bb5ccfe",
"type": "main",
"index": 0
}
]
]
},
"95b5e43f-8533-4ef6-8511-637df9ac04e2": {
"main": [
[
{
"node": "36afa140-35c2-4431-87df-f4129a536b98",
"type": "main",
"index": 0
}
]
]
},
"dd2e9db6-353c-4cce-b529-d1011bb5ccfe": {
"main": [
[
{
"node": "2540c189-db5b-4565-b9e1-9449d4410100",
"type": "main",
"index": 0
}
]
]
},
"2249c864-f1eb-4094-944b-e6244291e18d": {
"main": [
[
{
"node": "b6cdcd63-1ceb-48e1-89e6-4fa81f7ad22e",
"type": "main",
"index": 0
}
]
]
},
"35a85739-721b-41db-8534-e600f2c5675c": {
"main": [
[
{
"node": "e70be485-a1aa-4b79-9e3e-7466503861ba",
"type": "main",
"index": 0
}
]
]
},
"b6cdcd63-1ceb-48e1-89e6-4fa81f7ad22e": {
"main": [
[
{
"node": "35a85739-721b-41db-8534-e600f2c5675c",
"type": "main",
"index": 0
}
]
]
},
"2540c189-db5b-4565-b9e1-9449d4410100": {
"main": [
[
{
"node": "8d4d09f7-fdaa-4be5-b6b9-c60cbf9790b4",
"type": "main",
"index": 0
}
]
]
},
"e70be485-a1aa-4b79-9e3e-7466503861ba": {
"main": [
[
{
"node": "95b5e43f-8533-4ef6-8511-637df9ac04e2",
"type": "main",
"index": 0
}
]
]
}
}
}如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
ConceptRecall
@conceptrecallConcept Recall is a software development and automation company specializing in AI-driven solutions. We help businesses of all sizes streamline processes and enhance efficiency with custom software, intelligent automation, and powerful AI tools. We have a proven track record of helping Sales & Marketing teams optimize their workflows and achieve their goals. Our expertise lies in leveraging cutting-edge technology to build scalable and sustainable solutions.
分享此工作流