从趋势电子表格生成SEO内容到存储(SharePoint/Drive/Dropbox)
高级
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 47 个节点。主要使用 If, Set, Code, Wait, Gmail 等节点。 使用GPT-4o、FAL AI和多存储支持从趋势自动生成SEO内容
前置要求
- •Google 账号和 Gmail API 凭证
- •HTTP Webhook 端点(n8n 会自动生成)
- •可能需要目标 API 的认证凭证
- •OpenAI API Key
使用的节点 (47)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "J5BZO9ezilMiswH7",
"meta": {
"instanceId": "2cf742429c2e3ee4e5a20069d3d8a75208519303b864f026a79464efa726bd95",
"templateCredsSetupCompleted": true
},
"name": "从趋势电子表格生成 SEO 内容到存储(SharePoint/Drive/Dropbox)",
"tags": [
{
"id": "wpMIpESnBZpdPCpj",
"name": "Marketing",
"createdAt": "2025-06-03T11:38:37.020Z",
"updatedAt": "2025-06-03T11:38:37.020Z"
}
],
"nodes": [
{
"id": "5a9c11b3-a0d8-419f-a447-828ca7908f0a",
"name": "读取趋势数据",
"type": "n8n-nodes-base.spreadsheetFile",
"position": [
-4288,
-2048
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "9988898b-23ab-4b37-8bc2-76a97f96c669",
"name": "从趋势中选择主题",
"type": "n8n-nodes-base.code",
"position": [
-4016,
-2048
],
"parameters": {
"jsCode": "// Get all trends from the spreadsheet\nconst trends = $('Read Trends Data').all().map(item => item.json.Trend).filter(trend => trend);\n\n// Random selection\nconst randomTopic = trends[Math.floor(Math.random() * trends.length)];\n\n// For cyclic selection, you could implement a counter mechanism\n// This is a simplified version using random selection\n\nreturn {\n json: {\n Selected_Topic: randomTopic,\n Available_Trends: trends,\n Selection_Method: 'Random'\n }\n};"
},
"typeVersion": 1
},
{
"id": "362b5cd0-5253-4ffe-84dc-d1c286977b7d",
"name": "构建新闻简报",
"type": "n8n-nodes-base.code",
"position": [
-2608,
-2512
],
"parameters": {
"jsCode": "// Get the raw AI output (string with possible markdown)\nlet rawOutput = $node[\"Prepare Newsletter Data\"].json.output;\n\n// Strip markdown code block if present (```json ... ```)\nrawOutput = rawOutput.replace(/```json|```/g, '').trim();\n\n// Parse cleaned JSON string\nconst aiContent = JSON.parse(rawOutput);\n\n// Get template and selected topic\nconst templateContent = $node[\"Extract from Text File\"].json.data;\nconst selectedTopic = $json.Selected_Topic || 'Thema fehlt';\n\n// Helper for safe replacements\nconst getSafe = (obj, key) => obj?.[key] ?? 'undefined';\n\n// Replace placeholders for German content\nlet newsletterContent = templateContent;\nnewsletterContent = newsletterContent.replace(/\\{\\{INTRODUCTION_DE\\}\\}/g, getSafe(aiContent, 'INTRODUCTION_DE'));\nnewsletterContent = newsletterContent.replace(/\\{\\{TOPIC_DE\\}\\}/g, getSafe(aiContent, 'TOPIC_DE'));\nnewsletterContent = newsletterContent.replace(/\\{\\{DESCRIPTION_DE\\}\\}/g, getSafe(aiContent, 'DESCRIPTION_DE'));\nnewsletterContent = newsletterContent.replace(/\\{\\{TEASER1_DE\\}\\}/g, getSafe(aiContent, 'TEASER1_DE'));\nnewsletterContent = newsletterContent.replace(/\\{\\{TEASER2_DE\\}\\}/g, getSafe(aiContent, 'TEASER2_DE'));\nnewsletterContent = newsletterContent.replace(/\\{\\{TEASER3_DE\\}\\}/g, getSafe(aiContent, 'TEASER3_DE'));\nnewsletterContent = newsletterContent.replace(/\\{\\{CTA_DE\\}\\}/g, getSafe(aiContent, 'CTA_DE'));\nnewsletterContent = newsletterContent.replace(/\\{\\{FOOTER_TEXT_DE\\}\\}/g, getSafe(aiContent, 'FOOTER_TEXT_DE'));\nnewsletterContent = newsletterContent.replace(/\\{\\{FOOTER_NAME_DE\\}\\}/g, getSafe(aiContent, 'FOOTER_NAME_DE'));\n\n// Replace placeholders for English content\nnewsletterContent = newsletterContent.replace(/\\{\\{TOPIC_TITLE_EN\\}\\}/g, getSafe(aiContent, 'TOPIC_TITLE_EN'));\nnewsletterContent = newsletterContent.replace(/\\{\\{INTRODUCTION_EN\\}\\}/g, getSafe(aiContent, 'INTRODUCTION_EN'));\nnewsletterContent = newsletterContent.replace(/\\{\\{TOPIC_EN\\}\\}/g, getSafe(aiContent, 'TOPIC_EN'));\nnewsletterContent = newsletterContent.replace(/\\{\\{DESCRIPTION_EN\\}\\}/g, getSafe(aiContent, 'DESCRIPTION_EN'));\nnewsletterContent = newsletterContent.replace(/\\{\\{TEASER1_EN\\}\\}/g, getSafe(aiContent, 'TEASER1_EN'));\nnewsletterContent = newsletterContent.replace(/\\{\\{TEASER2_EN\\}\\}/g, getSafe(aiContent, 'TEASER2_EN'));\nnewsletterContent = newsletterContent.replace(/\\{\\{TEASER3_EN\\}\\}/g, getSafe(aiContent, 'TEASER3_EN'));\nnewsletterContent = newsletterContent.replace(/\\{\\{CTA_EN\\}\\}/g, getSafe(aiContent, 'CTA_EN'));\nnewsletterContent = newsletterContent.replace(/\\{\\{FOOTER_TEXT_EN\\}\\}/g, getSafe(aiContent, 'FOOTER_TEXT_EN'));\nnewsletterContent = newsletterContent.replace(/\\{\\{FOOTER_NAME_EN\\}\\}/g, getSafe(aiContent, 'FOOTER_NAME_EN'));\n\n// Add date if needed (you can add this to template if required)\nnewsletterContent = newsletterContent.replace(/\\{\\{DATE\\}\\}/g, new Date().toLocaleDateString('de-DE'));\n\n// Return final output\nreturn {\n json: {\n newsletter_content: newsletterContent,\n topic: selectedTopic,\n topic_de: getSafe(aiContent, 'TOPIC_DE'),\n topic_en: getSafe(aiContent, 'TOPIC_EN'),\n generated_date: new Date().toISOString(),\n // Include all generated content for debugging/reference\n ai_content: aiContent\n }\n}; "
},
"typeVersion": 1
},
{
"id": "7e3d41de-6fdd-4b7d-8e56-2f967108dad2",
"name": "检查批准状态",
"type": "n8n-nodes-base.if",
"position": [
624,
-2144
],
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $json.data.approved }}",
"value2": "true",
"operation": "contains"
}
]
}
},
"typeVersion": 1
},
{
"id": "85b0946e-4df0-43e5-9615-020b326b85c0",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-3424,
-2320
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "E4PFATctY0kV00hl",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "dca2ef6d-5179-46a4-b916-5f2bfcf79d1e",
"name": "获取趋势 XLSX",
"type": "n8n-nodes-base.microsoftSharePoint",
"position": [
-4512,
-2048
],
"parameters": {
"file": {
"__rl": true,
"mode": "list",
"value": "01M45PWA7UGSM3K5CVPFDYJROPHJOTUYP5",
"cachedResultName": "social-media-trends.xls"
},
"site": {
"__rl": true,
"mode": "list",
"value": "plemeo.sharepoint.com,f304c34c-1252-4b99-a852-059c2036c718,c3bf26ab-bf44-4334-8e5b-e8b680bb9e1d",
"cachedResultName": "plemeo"
},
"folder": {
"__rl": true,
"mode": "list",
"value": "01M45PWAZCILJ3WHMIXBGZA2UP2JMQ5CXO",
"cachedResultName": "Newsletter Workflow"
},
"requestOptions": {}
},
"credentials": {
"microsoftSharePointOAuth2Api": {
"id": "jZkLTQXyVEzxtmp3",
"name": "Microsoft SharePoint account"
}
},
"typeVersion": 1
},
{
"id": "c8d706a3-3bad-4686-a712-350b49314935",
"name": "获取新闻简报模板",
"type": "n8n-nodes-base.microsoftSharePoint",
"position": [
-3024,
-2512
],
"parameters": {
"file": {
"__rl": true,
"mode": "list",
"value": "01M45PWAZJXIV2AOHITFCL5DPA4QV764XS",
"cachedResultName": "newsletter_template.html"
},
"site": {
"__rl": true,
"mode": "list",
"value": "plemeo.sharepoint.com,f304c34c-1252-4b99-a852-059c2036c718,c3bf26ab-bf44-4334-8e5b-e8b680bb9e1d",
"cachedResultName": "plemeo"
},
"folder": {
"__rl": true,
"mode": "list",
"value": "01M45PWAZCILJ3WHMIXBGZA2UP2JMQ5CXO",
"cachedResultName": "Newsletter Workflow"
},
"requestOptions": {}
},
"credentials": {
"microsoftSharePointOAuth2Api": {
"id": "jZkLTQXyVEzxtmp3",
"name": "Microsoft SharePoint account"
}
},
"typeVersion": 1
},
{
"id": "d1466c51-eb0b-4994-ac1a-e234821de281",
"name": "切换",
"type": "n8n-nodes-base.switch",
"position": [
-2688,
-1760
],
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "0de41f03-c4cc-45d8-bb11-0458995cdb2d",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $('Configuration Settings').first().json.ENV_INCLUDE_VIDEO }}",
"rightValue": "true"
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "9ebba67d-70fb-4fcd-b62a-5ea6d97a0a3c",
"operator": {
"type": "boolean",
"operation": "false",
"singleValue": true
},
"leftValue": "={{ $('Configuration Settings').first().json.ENV_INCLUDE_VIDEO }}",
"rightValue": "false"
}
]
}
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "0b9a10a8-c84a-47ba-bd8f-0d01d86f013f",
"name": "获取视频",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
-1824,
-1824
],
"parameters": {
"url": "=https://queue.fal.run/fal-ai/kling-video/requests/{{ $('Create FAL Video').item.json.request_id }}",
"options": {},
"sendQuery": true,
"sendHeaders": true,
"queryParameters": {
"parameters": [
{
"name": "logs",
"value": "true"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Key {{ $('Configuration Settings').first().json.ENV_FALAI_APIKEY }}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "db8e8f18-f2d8-476f-ac83-b365aa67451c",
"name": "创建 FAL 视频",
"type": "n8n-nodes-base.httpRequest",
"position": [
-2320,
-1760
],
"parameters": {
"url": "https://queue.fal.run/fal-ai/kling-video/v2/master/image-to-video",
"method": "POST",
"options": {},
"sendBody": true,
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "prompt",
"value": "={{ $('Parse Fields').item.json.video_prompt }}"
},
{
"name": "image_url",
"value": "={{ $('Switch').item.json.downloadUrl }}"
},
{
"name": "duration",
"value": "={{ $('Configuration Settings').first().json.ENV_FALAI_VIDEO_DURATION }}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Authorization",
"value": "=Key {{ $('Configuration Settings').first().json.ENV_FALAI_APIKEY }}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "2a729954-8812-473e-a0be-0c9399a4c454",
"name": "创建音频",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1376,
-1760
],
"parameters": {
"url": "https://queue.fal.run/fal-ai/lyria2",
"method": "POST",
"options": {},
"sendBody": true,
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "prompt",
"value": "={{ $('Parse Fields').item.json.audio_prompt }}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Key {{ $('Configuration Settings').first().json.ENV_FALAI_APIKEY }}"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "6984c8c5-0f4c-4881-85fd-782b848ca5f6",
"name": "等待音频",
"type": "n8n-nodes-base.wait",
"position": [
-1152,
-1760
],
"webhookId": "ddffe40c-99fa-4a7d-a626-902d8dd363d9",
"parameters": {
"amount": 59
},
"typeVersion": 1.1
},
{
"id": "a172b117-221e-4707-a213-f70397e70418",
"name": "获取音频",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
-944,
-1824
],
"parameters": {
"url": "=https://queue.fal.run/fal-ai/lyria2/requests/{{ $('Create Audio').item.json.request_id }}",
"options": {},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Key {{ $('Configuration Settings').first().json.ENV_FALAI_APIKEY }}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "f4b95592-3803-4dca-a41d-71bd20746cb4",
"name": "创建合并请求",
"type": "n8n-nodes-base.httpRequest",
"position": [
-496,
-1760
],
"parameters": {
"url": "https://queue.fal.run/fal-ai/ffmpeg-api/merge-audio-video",
"method": "POST",
"options": {},
"sendBody": true,
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "video_url",
"value": "={{ $('Get Video').first().json.video.url }}"
},
{
"name": "audio_url",
"value": "={{ $json.audio.url }}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Key {{ $('Configuration Settings').first().json.ENV_FALAI_APIKEY }}"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "f419cf55-ca78-4beb-b62d-910e1db9e841",
"name": "等待合并",
"type": "n8n-nodes-base.wait",
"position": [
-272,
-1760
],
"webhookId": "ffb62d76-30ac-49b9-a29e-f2ff100522b9",
"parameters": {
"amount": 50
},
"typeVersion": 1.1
},
{
"id": "336374fa-8e2d-4402-b152-d68fc407a885",
"name": "获取合并后的视频",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
-64,
-1760
],
"parameters": {
"url": "=https://queue.fal.run/fal-ai/ffmpeg-api/requests/{{ $('Create Merge Request').item.json.request_id }}",
"options": {},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Key {{ $('Configuration Settings').first().json.ENV_FALAI_APIKEY }}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "d4449512-70d3-4856-b5fc-606b7b505ff0",
"name": "合并1",
"type": "n8n-nodes-base.merge",
"position": [
128,
-2192
],
"parameters": {
"mode": "combine",
"options": {
"includeUnpaired": true
},
"combineBy": "combineByPosition",
"numberInputs": 5
},
"typeVersion": 3
},
{
"id": "90347ce0-1238-448d-abf2-96ecb228b8e0",
"name": "配置设置",
"type": "n8n-nodes-base.set",
"position": [
-4752,
-2048
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "e7c84a97-6018-4a2d-a4fa-e7565c5cd063",
"name": "ENV_FALAI_VIDEO_DURATION",
"type": "string",
"value": "={{ $json.video_duration }}"
},
{
"id": "431d7768-f55f-4ea8-b5db-0ca5f90b87ae",
"name": "ENV_APPROVER_EMAIL",
"type": "string",
"value": "test@mail.com"
},
{
"id": "5b27d8be-cf58-481d-bf03-7298f532a250",
"name": "ENV_USECASE",
"type": "string",
"value": "={{ $json.usecase }}"
},
{
"id": "f59f8ef5-853f-4457-a3e1-458f270d1955",
"name": "ENV_INCLUDE_VIDEO",
"type": "boolean",
"value": "={{ $json.include_video }}"
},
{
"id": "aef0d1ef-731d-4b18-b144-c810e33295fe",
"name": "ENV_FALAI_APIKEY",
"type": "string",
"value": "<YOUR_API_KEY>"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "5a58eb7e-1993-4a8e-9d66-53b33b3d11de",
"name": "OpenAI 聊天模型1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-3408,
-1856
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "chatgpt-4o-latest",
"cachedResultName": "chatgpt-4o-latest"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "E4PFATctY0kV00hl",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "fdb7ef7c-f900-4374-b65e-eb14f5c9f4a6",
"name": "生成视频和音频提示",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-3392,
-2064
],
"parameters": {
"text": "=You are a Social Media Content Creator. The goal is to create a video, audio and image that will get posted along with a blog text as a blog post to the website.\nCreate a Prompt for video generation, audio generation and image generation that is in line with the usecase and the topic. The prompt should be maximum 1 sentence (short to medium length). The image should not contain any text or images that have text in it (i.e. computer screen with text). The image prompt should maximum have 110 characters.\n\n** USE-CASE ***\n{{ $('Configuration Settings').first().json.ENV_USECASE }}\n\n** BLOG POST TOPIC ***\n{{ $('Select Topic from Trends').first().json.Selected_Topic }}\n\nOutput the 3 fields in a json format with \"video_prompt\" and \"audio_prompt\" and \"image _prompt\".",
"options": {},
"promptType": "define"
},
"typeVersion": 2
},
{
"id": "0639f081-0402-4534-b448-d23e45032037",
"name": "确定意图",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-5392,
-2048
],
"parameters": {
"text": "=Please extract 3 fields out of the following query. Respond with a valid JSON object.\n1) \"usecase\" - string\n2) \"include_video\" - boolean, if not determined \"false\"\n3) \"video_duration\" - string, if not determined \"5\". If user wants more than 5, set it to \"10\". Possible values: either \"5\" or \"10\". If the user wants less than 5, set it to \"5\".\n\n** USER QUERY ***\n{{$('Receive Request').first().json.body.text }}\n",
"options": {},
"promptType": "define"
},
"typeVersion": 2
},
{
"id": "a6f8688e-95a7-4169-9224-682762a8372b",
"name": "OpenAI 聊天模型2",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-5312,
-1824
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "chatgpt-4o-latest",
"cachedResultName": "chatgpt-4o-latest"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "E4PFATctY0kV00hl",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "aa3ab2ba-e08b-49cf-ac57-3789107435c2",
"name": "解析字段",
"type": "n8n-nodes-base.code",
"position": [
-3024,
-2064
],
"parameters": {
"jsCode": "const item = $input.first();\nlet raw = item.json.output;\n\n// Remove markdown code block wrapper if present\nraw = raw.replace(/```json\\s*|\\s*```/g, \"\");\n\n// Now parse as JSON\nconst prompts = JSON.parse(raw);\n\n// Assign as fields\nitem.json.video_prompt = prompts.video_prompt;\nitem.json.audio_prompt = prompts.audio_prompt;\nitem.json.image_prompt = prompts.image_prompt;\n// Create random 8-character filename\nitem.json.random_filename = Math.random().toString(36).substring(2, 10);\n\nreturn [item];\n"
},
"typeVersion": 2
},
{
"id": "38f5414a-7e8b-4350-8c15-474d44453602",
"name": "解析意图字段",
"type": "n8n-nodes-base.code",
"position": [
-4992,
-2048
],
"parameters": {
"jsCode": "const item = $input.first();\nlet raw = item.json.output;\n\n// Remove markdown code block wrapper if present\nraw = raw.replace(/```json\\s*|\\s*```/g, \"\");\n\n// Now parse as JSON\nconst prompts = JSON.parse(raw);\n\n// Assign as fields\nitem.json.usecase = prompts.usecase;\nitem.json.include_video = prompts.include_video;\nitem.json.video_duration = prompts.video_duration;\n\nreturn [item];\n"
},
"typeVersion": 2
},
{
"id": "50c07304-8521-43f7-9e0c-16fe48ed90e2",
"name": "HTML 转二进制",
"type": "n8n-nodes-base.code",
"position": [
832,
-2144
],
"parameters": {
"jsCode": "// Convert HTML content into binary buffer\nconst html = $('Build Newsletter').first().json.newsletter_content;\nconst fileName = \"test\"\n\nreturn [{\n binary: {\n data: {\n data: Buffer.from(html, 'utf8'),\n mimeType: \"text/html\",\n fileName: `${fileName}.html`\n }\n }\n}];\n"
},
"typeVersion": 2
},
{
"id": "da4da730-32f9-47e8-92a8-2ad2651376eb",
"name": "TXT 转二进制",
"type": "n8n-nodes-base.code",
"position": [
2048,
-2144
],
"parameters": {
"jsCode": "const url = $('Get Merged Video').first().json.video.url;\nconst fileName = \"video_url\";\n\nreturn [{\n binary: {\n data: {\n data: Buffer.from(url, 'utf8'),\n mimeType: \"text/plain\", // ✅ correct MIME type for .txt\n fileName: `${fileName}.txt`\n }\n }\n}];\n"
},
"typeVersion": 2
},
{
"id": "ac207979-019c-47fe-a7a1-d53d70afbb35",
"name": "JPG 转二进制",
"type": "n8n-nodes-base.code",
"position": [
1280,
-2144
],
"parameters": {
"jsCode": "const source = $('Generate Image').first();\n\nreturn [{\n binary: {\n data: source.binary.data\n }\n}];\n"
},
"typeVersion": 2
},
{
"id": "c8684458-4bb9-45ee-af72-adea5b174168",
"name": "如果存在则保存视频 URL",
"type": "n8n-nodes-base.if",
"position": [
1760,
-2128
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "21f6961e-0671-4a85-bddf-939dab2e8cb0",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $('Configuration Settings').first().json.ENV_INCLUDE_VIDEO }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "cdbc12f2-d5f3-4236-a136-b8259f3d12ee",
"name": "上传 HTML",
"type": "n8n-nodes-base.microsoftSharePoint",
"position": [
1056,
-2144
],
"parameters": {
"site": {
"__rl": true,
"mode": "list",
"value": "plemeo.sharepoint.com,f304c34c-1252-4b99-a852-059c2036c718,c3bf26ab-bf44-4334-8e5b-e8b680bb9e1d",
"cachedResultName": "plemeo"
},
"folder": {
"__rl": true,
"mode": "list",
"value": "01M45PWA2FV7FHIIDJBFFLKUYMZUSLERBQ",
"cachedResultName": "SEO Workflow"
},
"fileName": "=/{{ $('Parse Fields').first().json.random_filename }}.html",
"operation": "upload",
"fileContents": "=data",
"requestOptions": {}
},
"credentials": {
"microsoftSharePointOAuth2Api": {
"id": "jZkLTQXyVEzxtmp3",
"name": "Microsoft SharePoint account"
}
},
"typeVersion": 1
},
{
"id": "270a6ba6-83cd-45fd-a733-7799f787b244",
"name": "上传 JPG",
"type": "n8n-nodes-base.microsoftSharePoint",
"position": [
1504,
-2144
],
"parameters": {
"site": {
"__rl": true,
"mode": "list",
"value": "plemeo.sharepoint.com,f304c34c-1252-4b99-a852-059c2036c718,c3bf26ab-bf44-4334-8e5b-e8b680bb9e1d",
"cachedResultName": "plemeo"
},
"folder": {
"__rl": true,
"mode": "list",
"value": "01M45PWA2FV7FHIIDJBFFLKUYMZUSLERBQ",
"cachedResultName": "SEO Workflow"
},
"fileName": "=/{{ $('Parse Fields').first().json.random_filename }}.jpg",
"operation": "upload",
"fileContents": "=data",
"requestOptions": {}
},
"credentials": {
"microsoftSharePointOAuth2Api": {
"id": "jZkLTQXyVEzxtmp3",
"name": "Microsoft SharePoint account"
}
},
"typeVersion": 1
},
{
"id": "61ea58e5-8cf7-40fe-b67b-1f7faa81dcf3",
"name": "上传视频 URL",
"type": "n8n-nodes-base.microsoftSharePoint",
"position": [
2304,
-2144
],
"parameters": {
"site": {
"__rl": true,
"mode": "list",
"value": "plemeo.sharepoint.com,f304c34c-1252-4b99-a852-059c2036c718,c3bf26ab-bf44-4334-8e5b-e8b680bb9e1d",
"cachedResultName": "plemeo"
},
"folder": {
"__rl": true,
"mode": "list",
"value": "01M45PWA2FV7FHIIDJBFFLKUYMZUSLERBQ",
"cachedResultName": "SEO Workflow"
},
"fileName": "={{ $('Parse Fields').first().json.random_filename }}.txt",
"operation": "upload",
"fileContents": "=data",
"requestOptions": {}
},
"credentials": {
"microsoftSharePointOAuth2Api": {
"id": "jZkLTQXyVEzxtmp3",
"name": "Microsoft SharePoint account"
}
},
"typeVersion": 1
},
{
"id": "9ae9a529-370b-4d2d-acb8-ad3e3f1d3913",
"name": "发送消息并等待响应",
"type": "n8n-nodes-base.gmail",
"position": [
400,
-2144
],
"webhookId": "28fef477-06b8-4ddf-b656-23e09ba021f5",
"parameters": {
"sendTo": "={{$('Configuration Settings').first().json.ENV_APPROVER_EMAIL}}",
"message": "={{ $json.newsletter_content }}\n\n<div style=\"margin-top:32px; text-align:center;\">\n <img src=\"{{ $('Switch').item.json.downloadUrl }}\" style=\"max-width:100%; height:auto;\">\n</div>\n\n\n{{ $json.video?.url ? `\n <div style=\"margin-top:24px; text-align:center;\">\n <a href=\"${$json.video.url}\" target=\"_blank\" style=\"font-size:18px; color:#1276d3;\">\n ▶ Watch Video\n </a>\n </div>\n` : '' }}\n",
"options": {},
"subject": "SEO Content Approval",
"operation": "sendAndWait",
"approvalOptions": {
"values": {
"approvalType": "double"
}
}
},
"credentials": {
"gmailOAuth2": {
"id": "fBvSTCpGJatuzJAy",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "c3910d9b-81af-40c2-a0ef-e7953c265d9f",
"name": "设置 Base64 字段",
"type": "n8n-nodes-base.set",
"position": [
-2512,
-2064
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "7ba2499f-53d2-4f5c-9a4a-ee8b61a97d5b",
"name": "base64",
"type": "string",
"value": "={{ $('Generate Image').item.binary.data.data }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "efeefb3f-4856-4136-a230-af280b346468",
"name": "将 Base64 转换为文件",
"type": "n8n-nodes-base.convertToFile",
"position": [
-2288,
-2064
],
"parameters": {
"options": {},
"operation": "toBinary",
"sourceProperty": "base64"
},
"typeVersion": 1.1
},
{
"id": "e493b67f-360c-464c-a8b7-dae374751da7",
"name": "接收请求",
"type": "n8n-nodes-base.webhook",
"position": [
-5616,
-2048
],
"webhookId": "ff9c853e-f76e-4722-ba37-433ad1750e6b",
"parameters": {
"path": "ff9c853e-f76e-4722-ba37-433ad1750e6b",
"options": {
"rawBody": true
},
"httpMethod": "POST"
},
"typeVersion": 2
},
{
"id": "ef936c7c-c40d-450c-9dda-5cf55dac2027",
"name": "准备新闻简报数据",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-3408,
-2512
],
"parameters": {
"text": "=You are a marketing copywriter tasked with creating content for a B2B newsletter on the topic: \"{{ $('Select Topic from Trends').first().json.Selected_Topic }}\".\n\nThe newsletter template uses the following structure for BOTH German and English versions:\n\n**German Content:**\n- {INTRODUCTION_DE}: A 2–3 sentence engaging intro that outlines why the topic is relevant now\n- {TOPIC_DE}: The main topic/headline for the section (max. 8 words)\n- {DESCRIPTION_DE}: A detailed description of what's new or important about this topic (3-4 sentences)\n- {TEASER1_DE}, {TEASER2_DE}, {TEASER3_DE}: Three highlight points showcasing key benefits, insights, or developments (1-2 sentences each)\n- {CTA_DE}: A compelling call-to-action encouraging engagement (max. 20 words)\n- {FOOTER_TEXT_DE}: Professional closing message (1-2 sentences)\n- {FOOTER_NAME_DE}: Sender name/signature\n\n**English Content:**\n- {TOPIC_TITLE_EN}: Main newsletter title in English (max. 8 words)\n- {INTRODUCTION_EN}: English version of the engaging intro (2–3 sentences)\n- {TOPIC_EN}: English version of the main topic/headline (max. 8 words)\n- {DESCRIPTION_EN}: English version of the detailed description (3-4 sentences)\n- {TEASER1_EN}, {TEASER2_EN}, {TEASER3_EN}: English versions of the three highlight points (1-2 sentences each)\n- {CTA_EN}: English version of the call-to-action (max. 20 words)\n- {FOOTER_TEXT_EN}: English version of professional closing message (1-2 sentences)\n- {FOOTER_NAME_EN}: English version sender name/signature\n\nTone: professional but accessible, informative, slightly optimistic \nAudience: decision-makers and professionals in marketing, tech, and innovation roles \nCompany Context: plemeo.ai (AI-powered marketing solutions)\n\nPlease return the result as structured JSON in this format:\n\n```json\n{\n \"INTRODUCTION_DE\": \"\",\n \"TOPIC_DE\": \"\",\n \"DESCRIPTION_DE\": \"\",\n \"TEASER1_DE\": \"\",\n \"TEASER2_DE\": \"\",\n \"TEASER3_DE\": \"\",\n \"CTA_DE\": \"\",\n \"FOOTER_TEXT_DE\": \"\",\n \"FOOTER_NAME_DE\": \"\",\n \"TOPIC_TITLE_EN\": \"\",\n \"INTRODUCTION_EN\": \"\",\n \"TOPIC_EN\": \"\",\n \"DESCRIPTION_EN\": \"\",\n \"TEASER1_EN\": \"\",\n \"TEASER2_EN\": \"\",\n \"TEASER3_EN\": \"\",\n \"CTA_EN\": \"\",\n \"FOOTER_TEXT_EN\": \"\",\n \"FOOTER_NAME_EN\": \"\"\n}\n```",
"options": {},
"promptType": "define"
},
"typeVersion": 2
},
{
"id": "b20d69ab-97c5-4a2e-9926-77252b735ab3",
"name": "从文本文件提取",
"type": "n8n-nodes-base.extractFromFile",
"position": [
-2816,
-2512
],
"parameters": {
"options": {},
"operation": "text"
},
"typeVersion": 1
},
{
"id": "3a93f461-3ad3-4cd3-923c-4e04e1b8fd92",
"name": "生成图像",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"maxTries": 5,
"position": [
-2800,
-2064
],
"parameters": {
"url": "=https://image.pollinations.ai/prompt/{{ $json.image_prompt.replaceAll(' ','-').replaceAll(',','').replaceAll('.','').slice(0,100) }}?width=1080&height=1350&model=flux&nologo=true",
"options": {}
},
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "5cfef6a7-5f21-4493-89df-c699bf927116",
"name": "发送数据到下载服务",
"type": "n8n-nodes-base.httpRequest",
"position": [
-2944,
-1760
],
"parameters": {
"url": "https://operator.velvetsyndicate.de:8090/api/upload-image",
"method": "POST",
"options": {
"allowUnauthorizedCerts": true
},
"sendBody": true,
"contentType": "multipart-form-data",
"bodyParameters": {
"parameters": [
{
"name": "image",
"parameterType": "formBinaryData",
"inputDataFieldName": "data"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "83cc9e0a-71cc-43a2-97d2-ecb92aca6fa0",
"name": "等待视频",
"type": "n8n-nodes-base.wait",
"position": [
-2032,
-1760
],
"webhookId": "153655c9-2cb6-4f82-a497-7233abc21b04",
"parameters": {
"amount": 30
},
"typeVersion": 1.1
},
{
"id": "a4149035-a9f4-4d19-ac57-49b5bac89ed6",
"name": "视频仍在处理中",
"type": "n8n-nodes-base.if",
"position": [
-1600,
-1760
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "ab7cdeb1-40bf-4cc0-bfe6-ccf9a7ee1d1d",
"operator": {
"type": "boolean",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.error.name.toBoolean() }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "23060783-5d2f-4a2e-89fc-3138f0c8d681",
"name": "音频仍在处理中",
"type": "n8n-nodes-base.if",
"position": [
-720,
-1760
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "4369b67d-7975-419a-84b2-acfe4e78bc28",
"operator": {
"type": "boolean",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.error.name.toBoolean() }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "8c4e8075-1c2f-4fa2-a1ab-f858ff9bc426",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-4912,
-2432
],
"parameters": {
"width": 496,
"height": 288,
"content": "### 趋势输入分支"
},
"typeVersion": 1
},
{
"id": "ff1a4101-c39d-418d-a6e4-9f893dabed74",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3408,
-3008
],
"parameters": {
"width": 592,
"height": 368,
"content": "### 新闻简报模板分支"
},
"typeVersion": 1
},
{
"id": "a0ac2239-2eae-4100-bb03-99b8365a038e",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3856,
-1696
],
"parameters": {
"width": 688,
"height": 288,
"content": "### 图像资源分支"
},
"typeVersion": 1
},
{
"id": "93b1ab5a-e522-48b0-9208-41bda43cfb7b",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2688,
-1488
],
"parameters": {
"width": 624,
"height": 304,
"content": "### 视频资源分支"
},
"typeVersion": 1
},
{
"id": "65ebb1ee-baa2-4dae-a780-f3a0b51836e0",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
832,
-1952
],
"parameters": {
"width": 608,
"height": 272,
"content": "### 存储分支"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "18a250cb-ac2d-4101-a49a-400be7b37f7f",
"connections": {
"Merge1": {
"main": [
[
{
"node": "Send message and wait for response",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "Create FAL Video",
"type": "main",
"index": 0
}
],
[
{
"node": "Merge1",
"type": "main",
"index": 0
}
]
]
},
"Get Audio": {
"main": [
[
{
"node": "Audio Still Processing",
"type": "main",
"index": 0
}
]
]
},
"Get Video": {
"main": [
[
{
"node": "Video Still Processing",
"type": "main",
"index": 0
}
]
]
},
"Upload JPG": {
"main": [
[
{
"node": "Save Video URL if exists",
"type": "main",
"index": 0
}
]
]
},
"Upload HTML": {
"main": [
[
{
"node": "JPG to Binary",
"type": "main",
"index": 0
}
]
]
},
"Create Audio": {
"main": [
[
{
"node": "Wait for Audio",
"type": "main",
"index": 0
}
]
]
},
"Parse Fields": {
"main": [
[
{
"node": "Generate Image",
"type": "main",
"index": 0
}
]
]
},
"JPG to Binary": {
"main": [
[
{
"node": "Upload JPG",
"type": "main",
"index": 0
}
]
]
},
"TXT to Binary": {
"main": [
[
{
"node": "Upload Video URL",
"type": "main",
"index": 0
}
]
]
},
"Generate Image": {
"main": [
[
{
"node": "Set Base64 Field",
"type": "main",
"index": 0
}
],
[]
]
},
"HTML to Binary": {
"main": [
[
{
"node": "Upload HTML",
"type": "main",
"index": 0
}
]
]
},
"Wait For Video": {
"main": [
[
{
"node": "Get Video",
"type": "main",
"index": 0
}
]
]
},
"Wait for Audio": {
"main": [
[
{
"node": "Get Audio",
"type": "main",
"index": 0
}
]
]
},
"Wait for Merge": {
"main": [
[
{
"node": "Get Merged Video",
"type": "main",
"index": 0
}
]
]
},
"Get Trends XLSX": {
"main": [
[
{
"node": "Read Trends Data",
"type": "main",
"index": 0
}
]
]
},
"Receive Request": {
"main": [
[
{
"node": "Determine Intent",
"type": "main",
"index": 0
}
]
]
},
"Build Newsletter": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 4
}
]
]
},
"Create FAL Video": {
"main": [
[
{
"node": "Wait For Video",
"type": "main",
"index": 0
}
]
]
},
"Determine Intent": {
"main": [
[
{
"node": "Parse Intent Fields",
"type": "main",
"index": 0
}
]
]
},
"Get Merged Video": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 3
}
]
]
},
"Read Trends Data": {
"main": [
[
{
"node": "Select Topic from Trends",
"type": "main",
"index": 0
}
]
]
},
"Set Base64 Field": {
"main": [
[
{
"node": "Convert Base64 to File",
"type": "main",
"index": 0
}
]
]
},
"Upload Video URL": {
"main": [
[]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Prepare Newsletter Data",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "Generate Video and Audio Prompt",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model2": {
"ai_languageModel": [
[
{
"node": "Determine Intent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Parse Intent Fields": {
"main": [
[
{
"node": "Configuration Settings",
"type": "main",
"index": 0
}
]
]
},
"Create Merge Request": {
"main": [
[
{
"node": "Wait for Merge",
"type": "main",
"index": 0
}
]
]
},
"Check Approval Status": {
"main": [
[
{
"node": "HTML to Binary",
"type": "main",
"index": 0
}
],
[]
]
},
"Audio Still Processing": {
"main": [
[
{
"node": "Wait for Audio",
"type": "main",
"index": 0
}
],
[
{
"node": "Create Merge Request",
"type": "main",
"index": 0
}
]
]
},
"Configuration Settings": {
"main": [
[
{
"node": "Get Trends XLSX",
"type": "main",
"index": 0
}
]
]
},
"Convert Base64 to File": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 1
},
{
"node": "Merge1",
"type": "main",
"index": 2
},
{
"node": "Send Data to Download Service",
"type": "main",
"index": 0
}
]
]
},
"Extract from Text File": {
"main": [
[
{
"node": "Build Newsletter",
"type": "main",
"index": 0
}
]
]
},
"Video Still Processing": {
"main": [
[
{
"node": "Wait For Video",
"type": "main",
"index": 0
}
],
[
{
"node": "Create Audio",
"type": "main",
"index": 0
}
]
]
},
"Get Newsletter Template": {
"main": [
[
{
"node": "Extract from Text File",
"type": "main",
"index": 0
}
]
]
},
"Prepare Newsletter Data": {
"main": [
[
{
"node": "Get Newsletter Template",
"type": "main",
"index": 0
}
]
]
},
"Save Video URL if exists": {
"main": [
[
{
"node": "TXT to Binary",
"type": "main",
"index": 0
}
]
]
},
"Select Topic from Trends": {
"main": [
[
{
"node": "Prepare Newsletter Data",
"type": "main",
"index": 0
},
{
"node": "Generate Video and Audio Prompt",
"type": "main",
"index": 0
}
]
]
},
"Send Data to Download Service": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Generate Video and Audio Prompt": {
"main": [
[
{
"node": "Parse Fields",
"type": "main",
"index": 0
}
]
]
},
"Send message and wait for response": {
"main": [
[
{
"node": "Check Approval Status",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
为 HubSpot 联系人和 SharePoint 生成 AI 撰写的新闻稿和素材
使用 GPT-4o、AI 图像和视频为 HubSpot 和 SharePoint 创建双语新闻稿
If
Set
Code
+15
49 节点plemeo
社交媒体
✨🩷自动化社交媒体内容发布工厂 + 系统提示组合
基于动态系统提示和GPT-4o的AI驱动多平台社交媒体内容工厂
If
Set
Code
+20
100 节点Amit Mehta
内容创作
Instagram自动评论 - 创作者中心
使用GPT-4o、Phantombuster和SharePoint自动评论Instagram帖子
If
Set
Code
+9
39 节点plemeo
社交媒体
LinkedIn自动点赞 - 创作者中心
使用GPT-4o、Phantombuster和SharePoint自动点赞LinkedIn帖子
If
Set
Code
+9
36 节点plemeo
社交媒体
WordPress博客自动化专业版(深度研究)v2.1市场
使用GPT-4o、Perplexity AI和多语言支持自动化SEO优化的博客创建
If
Set
Xml
+27
125 节点Daniel Ng
内容创作
LinkedIn 自动评论 - 创作者中心
使用 GPT-4o 和 Phantombuster 实现 LinkedIn 自动互动评论
If
Set
Code
+9
39 节点plemeo
社交媒体