我的工作流
高级
这是一个Content Creation、AI Chatbot领域的自动化工作流,包含 40 个节点。主要使用 Set、Switch、GoogleDrive、HttpRequest、ConvertToFile 等节点。 OpenAI模型模板:GPT-4和DALL-E服务概览
前置要求
- •Google Drive API 凭证
- •可能需要目标 API 的认证凭证
- •OpenAI API Key
使用的节点 (40 个)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "ff5e935d40d31539407ab2081d28e163b638623cf2d3003befde2738cb4d5117",
"templateCredsSetupCompleted": true
},
"name": "我的工作流",
"tags": [],
"nodes": [
{
"id": "de133b2f-126e-4a46-bbe5-befeb657eab9",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2580,
-1540
],
"parameters": {
"width": 350,
"height": 180,
"content": "## 🌈 渐变图像生成器"
},
"typeVersion": 1
},
{
"id": "f876e7f3-b05a-4fe4-9970-9a048c6142d6",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2600,
-1240
],
"parameters": {
"width": 350,
"content": "## 🎯 标志生成器"
},
"typeVersion": 1
},
{
"id": "20ae1a05-49c7-429e-a460-bf100fa88815",
"name": "便签7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2600,
-920
],
"parameters": {
"width": 350,
"height": 180,
"content": "## 📋 风格指南生成器"
},
"typeVersion": 1
},
{
"id": "d7e251c2-6af2-40b5-b61f-4bc20d061e2a",
"name": "便签8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2580,
-520
],
"parameters": {
"width": 350,
"height": 180,
"content": "## ✏️ 设计编辑器/修订器"
},
"typeVersion": 1
},
{
"id": "77de1bf1-f332-4122-a3e0-d7141ec3f5bb",
"name": "便签9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2560,
60
],
"parameters": {
"width": 380,
"height": 200,
"content": "## 🤖 AI 平面设计师代理"
},
"typeVersion": 1
},
{
"id": "1ea2e7f7-2e0c-4ba9-bbd2-32405b2b8796",
"name": "编辑/修订图像",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
-860,
280
],
"parameters": {
"workflowId": {
"__rl": true,
"mode": "list",
"value": "xRfWilBLzcDW8L3y",
"cachedResultName": "Design Editor/Revisor (AI Graphic Designer)"
},
"description": "调用此工具来编辑或修订图像。仅在明确要求更改某些内容时调用。",
"workflowInputs": {
"value": {
"fileName": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('fileName', ``, 'string') }}",
"imageType": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('imageType', ``, 'string') }}",
"resolution": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('resolution', ``, 'string') }}",
"imagePrompt": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('imagePrompt', ``, 'string') }}",
"previousImageUrl": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('previousImageUrl', ``, 'string') }}"
},
"schema": [
{
"id": "imagePrompt",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "imagePrompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "resolution",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "resolution",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "imageType",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "imageType",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "fileName",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "fileName",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "previousImageUrl",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "previousImageUrl",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"typeVersion": 2.2
},
{
"id": "666db8e0-1b34-410d-b568-917865b07bb2",
"name": "放大图像",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
-1000,
280
],
"parameters": {
"url": "https://api.replicate.com/v1/models/google/upscaler/predictions",
"method": "POST",
"options": {},
"jsonBody": "={\n \"input\": {\n \"image\": \"{{ $fromAI(\"inputImageUrl\")}}\",\n \"upscale_factor\": \"{{$fromAI(\"upscale_factor\")}}\"\n }\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"toolDescription": "Call this tool to upscale an image.\n\nFor upscale_factor, you can write x2 or x4. Nothing else.\n\nReturn the response[0].output parameter wrapped in nice markdown (atx) format for the user.",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer <your-replicate-api-key-here>"
},
{
"name": "Prefer",
"value": "wait"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "52ad87b4-d9a3-480a-9275-7ade155dbb16",
"name": "生成渐变背景",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
-1140,
280
],
"parameters": {
"workflowId": {
"__rl": true,
"mode": "list",
"value": "kZ2VRoLIX2txywbe",
"cachedResultName": "Gradient Image (AI Graphic Designer)"
},
"description": "调用此工具来生成渐变背景。然后以 markdown (atx) 格式返回 webViewLink,以便用户可以点击它并打开新标签页。",
"workflowInputs": {
"value": {
"fileName": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('fileName', ``, 'string') }}",
"imageType": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('imageType', ``, 'string') }}",
"resolution": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('resolution', ``, 'string') }}",
"imagePrompt": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('imagePrompt', ``, 'string') }}"
},
"schema": [
{
"id": "imagePrompt",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "imagePrompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "resolution",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "resolution",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "imageType",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "imageType",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "fileName",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "fileName",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"typeVersion": 2.2
},
{
"id": "ee740103-8935-4d6f-a504-eeb404ea9294",
"name": "生成风格指南",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
-1280,
280
],
"parameters": {
"workflowId": {
"__rl": true,
"mode": "list",
"value": "kjr6b4WQwpr6g9h5",
"cachedResultName": "Style Guide Generator (AI Graphic Designer)"
},
"description": "调用此工具来生成风格指南。然后以 markdown (atx) 格式返回 webViewLink,以便用户可以点击它并打开新标签页。",
"workflowInputs": {
"value": {
"fileName": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('fileName', ``, 'string') }}",
"imageType": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('imageType', ``, 'string') }}",
"resolution": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('resolution', ``, 'string') }}",
"imagePrompt": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('imagePrompt', ``, 'string') }}"
},
"schema": [
{
"id": "imagePrompt",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "imagePrompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "resolution",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "resolution",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "imageType",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "imageType",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "fileName",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "fileName",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"typeVersion": 2.2
},
{
"id": "45d6d6d7-1ed8-4d10-8321-91dd6bebe507",
"name": "生成标志",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
-1420,
280
],
"parameters": {
"workflowId": {
"__rl": true,
"mode": "list",
"value": "6XCAq81V1voPR3kB",
"cachedResultName": "Logo Generator (AI Graphic Designer)"
},
"description": "调用此工具来生成标志。然后以 markdown (atx) 格式返回 webViewLink,以便用户可以点击它并打开新标签页。",
"workflowInputs": {
"value": {
"fileName": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('fileName', ``, 'string') }}",
"imageType": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('imageType', ``, 'string') }}",
"resolution": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('resolution', ``, 'string') }}",
"imagePrompt": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('imagePrompt', ``, 'string') }}"
},
"schema": [
{
"id": "imagePrompt",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "imagePrompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "resolution",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "resolution",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "imageType",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "imageType",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "fileName",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "fileName",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"typeVersion": 2.2
},
{
"id": "6e7a815f-1306-4366-a552-c7beb915f978",
"name": "简单记忆",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-1560,
280
],
"parameters": {
"contextWindowLength": 10
},
"typeVersion": 1.3
},
{
"id": "09b4bdfc-2f77-4f78-9977-8a151414a313",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-1680,
280
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1",
"cachedResultName": "gpt-4.1"
},
"options": {
"temperature": 0.7
}
},
"typeVersion": 1.2
},
{
"id": "8adccc61-ef34-40b3-82b4-c601030a3e2d",
"name": "当收到聊天消息时",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-1580,
20
],
"webhookId": "cbffc534-579a-4623-9f13-34537867d082",
"parameters": {
"public": true,
"options": {
"title": "Design Agent 👋",
"subtitle": "Message anytime!",
"customCss": ":root {\n /* Colors */\n --chat--color-primary: #e74266; /* leave as accent or swap if desired */\n --chat--color-secondary: #A3CEF1; /* pastel blue */\n --chat--color-secondary-shade-50: #8EBEE8;\n --chat--color-secondary-shade-100: #78ADDE;\n --chat--color-white: #ffffff;\n --chat--color-light: #f7f9fb;\n --chat--color-light-shade-50: #eef1f5;\n --chat--color-medium: #d2d4d9;\n --chat--color-dark: #101330;\n --chat--color-disabled: #a0a4ab;\n --chat--color-typing: #404040;\n\n /* Base Layout */\n --chat--spacing: 1rem;\n --chat--border-radius: 0.2rem;\n --chat--transition-duration: 0.15s;\n\n /* Window Dimensions */\n --chat--window--width: 400px;\n --chat--window--height: 600px;\n --chat--window--bottom: var(--chat--spacing);\n --chat--window--right: var(--chat--spacing);\n --chat--window--z-index: 9999;\n --chat--window--border: 1px solid var(--chat--color-light-shade-50);\n --chat--window--border-radius: var(--chat--border-radius);\n --chat--window--margin-bottom: var(--chat--spacing);\n\n /* Header Styles */\n --chat--header--background: var(--chat--color-white);\n --chat--header--color: var(--chat--color-dark);\n --chat--header--padding: calc(var(--chat--spacing) * 0.75);\n --chat--header-height: auto;\n --chat--header--border-bottom: 1px solid var(--chat--color-light-shade-50);\n\n /* Message Styles */\n --chat--message--font-size: 1rem;\n --chat--message--padding: calc(var(--chat--spacing) * 0.75);\n --chat--message--border-radius: var(--chat--border-radius);\n --chat--message-line-height: 1.5;\n --chat--message--margin-bottom: var(--chat--spacing);\n --chat--message--bot--background: var(--chat--color-white);\n --chat--message--bot--color: var(--chat--color-dark);\n --chat--message--user--background: var(--chat--color-secondary);\n --chat--message--user--color: var(--chat--color-white);\n --chat--message--pre--background: rgba(0, 0, 0, 0.03);\n\n /* Toggle Button */\n --chat--toggle--background: var(--chat--color-secondary);\n --chat--toggle--hover--background: var(--chat--color-secondary-shade-50);\n --chat--toggle--active--background: var(--chat--color-secondary-shade-100);\n\n /* Input Area */\n --chat--textarea--height: 50px;\n --chat--textarea--max-height: 30rem;\n --chat--input--background: var(--chat--color-white);\n --chat--input--color: var(--chat--color-dark);\n --chat--input--padding: 0.8rem;\n --chat--input--border: 1px solid var(--chat--color-light-shade-50);\n --chat--input--border-active: 1px solid var(--chat--color-secondary-shade-100);\n --chat--input--border-radius: var(--chat--border-radius);\n\n /* Button Styles */\n --chat--button--background: var(--chat--color-secondary);\n --chat--button--color: var(--chat--color-white);\n --chat--button--padding: 0.5rem var(--chat--spacing);\n --chat--button--border-radius: var(--chat--border-radius);\n --chat--button--hover--background: var(--chat--color-secondary-shade-50);\n\n /* Send & File Buttons */\n --chat--input--send--button--background: var(--chat--color-white);\n --chat--input--send--button--color: var(--chat--color-secondary);\n --chat--input--file--button--color: var(--chat--color-secondary);\n --chat--files-spacing: 0.25rem;\n\n /* Body & Footer */\n --chat--body--background: var(--chat--color-light);\n --chat--footer--background: var(--chat--color-light);\n --chat--footer--color: var(--chat--color-dark);\n}\n\n.chat-message {\n max-width: 50%;\n}"
},
"initialMessages": "Hi—I can generate a logo, style guide, or background gradient for you. Let me know what you need?"
},
"typeVersion": 1.1
},
{
"id": "ef79976c-3cc1-413b-a914-0c9ed9a8c487",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1320,
20
],
"parameters": {
"options": {
"systemMessage": "You are a helpful, intelligent design assistant. You generate high-quality designs using the provided tools (generate logo, generate style guide, and generate gradient background). Then you can also upscale them, and finally, you can revise them.\n\nWhen you receive an image from a tool, wrap it in nice looking Markdown (atx) format and present it to the user.\n\nThe only three things you can generate are logos, style guides, and gradient backgrounds. \n\nMake sure to clarify which (as well as any additional information needed) so the prompt you send to the image model is optimal.\n\nIf you are asked to adjust or revise an image, ask the user to define their changes as explicitly as possible.",
"passthroughBinaryImages": true
}
},
"typeVersion": 2
},
{
"id": "098c35d2-550c-4882-b551-c8a75e759e25",
"name": "Google Drive11",
"type": "n8n-nodes-base.googleDrive",
"position": [
-1580,
-380
],
"parameters": {
"name": "={{ $json.fileName }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "root",
"cachedResultName": "/ (Root folder)"
}
},
"typeVersion": 3
},
{
"id": "87b416db-b16b-46a4-aa66-470381792f5a",
"name": "编辑字段3",
"type": "n8n-nodes-base.set",
"position": [
-260,
-460
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "cc5839f6-8d08-405e-bf8e-fc038e1bb121",
"name": "webViewLink",
"type": "string",
"value": "={{ $('Google Drive9').item.json.webViewLink }}"
},
{
"id": "0808c18a-075d-4d90-bbec-55a505512d30",
"name": "initialPrompt",
"type": "string",
"value": "={{ $('When Executed by Another Workflow').item.json.imagePrompt }}"
},
{
"id": "26209b1c-9d62-48a3-a4a6-290802b2e0c5",
"name": "fileName",
"type": "string",
"value": "={{ $('When Executed by Another Workflow').item.json.fileName }}"
},
{
"id": "2d72a62f-1871-43a4-9c8f-687d0006b31d",
"name": "imageType",
"type": "string",
"value": "={{ $('When Executed by Another Workflow').item.json.imageType }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "34b5fb8d-9333-4e96-8363-2ccb117a9483",
"name": "Google Drive10",
"type": "n8n-nodes-base.googleDrive",
"position": [
-480,
-460
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {},
"operation": "share",
"permissionsUi": {
"permissionsValues": {
"role": "writer",
"type": "anyone"
}
}
},
"typeVersion": 3
},
{
"id": "3a946658-06fd-4ffe-812e-adfe088274bd",
"name": "Google Drive9",
"type": "n8n-nodes-base.googleDrive",
"position": [
-700,
-460
],
"parameters": {
"name": "={{ $('When Executed by Another Workflow').item.json.fileName }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "root",
"cachedResultName": "/ (Root folder)"
}
},
"typeVersion": 3
},
{
"id": "02d41fae-0018-435e-9b8f-f38f72ad3d24",
"name": "转换为文件2",
"type": "n8n-nodes-base.convertToFile",
"position": [
-920,
-460
],
"parameters": {
"options": {
"mimeType": "image/png"
},
"operation": "toBinary",
"sourceProperty": "data[0].b64_json"
},
"typeVersion": 1.1
},
{
"id": "29a6b70d-4633-4257-89c6-4367302be220",
"name": "Google Drive8",
"type": "n8n-nodes-base.googleDrive",
"position": [
-1360,
-460
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "url",
"value": "={{ $if($json.previousImageUrl, $json.previousImageUrl, $json.webViewLink) }}"
},
"options": {},
"operation": "download"
},
"typeVersion": 3
},
{
"id": "8eaf1f44-3613-4199-812c-bf8afc08b570",
"name": "使用 GPT 图像生成图像 2",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1140,
-460
],
"parameters": {
"url": "https://api.openai.com/v1/images/edits",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "multipart-form-data",
"authentication": "predefinedCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "model",
"value": "gpt-image-1"
},
{
"name": "image[]",
"parameterType": "formBinaryData",
"inputDataFieldName": "data"
},
{
"name": "prompt",
"value": "=This is the former image. The client wants these revisions: {{ $('When Executed by Another Workflow').item.json.imagePrompt }}. Make them without materially changing anything that is not explicitly asked for (including backgrounds if relevant etc)."
}
]
},
"nodeCredentialType": "openAiApi"
},
"typeVersion": 4.2
},
{
"id": "5538f089-0b01-41f5-bde2-1a3e2c52c452",
"name": "HTTP 请求",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1800,
-380
],
"parameters": {
"url": "={{ $json.previousImageUrl }}",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "8de1534d-baec-4bef-b253-4c09060314de",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"position": [
-2020,
-460
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Google",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "c43d6a7d-bf5f-4060-8181-c6ef674c705d",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.previousImageUrl }}",
"rightValue": "google"
}
]
},
"renameOutput": true
},
{
"outputKey": "Non-Google",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "5bb1f007-a7ab-4aeb-b803-9757ce08070b",
"operator": {
"type": "string",
"operation": "notContains"
},
"leftValue": "={{ $json.previousImageUrl }}",
"rightValue": "google"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "917b135c-65db-454d-acde-34eb7b7416da",
"name": "编辑字段2",
"type": "n8n-nodes-base.set",
"position": [
-920,
-900
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "cc5839f6-8d08-405e-bf8e-fc038e1bb121",
"name": "webViewLink",
"type": "string",
"value": "={{ $('Google Drive6').item.json.webViewLink }}"
},
{
"id": "0808c18a-075d-4d90-bbec-55a505512d30",
"name": "initialPrompt",
"type": "string",
"value": "={{ $('When Executed by Another Workflow').item.json.imagePrompt }}"
},
{
"id": "26209b1c-9d62-48a3-a4a6-290802b2e0c5",
"name": "fileName",
"type": "string",
"value": "={{ $('When Executed by Another Workflow').item.json.fileName }}"
},
{
"id": "2d72a62f-1871-43a4-9c8f-687d0006b31d",
"name": "imageType",
"type": "string",
"value": "={{ $('When Executed by Another Workflow').item.json.imageType }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "2d9e3fd9-a666-499d-b6fd-1add42ed58e3",
"name": "Google Drive7",
"type": "n8n-nodes-base.googleDrive",
"position": [
-1140,
-900
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {},
"operation": "share",
"permissionsUi": {
"permissionsValues": {
"role": "writer",
"type": "anyone"
}
}
},
"typeVersion": 3
},
{
"id": "144e4212-b45d-40c0-ab7d-fe59b2f378d5",
"name": "Google Drive6",
"type": "n8n-nodes-base.googleDrive",
"position": [
-1360,
-900
],
"parameters": {
"name": "={{ $('When Executed by Another Workflow').item.json.fileName }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "root",
"cachedResultName": "/ (Root folder)"
}
},
"typeVersion": 3
},
{
"id": "0a750831-79c7-4ef4-9c35-c959558a7314",
"name": "转换为文件1",
"type": "n8n-nodes-base.convertToFile",
"position": [
-1580,
-900
],
"parameters": {
"options": {
"mimeType": "image/png"
},
"operation": "toBinary",
"sourceProperty": "data[0].b64_json"
},
"typeVersion": 1.1
},
{
"id": "15caf639-b249-4909-bd79-65516587baae",
"name": "Google Drive5",
"type": "n8n-nodes-base.googleDrive",
"position": [
-2020,
-900
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "1ga_xjprqAqlE1Rk_VYyy1zy3izfTqsp3"
},
"options": {},
"operation": "download"
},
"typeVersion": 3
},
{
"id": "04d823a8-81a9-437e-ba18-1184d19926fd",
"name": "使用 GPT 图像生成图像",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1800,
-900
],
"parameters": {
"url": "https://api.openai.com/v1/images/edits",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "multipart-form-data",
"authentication": "predefinedCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "model",
"value": "gpt-image-1"
},
{
"name": "image[]",
"parameterType": "formBinaryData",
"inputDataFieldName": "data"
},
{
"name": "prompt",
"value": "=Using this image as inspiration, create: {{ $('When Executed by Another Workflow').item.json.imagePrompt }}"
}
]
},
"nodeCredentialType": "openAiApi"
},
"typeVersion": 4.2
},
{
"id": "14a02578-e294-41de-b467-4de7ff76b87d",
"name": "编辑字段 1",
"type": "n8n-nodes-base.set",
"position": [
-1360,
-1220
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "cc5839f6-8d08-405e-bf8e-fc038e1bb121",
"name": "webViewLink",
"type": "string",
"value": "={{ $('Google Drive4').item.json.webViewLink }}"
},
{
"id": "0808c18a-075d-4d90-bbec-55a505512d30",
"name": "initialPrompt",
"type": "string",
"value": "={{ $('When Executed by Another Workflow').item.json.imagePrompt }}"
},
{
"id": "26209b1c-9d62-48a3-a4a6-290802b2e0c5",
"name": "fileName",
"type": "string",
"value": "={{ $('When Executed by Another Workflow').item.json.fileName }}"
},
{
"id": "2d72a62f-1871-43a4-9c8f-687d0006b31d",
"name": "imageType",
"type": "string",
"value": "={{ $('When Executed by Another Workflow').item.json.imageType }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "ff273bbd-ba92-4e91-9b53-615221e92926",
"name": "Google Drive4",
"type": "n8n-nodes-base.googleDrive",
"position": [
-1800,
-1220
],
"parameters": {
"name": "={{ $('When Executed by Another Workflow').item.json.fileName }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "root",
"cachedResultName": "/ (Root folder)"
}
},
"typeVersion": 3
},
{
"id": "a39b75a7-7910-4950-9e99-f6fed11e5234",
"name": "Google Drive 1",
"type": "n8n-nodes-base.googleDrive",
"position": [
-1580,
-1220
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {},
"operation": "share",
"permissionsUi": {
"permissionsValues": {
"role": "writer",
"type": "anyone"
}
}
},
"typeVersion": 3
},
{
"id": "b385da97-02f7-47b6-917d-ce6785bd6be8",
"name": "OpenAI",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-2020,
-1220
],
"parameters": {
"model": "gpt-image-1",
"prompt": "={{ $json.imagePrompt }}",
"options": {
"size": "={{ $json.resolution }}",
"quality": "low"
},
"resource": "image"
},
"typeVersion": 1.8
},
{
"id": "e034cb73-1ee9-43d8-99f0-b85bcf578f3a",
"name": "编辑字段",
"type": "n8n-nodes-base.set",
"position": [
-680,
-1520
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "cc5839f6-8d08-405e-bf8e-fc038e1bb121",
"name": "webViewLink",
"type": "string",
"value": "={{ $('Google Drive2').item.json.webViewLink }}"
},
{
"id": "0808c18a-075d-4d90-bbec-55a505512d30",
"name": "initialPrompt",
"type": "string",
"value": "={{ $('When Executed by Another Workflow').item.json.imagePrompt }}"
},
{
"id": "26209b1c-9d62-48a3-a4a6-290802b2e0c5",
"name": "fileName",
"type": "string",
"value": "={{ $('When Executed by Another Workflow').item.json.fileName }}"
},
{
"id": "2d72a62f-1871-43a4-9c8f-687d0006b31d",
"name": "imageType",
"type": "string",
"value": "={{ $('When Executed by Another Workflow').item.json.imageType }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "d25b9492-1f64-4be1-916b-7cd880da747b",
"name": "Google Drive3",
"type": "n8n-nodes-base.googleDrive",
"position": [
-900,
-1520
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {},
"operation": "share",
"permissionsUi": {
"permissionsValues": {
"role": "writer",
"type": "anyone"
}
}
},
"typeVersion": 3
},
{
"id": "fa544996-01af-4e07-8898-7ddae2f69b51",
"name": "Google Drive 2",
"type": "n8n-nodes-base.googleDrive",
"position": [
-1120,
-1520
],
"parameters": {
"name": "={{ $('When Executed by Another Workflow').item.json.fileName }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "root",
"cachedResultName": "/ (Root folder)"
}
},
"typeVersion": 3
},
{
"id": "ef21462b-4b47-4986-9927-2de6bc71e875",
"name": "转换为文件",
"type": "n8n-nodes-base.convertToFile",
"position": [
-1340,
-1520
],
"parameters": {
"options": {
"mimeType": "image/png"
},
"operation": "toBinary",
"sourceProperty": "data[0].b64_json"
},
"typeVersion": 1.1
},
{
"id": "1e309ae6-3761-4a2e-b29c-3b3bb14170b7",
"name": "Google Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
-1780,
-1520
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "1gitoFs9-KqsuNjZt9plv9rvnWUWPJUJb"
},
"options": {},
"operation": "download"
},
"typeVersion": 3
},
{
"id": "4556597f-ee92-4489-88a8-82984ace4197",
"name": "使用 GPT 图像生成图像 1",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1560,
-1520
],
"parameters": {
"url": "https://api.openai.com/v1/images/edits",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "multipart-form-data",
"authentication": "predefinedCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "model",
"value": "gpt-image-1"
},
{
"name": "image[]",
"parameterType": "formBinaryData",
"inputDataFieldName": "data"
},
{
"name": "prompt",
"value": "=Using this image as inspiration, create: {{ $('When Executed by Another Workflow').item.json.imagePrompt }}"
}
]
},
"nodeCredentialType": "openAiApi"
},
"typeVersion": 4.2
},
{
"id": "17f58dbb-b2e2-4614-85e8-6e35d2a23589",
"name": "当被其他工作流执行时",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
-2000,
-1520
],
"parameters": {
"workflowInputs": {
"values": [
{
"name": "imagePrompt"
},
{
"name": "resolution"
},
{
"name": "imageType"
},
{
"name": "fileName"
}
]
}
},
"typeVersion": 1.1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "",
"connections": {
"OpenAI": {
"main": [
[
{
"node": "Google Drive4",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "Google Drive8",
"type": "main",
"index": 0
}
],
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
},
"Google Drive": {
"main": [
[
{
"node": "Generate Image Using GPT Image 1",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "Google Drive11",
"type": "main",
"index": 0
}
]
]
},
"Generate Logo": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Google Drive1": {
"main": [
[
{
"node": "Edit Fields1",
"type": "main",
"index": 0
}
]
]
},
"Google Drive2": {
"main": [
[
{
"node": "Google Drive3",
"type": "main",
"index": 0
}
]
]
},
"Google Drive3": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Google Drive4": {
"main": [
[
{
"node": "Google Drive1",
"type": "main",
"index": 0
}
]
]
},
"Google Drive5": {
"main": [
[
{
"node": "Generate Image Using GPT Image ",
"type": "main",
"index": 0
}
]
]
},
"Google Drive6": {
"main": [
[
{
"node": "Google Drive7",
"type": "main",
"index": 0
}
]
]
},
"Google Drive7": {
"main": [
[
{
"node": "Edit Fields2",
"type": "main",
"index": 0
}
]
]
},
"Google Drive8": {
"main": [
[
{
"node": "Generate Image Using GPT Image 2",
"type": "main",
"index": 0
}
]
]
},
"Google Drive9": {
"main": [
[
{
"node": "Google Drive10",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Upscale Image": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Google Drive10": {
"main": [
[
{
"node": "Edit Fields3",
"type": "main",
"index": 0
}
]
]
},
"Google Drive11": {
"main": [
[
{
"node": "Google Drive8",
"type": "main",
"index": 0
}
]
]
},
"Convert to File": {
"main": [
[
{
"node": "Google Drive2",
"type": "main",
"index": 0
}
]
]
},
"Convert to File1": {
"main": [
[
{
"node": "Google Drive6",
"type": "main",
"index": 0
}
]
]
},
"Convert to File2": {
"main": [
[
{
"node": "Google Drive9",
"type": "main",
"index": 0
}
]
]
},
"Edit/Revise Image": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Generate Style Guide": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Generate Gradient Background": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Generate Image Using GPT Image ": {
"main": [
[
{
"node": "Convert to File1",
"type": "main",
"index": 0
}
]
]
},
"Generate Image Using GPT Image 1": {
"main": [
[
{
"node": "Convert to File",
"type": "main",
"index": 0
}
]
]
},
"Generate Image Using GPT Image 2": {
"main": [
[
{
"node": "Convert to File2",
"type": "main",
"index": 0
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Google Drive",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
这是一个高级难度的工作流,适用于Content Creation、AI Chatbot等场景。适合高级用户,包含 16+ 个节点的复杂工作流
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
我的工作流
通过GPT-4、Google文档和Mermaid图表自动化个性化Upwork提案
Set
Google Docs
Google Drive
+8
23 节点Nick Saraev
Lead Nurturing
✨🩷自动化社交媒体内容发布工厂 + 系统提示组合
基于动态系统提示和GPT-4o的AI驱动多平台社交媒体内容工厂
If
Set
Code
+20
100 节点Amit Mehta
Content Creation
批量SEO内容生成与带AI图片的Webflow草稿创建(模板)
使用GPT、Gemini图片和Webflow草稿创建进行批量SEO内容生成
If
Set
Code
+18
54 节点Dahiana
Content Creation
基于AI的MIS代理
基于AI的管理信息系统代理
If
Set
Code
+29
129 节点Kumar Shivam
Support
社交媒体工厂
基于AI的社交媒体内容创建器,支持多平台发布与审批
If
Set
Gmail
+15
48 节点Taiki
Social Media
商业AI指挥中心:Google Workspace模块化代理、向量搜索与多渠道报告
商业AI指挥中心:Google Workspace模块化代理、向量搜索与多渠道报告
Set
Gmail
Slack
+35
80 节点Paul
Document Extraction
工作流信息
难度等级
高级
节点数量40
分类2
节点类型14
作者
Nick Saraev
@nicksaraevHi 👋 I'm Nick. I make money with automation & teach others how they can too. If you have any questions about my templates or about my n8n builds, feel free to ask and I'll happily respond in the comments. Thanks for reading!
外部链接
在 n8n.io 上查看 →
分享此工作流