🤖💬 对话式 AI 聊天机器人(Google Gemini 支持文本和图像)| Telegram
高级
这是一个Design、AI领域的自动化工作流,包含 28 个节点。主要使用 Set、Code、Switch、Telegram、HttpRequest 等节点,结合人工智能技术实现智能自动化。 🤖💬 对话式 AI 聊天机器人(Google Gemini 支持文本和图像)| Telegram
前置要求
- •Telegram Bot Token
- •可能需要目标 API 的认证凭证
- •Google Gemini API Key
使用的节点 (28 个)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"nodes": [
{
"id": "3017950d-52a5-4f51-a64d-7f223c01743e",
"name": "聊天提示",
"type": "n8n-nodes-base.set",
"position": [
0,
-880
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "b3ce66e0-2b6f-4714-a672-59ef6e43ced9",
"name": "prompt",
"type": "string",
"value": "=1. Rules\n- Communicate formally, clearly, and respectfully at all times.\n- Be concise and precise, avoiding unnecessary details.\n- Maintain a positive, professional tone as a reliable and knowledgeable assistant.\n- Respect user boundaries and refrain from engaging in prohibited or inappropriate topics.\n- Keep the conversation engaging by encouraging user participation, but when requesting clarification or additional information, ask only one focused question at a time to avoid overwhelming the user. Avoid abrupt endings to the dialogue.\n- Follow user instructions precisely.\n- Do not include any additional text or explanations unless explicitly requested.\n\n2. Response instructions\n- Analyze the message and conversation history to maintain context and continuity.\n- If repetition is requested, return the message exactly as provided. Otherwise, respond clearly and appropriately based on intent and context.\n- If the message is vague, suggest an interpretation and ask for clarification while keeping the conversation active."
}
]
}
},
"typeVersion": 3.4
},
{
"id": "975f1ebd-9af9-4bc5-8cec-6c3be3d3a63d",
"name": "其他提示",
"type": "n8n-nodes-base.set",
"position": [
0,
-720
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "d78c64d5-3c9e-4ffd-875e-973eb3c4d20a",
"name": "prompt",
"type": "string",
"value": "=1. Rules\n- Communicate formally, clearly, and respectfully at all times.\n- Be concise and precise, avoiding unnecessary details.\n- Maintain a positive, professional tone as a reliable and knowledgeable assistant.\n- Respect user boundaries and refrain from engaging in prohibited or inappropriate topics.\n- Keep the conversation engaging by encouraging user participation, but when requesting clarification or additional information, ask only one focused question at a time to avoid overwhelming the user. Avoid abrupt endings to the dialogue.\n- Follow user instructions precisely.\n- Do not include any additional text or explanations unless explicitly requested.\n\n2. General Instructions\n- If a message is unclear or lacks details, respond with your best understanding as a suggestion, and politely ask the user to confirm or provide more details if it is not what they meant.\n- If the request is inappropriate or irrelevant, respond politely and clearly refuse, maintaining respect and professionalism, and invite a valid request.\n- Always follow the established rules to maintain professionalism and accuracy."
}
]
}
},
"typeVersion": 3.4
},
{
"id": "f297c8ce-7c7c-4011-9c36-e4993dbfd926",
"name": "生成提示",
"type": "n8n-nodes-base.set",
"position": [
0,
-1040
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "70c93816-7110-48e3-a105-568dd766bdf4",
"name": "prompt",
"type": "string",
"value": "=1. General instructions\nCreate a prompt that generates only one response with no comments and no line breaks. Based on the input provided, generate a detailed visual description of the request in a clear and coherent manner. Avoid using quotation marks, apostrophes, or any other punctuation marks.\n\n2. Visual specifications\n- Composition: maintain a balanced and harmonious layout where all elements (images, shapes, and text) work together seamlessly. Ensure that no part of the image feels overcrowded, and the design directs the viewer’s attention naturally. Use a minimalistic approach, avoiding excessive detail or distractions.\n\n- Color palette: choose a color scheme that complements the overall theme and enhances the mood. The colors should be visually pleasing and work together harmoniously. Use no more than 3-4 main colors to maintain simplicity and coherence, ensuring they do not overpower the design.\n\n- Visual clarity: the image should be crisp and clear, with all elements legible and easy to interpret. Avoid blurry or pixelated visuals. Maintain sharp contrasts between key elements for emphasis and visual clarity.\n\n- Image size and resolution: the image should be sized to fit standard display requirements (e.g., social media, web posts). Ensure the resolution is high enough for clarity on both desktop and mobile devices. The image must maintain visual quality without losing sharpness or details when viewed on different screens.\n\n- Aesthetic appeal: aim for a design that is not only functional but also visually appealing. The overall style should be modern, clean, and aesthetically pleasing, with a consistent look that aligns with the intended mood or message. Ensure the design is pleasing to the eye, evoking the intended response from the viewer.\n\n- Visual balance: ensure the elements in the image are well-spaced, with no part feeling too heavy or too light. Create a natural flow of focus, guiding the viewer’s eye through the composition without distraction."
}
]
}
},
"typeVersion": 3.4
},
{
"id": "51eb4b31-0099-4886-9dfd-dc9c02107562",
"name": "构建提示",
"type": "n8n-nodes-base.set",
"position": [
140,
-880
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "f435e1c3-6ff9-4e68-852c-0a39a5903ebe",
"name": "prompt",
"type": "string",
"value": "={{ $json.prompt }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "d9a263b3-9078-47e9-8146-abf62100af21",
"name": "聊天核心",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
280,
-880
],
"parameters": {
"text": "=Input from user: {{ $('sessionData').item.json.Mensaje }}\n\n{{ $json.prompt }}\n\nRespond only with the exact text requested, strictly following the instructions above. ",
"options": {
"systemMessage": "=You are a professional enterprise chatbot designed to assist users with clear, respectful, and accurate communication. You provide informative text responses and generate images only upon explicit user requests. Utilize available conversation history to maintain context and coherence. Adhere strictly to company rules to ensure appropriate and secure interactions.\n\nYou can chat with me to get answers and create custom images based on your instructions.\n\nPrioritize the most recent relevant message if multiple prior references exist. Always respond in Spanish when providing text-based chat replies. For image generation requests, respond in English. Keep responses as short as possible without compromising clarity or natural interaction. Do not force interaction with the user beyond what is necessary to respond clearly."
},
"promptType": "define"
},
"typeVersion": 1.9
},
{
"id": "67e27375-a9f9-45d7-8ea9-aad5d18996de",
"name": "Gemini模型",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
300,
-720
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.0-flash-001"
},
"credentials": {
"googlePalmApi": {
"id": "zuXA1v8tUW8qt8Gz",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "58ab707f-00e3-4b9f-b598-af89cebf99ce",
"name": "输入处理器",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
-460,
-880
],
"parameters": {
"text": "=1. Context\nYou are an intelligent assistant designed to analyze user requests accurately by considering both the current user input and prior conversation history (if available). Use this context to improve classification and response relevance. Only classify as \"generate\" if the request clearly meets all criteria. Never assume without certainty.\n\n2. General instructions\n- Use prior conversation history, if available, to interpret references, refinements, or corrections in the user’s message. \n- Apply updates directly when a previous request is being modified (e.g., changing part of a generated image).\n- Maintain context continuity unless the user explicitly shifts the topic.\n- When evaluating intention, prioritize the most recent relevant message to avoid using outdated context.\n- If the message is vague, nonsensical, or overly brief (e.g., a single word), do not classify it as \"generate\". Even if image requests occurred earlier. Only proceed if the current input clearly meets all criteria. Default to \"other\" unless the message includes clear direction.\n\n3. User Request: \"{{ $('sessionData').item.json.Mensaje }}\"\n\n4. Conversation history:\n{{ $json.messages}}\n\n5. Intentions\nClassify the user's intention as exactly one of the following:\n- \"generate\": user requests the direct creation of new visual content (e.g., images or art) to be delivered. This includes implicit requests for physical or tangible objects (e.g., \"give me a pet\"), but only if the message contains clear intent or is supported by prior context. Single-word or vague inputs without clear directive or context should not be treated as generate.\n- \"chat\": user engages in meaningful conversational interaction, including requests to generate textual prompts, explanations, or dialogue that have clear context and intent.\n- \"other\": request does not fit into the above categories, or involves content that is restricted, inappropriate, irrelevant, nonsensical, or lacks clear context or intent distinct from conversational engagement.\n\n6. Data types\nWhen analyzing the user’s message, determine whether a request for a physical or tangible object should be interpreted as a visual content request. In general, treat requests for tangible items as image generation unless the context explicitly suggests otherwise. For intangible content, respond with text unless the user clearly asks for an image.\n\nBased on the intention and content of the request, select exactly one data type to return:\n\n- \"text\": a textual response such as an answer, explanation, dialogue, or prompt text.\n- \"image\": a visual response explicitly or implicitly requested as image generation.\n\nAssign \"image\" as typeData only if the intention is \"generate\". In all other cases, including when the intention is \"other\", assign \"text\".\n\n7. Output format\nRespond only with a JSON object in this exact format, with no additional text or explanation: {\"intention\": \"value\", \"typeData\": \"value\"}",
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.6,
"alwaysOutputData": false
},
{
"id": "0123eef4-eb57-485a-ad01-66dc47b332f8",
"name": "Gemini模型1",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
-440,
-740
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.0-flash"
},
"credentials": {
"googlePalmApi": {
"id": "zuXA1v8tUW8qt8Gz",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "8853d1da-5ab6-44cf-8054-7267392c9eae",
"name": "结构化输出",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
-300,
-740
],
"parameters": {
"jsonSchemaExample": "{\n\t\"typeData\": \"text\",\n\t\"intention\": \"generate\"\n}"
},
"typeVersion": 1.2
},
{
"id": "b679111d-c640-4f59-8046-c37fa7f977e9",
"name": "内容类型",
"type": "n8n-nodes-base.switch",
"position": [
580,
-800
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "=Imagen",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "24ab5811-2b6d-4f2f-8620-8697dadc2d4d",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $('intentHandler').item.json.output.typeData }}",
"rightValue": "image"
}
]
},
"renameOutput": true
},
{
"outputKey": "Texto",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "28759436-2f6a-4bb3-a9bf-924477241809",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $('intentHandler').item.json.output.typeData }}",
"rightValue": "text"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "8abd3463-8ecc-4086-9057-e7494b8b2d9d",
"name": "文本清理器",
"type": "n8n-nodes-base.code",
"position": [
820,
-980
],
"parameters": {
"jsCode": "let texto = $input.first().json.prompt.replace(/[\\n\\r\\t]/g, \" \") // Reemplaza saltos de línea, retorno de carro y tabulaciones por espacio\n .replace(/['\"\\\\]/g, \"\") // Elimina comillas simples, dobles y barras invertidas\n .replace(/\\s+/g, \" \") // Reemplaza múltiples espacios por un solo espacio\n .trim(); // Elimina los espacios en blanco al inicio y al final\n\nreturn {\n text: texto\n}"
},
"typeVersion": 2
},
{
"id": "a11a2afc-71c4-4b3f-81ec-fb8cacc1d9f2",
"name": "图像生成",
"type": "n8n-nodes-base.httpRequest",
"position": [
940,
-980
],
"parameters": {
"url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-exp-image-generation:generateContent",
"method": "POST",
"options": {},
"jsonBody": "={\n \"contents\": [\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"text\": \"{{ $json.text }}\"\n }\n ]\n }\n ],\n \"generationConfig\": {\n \"responseModalities\": [\"Text\", \"Image\"]\n }\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "googlePalmApi"
},
"credentials": {
"googlePalmApi": {
"id": "zuXA1v8tUW8qt8Gz",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 4.2
},
{
"id": "ccce85bc-79f7-43ed-b649-8b1533d774a5",
"name": "图像构建器",
"type": "n8n-nodes-base.convertToFile",
"position": [
1060,
-980
],
"parameters": {
"options": {
"fileName": "generated_image.png"
},
"operation": "toBinary",
"sourceProperty": "candidates[0].content.parts[1].inlineData.data"
},
"typeVersion": 1.1
},
{
"id": "4dbbf4c4-4d78-42d3-bdbc-a35a584643ff",
"name": "发送图像",
"type": "n8n-nodes-base.telegram",
"position": [
1180,
-980
],
"webhookId": "511272cc-d9e3-4384-9407-e5d4296db621",
"parameters": {
"chatId": "={{ $('sessionData').item.json.sessionId }}",
"operation": "sendPhoto",
"binaryData": true,
"additionalFields": {
"fileName": "=generated_image.png"
}
},
"credentials": {
"telegramApi": {
"id": "w7tC1svlHpL7ogwy",
"name": "TheCrawlerZeroBot"
}
},
"typeVersion": 1
},
{
"id": "8e525ff1-f403-4f7a-a281-36fb18824168",
"name": "发送文本消息",
"type": "n8n-nodes-base.telegram",
"position": [
1180,
-780
],
"webhookId": "1d1eee00-2306-4ac1-870f-0988e305f0d0",
"parameters": {
"text": "={{ $('ChatCore').item.json.output }}",
"chatId": "={{ $('sessionData').item.json.sessionId }}",
"additionalFields": {
"parse_mode": "HTML",
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "w7tC1svlHpL7ogwy",
"name": "TheCrawlerZeroBot"
}
},
"typeVersion": 1
},
{
"id": "4e0fcbad-8b6b-4c39-80ac-6aed0f8cf0fd",
"name": "会话数据",
"type": "n8n-nodes-base.set",
"position": [
-980,
-880
],
"parameters": {
"values": {
"string": [
{
"name": "Mensaje",
"value": "={{ $('userInput').item.json.message.text }}"
},
{
"name": "sessionId",
"value": "={{ $('userInput').item.json.message.chat.id }}"
},
{
"name": "Lenguaje",
"value": "={{ $('userInput').item.json.message.from.language_code }}"
},
{
"name": "Username",
"value": "={{ $('userInput').item.json.message.chat.username }}"
}
]
},
"options": {},
"keepOnlySet": true
},
"typeVersion": 2
},
{
"id": "ea84ebc4-2932-4fd9-8771-b13a929b6ea5",
"name": "对话存储",
"type": "@n8n/n8n-nodes-langchain.memoryManager",
"position": [
-860,
-880
],
"parameters": {
"options": {
"groupMessages": true
}
},
"typeVersion": 1.1
},
{
"id": "03420024-1474-4b55-a98a-e80e0826ccc7",
"name": "记忆检索器",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-820,
-740
],
"parameters": {
"sessionKey": "={{ $('sessionData').item.json.sessionId }}",
"sessionIdType": "customKey",
"contextWindowLength": 2
},
"typeVersion": 1.3
},
{
"id": "28f6a639-1c50-4754-a66c-772cc3a05083",
"name": "最新上下文",
"type": "n8n-nodes-base.code",
"position": [
-580,
-880
],
"parameters": {
"jsCode": "const allItems = $input.all();\nconst lastItem = allItems[allItems.length - 1];\n\nif (lastItem && Array.isArray(lastItem.json.messages)) {\n const messages = lastItem.json.messages;\n const count = messages.length;\n\n if (count === 0) return [{ json: { message: \"\" } }];\n\n const extractFirstLine = (text) => {\n if (!text) return \"\";\n return text.split('\\n')[0].replace(/^Input from user:\\s*/, '');\n };\n\n const trimEndNewline = (text) => {\n if (!text) return \"\";\n return text.replace(/\\n+$/, '');\n };\n\n // Tomar los últimos dos o menos mensajes\n const selectedMessages = (count === 1) ? [messages[0]] : messages.slice(-1);\n\n // Construir el texto concatenado\n const combinedMessage = selectedMessages.map((msg, idx) => {\n return `Message ${idx + 1}:\\nhuman: ${extractFirstLine(msg.human)}\\nai: ${trimEndNewline(msg.ai)}`;\n }).join('\\n\\n');\n\n return [{ json: { messages: combinedMessage } }];\n}\n\nreturn [{ json: { messages: \"\" } }];"
},
"typeVersion": 2
},
{
"id": "14bae45a-aafa-407f-9761-62954acabbbd",
"name": "意图处理器",
"type": "n8n-nodes-base.switch",
"position": [
-180,
-880
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "generate",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "24ab5811-2b6d-4f2f-8620-8697dadc2d4d",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.output.intention }}",
"rightValue": "generate"
}
]
},
"renameOutput": true
},
{
"outputKey": "chat",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "28759436-2f6a-4bb3-a9bf-924477241809",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.output.intention }}",
"rightValue": "chat"
}
]
},
"renameOutput": true
},
{
"outputKey": "other",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "de4b6e87-950e-461c-869f-d27c73f8d763",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.output.intention }}",
"rightValue": "other"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "2f3d4931-9549-449b-8ff8-e27bf7b69e1f",
"name": "用户输入",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-1100,
-880
],
"webhookId": "ddbf3f08-3f4d-446d-9378-054225c91a06",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "w7tC1svlHpL7ogwy",
"name": "TheCrawlerZeroBot"
}
},
"typeVersion": 1
},
{
"id": "357a258b-32a7-47c4-bcf1-f32cec025cba",
"name": "对话记忆",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
420,
-700
],
"parameters": {
"sessionKey": "={{ $('sessionData').item.json.sessionId }}",
"sessionIdType": "customKey",
"contextWindowLength": 10
},
"typeVersion": 1.3
},
{
"id": "f1dad098-8b9f-4160-91ab-1eb7185d51a2",
"name": "错误预处理器",
"type": "n8n-nodes-base.set",
"position": [
700,
-980
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "d11831d7-533b-4132-9849-612e093d6b32",
"name": "prompt",
"type": "string",
"value": "={{ $('ChatCore').item.json.output }} It is mandatory to add a description of the image you are going to make."
}
]
}
},
"typeVersion": 3.4
},
{
"id": "804fcbd3-cbc1-41d9-bbeb-40469545012f",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-860,
-1240
],
"parameters": {
"color": 4,
"width": 380,
"height": 680,
"content": "### 2. 记忆与对话上下文"
},
"typeVersion": 1
},
{
"id": "4b4e8510-6b97-4b1d-afdb-916581aa539d",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1220,
-1240
],
"parameters": {
"color": 5,
"width": 340,
"height": 680,
"content": "### 1. 输入与会话管理"
},
"typeVersion": 1
},
{
"id": "6b14b58f-2e17-4cfb-baf4-3318b3fd9533",
"name": "便签 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-460,
-1240
],
"parameters": {
"color": 6,
"width": 700,
"height": 680,
"content": "### 3. 意图处理与提示生成"
},
"typeVersion": 1
},
{
"id": "fa4cfc3f-cdaf-4184-b183-ca31b1aa1d86",
"name": "便签 3",
"type": "n8n-nodes-base.stickyNote",
"position": [
260,
-1240
],
"parameters": {
"color": 3,
"width": 300,
"height": 680,
"content": "### 4. 生成核心与对话管理"
},
"typeVersion": 1
},
{
"id": "ce598ece-492b-4294-9aa4-ea0c6757edf2",
"name": "便签 4",
"type": "n8n-nodes-base.stickyNote",
"position": [
580,
-1240
],
"parameters": {
"color": 7,
"width": 800,
"height": 680,
"content": "### 5. 内容分类与用户交付"
},
"typeVersion": 1
}
],
"connections": {
"ChatCore": {
"main": [
[
{
"node": "contentType",
"type": "main",
"index": 0
}
]
]
},
"userInput": {
"main": [
[
{
"node": "sessionData",
"type": "main",
"index": 0
}
]
]
},
"chatPrompt": {
"main": [
[
{
"node": "buildPrompt",
"type": "main",
"index": 0
}
]
]
},
"GeminiModel": {
"ai_languageModel": [
[
{
"node": "ChatCore",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"buildPrompt": {
"main": [
[
{
"node": "ChatCore",
"type": "main",
"index": 0
}
]
]
},
"contentType": {
"main": [
[
{
"node": "errorPreprocessor",
"type": "main",
"index": 0
}
],
[
{
"node": "sendTextMessage",
"type": "main",
"index": 0
}
]
]
},
"otherPrompt": {
"main": [
[
{
"node": "buildPrompt",
"type": "main",
"index": 0
}
]
]
},
"sessionData": {
"main": [
[
{
"node": "conversationStore",
"type": "main",
"index": 0
}
]
]
},
"textCleaner": {
"main": [
[
{
"node": "imageGeneration",
"type": "main",
"index": 0
}
]
]
},
"GeminiModel1": {
"ai_languageModel": [
[
{
"node": "inputProcessor",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"imageBuilder": {
"main": [
[
{
"node": "sendImage",
"type": "main",
"index": 0
}
]
]
},
"intentHandler": {
"main": [
[
{
"node": "generatePrompt",
"type": "main",
"index": 0
}
],
[
{
"node": "chatPrompt",
"type": "main",
"index": 0
}
],
[
{
"node": "otherPrompt",
"type": "main",
"index": 0
}
]
]
},
"latestContext": {
"main": [
[
{
"node": "inputProcessor",
"type": "main",
"index": 0
}
]
]
},
"generatePrompt": {
"main": [
[
{
"node": "buildPrompt",
"type": "main",
"index": 0
}
]
]
},
"inputProcessor": {
"main": [
[
{
"node": "intentHandler",
"type": "main",
"index": 0
}
]
]
},
"imageGeneration": {
"main": [
[
{
"node": "imageBuilder",
"type": "main",
"index": 0
}
]
]
},
"memoryRetriever": {
"ai_memory": [
[
{
"node": "conversationStore",
"type": "ai_memory",
"index": 0
}
]
]
},
"sendTextMessage": {
"main": [
[]
]
},
"structuredOutput": {
"ai_outputParser": [
[
{
"node": "inputProcessor",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"conversationStore": {
"main": [
[
{
"node": "latestContext",
"type": "main",
"index": 0
}
]
]
},
"errorPreprocessor": {
"main": [
[
{
"node": "textCleaner",
"type": "main",
"index": 0
}
]
]
},
"conversationMemory": {
"ai_memory": [
[
{
"node": "ChatCore",
"type": "ai_memory",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
这是一个高级难度的工作流,适用于Design、AI等场景。适合高级用户,包含 16+ 个节点的复杂工作流
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
AI驱动的YouTube短视频自动化:使用OpenAI和ElevenLabs创建与发布
AI驱动的YouTube Shorts创建器(OpenAI脚本与ElevenLabs语音)
If
Set
Wait
+15
76 节点WIKIPILOT
Design
AI 自动化 YouTube Shorts:使用 OpenAI 创建和发布
AI 自动化 YouTube Shorts:使用 OpenAI 创建和发布
If
Set
Wait
+15
76 节点AYYOUB TIGAMI
Design
使用OpenAI、ElevenLabs和Replicate创建并上传AI短视频
使用OpenAI、ElevenLabs和Replicate创建并上传AI短视频
If
Set
Wait
+15
68 节点AYOUBTIG
Design
使用OpenAI脚本、ElevenLabs语音和Replicate视频创建YouTube短视频
使用OpenAI脚本、ElevenLabs语音和Replicate视频创建YouTube短视频
If
Set
Wait
+15
68 节点NICKYAI
Design
AI邮件分诊与GPT-4警报系统及Telegram通知
AI邮件分诊与GPT-4警报系统及Telegram通知
If
Set
Gmail
+22
104 节点Peter Joslyn
Support
语音支持工作流
AI语音教练与生成器:使用Telegram、OpenAI和Gemini
If
Set
Code
+9
22 节点NanaB
Other