8
n8n 中文网amn8n.com

Gmail助手,含Google Gemini分类与Telegram通知

高级

这是一个AI Chatbot, Multimodal AI领域的自动化工作流,包含 25 个节点。主要使用 If, Gmail, Switch, Telegram, Aggregate 等节点。 Gmail助手,含Google Gemini分类与Telegram通知

前置要求
  • Google 账号和 Gmail API 凭证
  • Telegram Bot Token
  • Google Gemini API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "[INSTANCE_ID_PLACEHOLDER]",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "8a26017c-1076-44ec-999b-bc4a74888a23",
      "name": "检查:邮件是否在收件箱中?",
      "type": "n8n-nodes-base.if",
      "position": [
        -288,
        444
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "3f7094d8-2756-493d-8721-be7d4c83297b",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.labels[0].id.toJsonString() }}",
              "rightValue": "INBOX"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "821b15b9-72af-456d-b553-95952c7ee9b5",
      "name": "AI:生成邮件回复",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        512,
        -208
      ],
      "parameters": {
        "text": "=Today's Date: {{ $now }}\nFrom: {{ $('Real-time Email Trigger').item.json.From }}\nSubject: {{ $('Real-time Email Trigger').item.json.Subject }}\n\nEmail Content: {{ $('Real-time Email Trigger').item.json.snippet }}",
        "options": {
          "systemMessage": "You are an AI email assistant. Based on the email details provided, write a professional and relevant reply email.\n\nInstructions:\n- Write a clear and concise reply that responds meaningfully to the content\n- Keep the tone professional, polite, and appropriate to the context\n- Do not include unnecessary greetings or sign-offs\n- Extract the sender's email address from the 'From' field\n\nYour output must be strictly in the following JSON format:\n\n{\n  \"email\": \"sender_email_address\",\n  \"subject\": \"Re: [original subject]\",\n  \"body\": \"Your reply message here.\"\n}\n\nIf the email is promotional, spam, or clearly does not require a reply, leave the fields blank:\n\n{\n  \"email\": \"\",\n  \"subject\": \"\",\n  \"body\": \"\"\n}"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2
    },
    {
      "id": "5a24001b-0c1d-4645-8dde-ed8e23044056",
      "name": "Telegram:发送 + 批准",
      "type": "n8n-nodes-base.telegram",
      "position": [
        864,
        -104
      ],
      "webhookId": "[WEBHOOK_ID_PLACEHOLDER]",
      "parameters": {
        "chatId": "[YOUR_TELEGRAM_CHAT_ID]",
        "message": "=📥 New Email Received*\n\n👤 *From: {{ $('Real-time Email Trigger').item.json.From }}\n\n📝 Subject: {{ $('Real-time Email Trigger').item.json.Subject }}\n💬 Content: {{ $('Real-time Email Trigger').item.json.snippet }}\n\n🤖 AI-Generated Response*\n\n📤 *To: {{ $json.output.email }}\n\n📝 Subject: {{ $json.output.subject }}\n\n💬 Content: {{ $json.output.body }}",
        "options": {
          "limitWaitTime": {
            "values": {
              "resumeUnit": "minutes",
              "resumeAmount": 5
            }
          }
        },
        "operation": "sendAndWait",
        "approvalOptions": {
          "values": {
            "approvalType": "double"
          }
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "[TELEGRAM_CREDENTIALS_ID]",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "41b95627-45a6-4a5f-9269-456a4100fa07",
      "name": "检查:Telegram 是否批准?",
      "type": "n8n-nodes-base.if",
      "position": [
        1088,
        -104
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c7315e3c-6ee1-40bb-8d74-0c70862f30a4",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.data.approved }}",
              "rightValue": "true"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "48f9fae9-d30a-4be2-bfef-0aa12242504b",
      "name": "发送邮件回复",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1312,
        -200
      ],
      "webhookId": "[WEBHOOK_ID_PLACEHOLDER]",
      "parameters": {
        "message": "={{ $('AI: Generate Email Reply').item.json.output.body }}",
        "options": {},
        "emailType": "text",
        "messageId": "={{ $('Real-time Email Trigger').item.json.id }}",
        "operation": "reply"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "[GMAIL_CREDENTIALS_ID]",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "e18c5888-5117-42d8-b1d6-81040e134c87",
      "name": "使用 AI 总结邮件",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        512,
        192
      ],
      "parameters": {
        "text": "=Email from: {{ $('Real-time Email Trigger').item.json.From }}\nEmail Subject: {{ $('Real-time Email Trigger').item.json.Subject }}\nEmail Body: {{ $('Real-time Email Trigger').item.json.snippet }}",
        "options": {
          "systemMessage": "You are an intelligent assistant that reads all kinds of emails and creates short summaries.\n\nYour job is to:\n- Understand the core message and intent of the email\n- Write a short, clear summary (max 200 characters) suitable for Telegram notification\n- Use plain English with light emojis where helpful (📌, ⚠️, ✅, 💰, 🔔, etc.)\n- Highlight any important info: payment due, meeting, offer, delivery, confirmation, alert, etc.\n\nExamples:\n📌 Invoice from AWS for $23.50 is due by July 20. Check your billing portal.\n✅ HR shared your July payslip. No action needed unless there's an error.\n📦 Your Amazon order \"AirPods Pro\" has been delivered today.\n📰 New issue of \"FinTech Weekly\" is out — AI trends and market insights.\n\nOnly return a short, smart Telegram-style summary."
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "c637ff88-1897-48c2-ad5f-155383cf6a64",
      "name": "每日早上 8 点触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -512,
        920
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "9b12427f-7ae1-4b8b-bdb1-2dec08faa84e",
      "name": "整理邮件数据",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -64,
        920
      ],
      "parameters": {
        "include": "specifiedFields",
        "options": {},
        "aggregate": "aggregateAllItemData",
        "fieldsToInclude": "id,From,Subject, snippet, text"
      },
      "typeVersion": 1
    },
    {
      "id": "33107717-40fe-4330-a5fb-77d0846093cf",
      "name": "邮件总结器",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        160,
        920
      ],
      "parameters": {
        "text": "={{ $json.data.toJsonString() }}",
        "options": {
          "systemMessage": "# Enhanced Email Processing System Prompt\n\nYou are an intelligent email processing system that analyzes emails and creates comprehensive summaries formatted for Telegram.\n\n## Analysis Requirements:\nExamine the provided emails and extract:\n\n1. 📧 Email Summary - Brief overview of each important email\n2. 🚨 Issues & Concerns - Problems, urgent matters, or red flags\n3. ✅ Action Items - Tasks requiring completion with owners and deadlines\n4. ❓ Follow-Up Required - Open questions or missing information\n\n## Formatting Rules:\n\n### Telegram Formatting:\n- Use bold text for headers and emphasis: `text`\n- Use italic text for subtle emphasis: `text`\n- Use underlined text for critical items: `text`\n- Use strikethrough for cancelled/resolved items: `text`\n- Use ||spoiler tags|| for sensitive information: `||text||`\n\n### Content Rules:\n- Concise: Keep descriptions under 50 characters when possible\n- Multi-line formatting: Break content into readable chunks with proper line spacing\n- Prioritized: Use 🔥 for urgent, ⚠️ for important, ℹ️ for informational, 📌 for FYI\n- Actionable: Focus on what needs to be done, not just what happened\n- Clean spacing: Use line breaks and visual separators for better readability\n- Consistent formatting: Always use the same structure and emoji placement\n\n### Display Logic:\nCRITICAL: Only show sections that have actual content. If a category is empty, completely omit that section from the output.\n\n## Output Format:\n\n``````\n\n## Priority Indicators:\n- 🔥 **URGENT - Immediate action required (same day)\n- ⚠️ HIGH - Important, needs attention within 2-3 days  \n- ℹ️ NORMAL - Standard priority, within a week\n- 📌 FYI - Information only, no action needed\n\n## Example Output:\n\n``````\n\nRemember: **Only include sections with actual content. Empty categories should not appear in the final output at all."
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "f8ad7844-ec1c-4992-bdb3-a16870d60e25",
      "name": "结构化输出解析器",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        648,
        16
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"email\": \"example@email.com\",\n  \"subject\": \"Re: Subject\",\n  \"body\": \"Reply message\"\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "c6eaabe3-c322-4a23-853c-2bd9a4b8bf8b",
      "name": "退出:不在收件箱中",
      "type": "n8n-nodes-base.noOp",
      "position": [
        0,
        592
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "9bb8a152-63cf-491f-af3e-a72ff8acc6bd",
      "name": "退出:未批准",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1312,
        -8
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7dddacd1-a591-4fc8-982b-f1924cc8663f",
      "name": "退出:不重要",
      "type": "n8n-nodes-base.noOp",
      "position": [
        576,
        592
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "b7d2be75-3c71-4369-8178-71a8bfc09ee7",
      "name": "Google Gemini 聊天模型1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        520,
        16
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "[GOOGLE_API_CREDENTIALS_ID]",
          "name": "Google API"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "1e828755-52b0-43da-bf48-8c69a4f133c2",
      "name": "Google Gemini聊天模型2",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        584,
        416
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "[GOOGLE_API_CREDENTIALS_ID]",
          "name": "Google API"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "51e61fa6-8ded-4a9d-a2b8-71d42608c5ad",
      "name": "Google Gemini Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        232,
        1144
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "[GOOGLE_API_CREDENTIALS_ID]",
          "name": "Google API"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c8c6c8cc-fb6f-4095-97c4-8ad5b6756caa",
      "name": "获取邮件 - 过去 24 小时1",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -288,
        920
      ],
      "webhookId": "[WEBHOOK_ID_PLACEHOLDER]",
      "parameters": {
        "filters": {
          "q": "=newer_than:1d"
        },
        "operation": "getAll",
        "returnAll": true
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "[GMAIL_CREDENTIALS_ID]",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "de8a2b5c-5803-4cc6-b94f-a9f6601bb985",
      "name": "Google Gemini 聊天模型4",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -56,
        416
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "[GOOGLE_API_CREDENTIALS_ID]",
          "name": "Google API"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a4bfc60a-77ad-409c-8123-88119cf85b3e",
      "name": "结构化输出解析器1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        72,
        416
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"category\": 0,\n  \"confidence\": 85,\n  \"reason\": \"Email asks direct question about project deadline\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "96b3ab21-ffc9-42d5-baa2-7e808a426aa6",
      "name": "实时邮件触发器",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -512,
        444
      ],
      "parameters": {
        "filters": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "[GMAIL_CREDENTIALS_ID]",
          "name": "Gmail account"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "3454b940-351f-4b1b-a3b1-920fcb26fdb5",
      "name": "AI 邮件分类器",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -64,
        192
      ],
      "parameters": {
        "text": "=date :- {{ $now}}\nfrom :-  {{ $json.From }}\nsubject :- {{ $json.Subject }}\ncontent :- {{ $json.snippet }}",
        "options": {
          "systemMessage": "=# AI Email Classification System Prompt\n\nYou are an intelligent email classification AI. Your job is to analyze incoming emails and categorize them into exactly 3 categories based on importance and action required.\n\n## Input Data:\n- From: Email sender\n- Subject: Email subject line\n- Content: Email body/snippet\n- Date: Email timestamp\n\n## Classification Categories:\n\n### Output 0: REQUIRES REPLY**\nUse when email needs a human response:\n- Direct questions asking for information\n- Meeting requests or scheduling\n- Work assignments or project discussions  \n- Personal conversations requiring response\n- Time-sensitive requests\n- Business inquiries or customer support\n- Legal, financial, or official communications\n- Complaints or urgent issues\n\n### **Output 1: IMPORTANT NOTIFICATION**\nUse when email is important to know but doesn't need reply:\n- System alerts or status updates\n- Account notifications (billing, security)\n- Order confirmations or shipping updates\n- Calendar reminders or event notifications\n- Important announcements from work/services\n- Payment receipts or transaction confirmations\n- Service outage notifications\n- News or updates from trusted sources\n\n### **Output 2: SPAM/UNIMPORTANT**\nUse when email can be ignored:\n- Marketing emails and promotions\n- Newsletters you didn't specifically request\n- Spam and phishing attempts\n- Automated promotional content\n- Unsolicited sales pitches\n- Generic bulk emails\n- Social media notifications (likes, follows)\n- Obvious scam or suspicious emails\n\n## Analysis Framework:\n\nStep 1: Sender Analysis\n- Is sender known/trusted?\n- Business vs personal email?\n- Official organization or random sender?\n\nStep 2: Content Analysis  \n- Does it ask questions?\n- Does it require action?\n- Is it informational but important?\n- Is it promotional/marketing?\n\nStep 3: Urgency Assessment\n- Time-sensitive language?\n- Deadlines mentioned?\n- Emergency or urgent keywords?\n- Routine vs critical information?\n\nStep 4: Context Evaluation\n- Work-related vs personal?\n- Financial or legal implications?\n- Service-related notifications?\n- Social media or entertainment?\n\n## Output Format:\n\nReturn ONLY a JSON object with your classification:\n\n``````\n\nFields:\n- category: Integer (0, 1, or 2)\n- confidence: Percentage (1-100) of how sure you are\n- reason: Brief explanation (max 50 characters)\n\n## Examples:\n\nCategory 0 (Reply Needed):\n- \"Can you send me the project files by Friday?\"\n- \"Are you available for a meeting tomorrow?\"\n- \"Please review and approve the attached contract\"\n\nCategory 1 (Important Notification):\n- \"Your AWS bill for $156.78 is ready\"\n- \"Your package has been delivered\"  \n- \"System maintenance scheduled for tonight\"\n\nCategory 2 (Spam/Unimportant):**\n- \"50% OFF Sale - Limited Time Only!\"\n- \"You've won $1,000,000! Claim now\"\n- \"10 Amazing Weight Loss Tips\"\n\n## Rules:\n- Always choose exactly ONE category (0, 1, or 2)\n- Be decisive - avoid overthinking edge cases\n- When uncertain, err on the side of importance\n- Consider the recipient's likely priorities\n- Focus on actionability and relevance\n- Return ONLY the JSON response, no additional text"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "27e2621d-c864-4335-9896-c611eda0f241",
      "name": "按类别路由",
      "type": "n8n-nodes-base.switch",
      "position": [
        288,
        280
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "e6dde75e-d318-4e80-a5d7-3a96e2a226bf",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.category }}",
                    "rightValue": "0"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "27f0e72b-75b8-43f0-b416-a9cc45a4d589",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.category }}",
                    "rightValue": "1"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "cd571930-2ded-4982-83b2-b2c4f7f29a69",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.category }}",
                    "rightValue": "2"
                  }
                ]
              }
            }
          ]
        },
        "options": {},
        "looseTypeValidation": true
      },
      "typeVersion": 3.2
    },
    {
      "id": "667ba661-fd46-4dae-85bd-d33ee2a10f03",
      "name": "发送每日报告",
      "type": "n8n-nodes-base.telegram",
      "position": [
        512,
        920
      ],
      "webhookId": "[WEBHOOK_ID_PLACEHOLDER]",
      "parameters": {
        "text": "={{ $json.output }}",
        "chatId": "[YOUR_TELEGRAM_CHAT_ID]",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "[TELEGRAM_CREDENTIALS_ID]",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "43ed4af8-cdfe-4aa9-a9c1-b3a6982f07e4",
      "name": "发送摘要到 Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        864,
        296
      ],
      "webhookId": "[WEBHOOK_ID_PLACEHOLDER]",
      "parameters": {
        "text": "={{ $json.output }}",
        "chatId": "[YOUR_TELEGRAM_CHAT_ID]",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "[TELEGRAM_CREDENTIALS_ID]",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "24247c72-26e5-4a94-88a3-a415dbb0b501",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1216,
        -272
      ],
      "parameters": {
        "width": 2736,
        "height": 1568,
        "content": "# 智能邮件助手:具备 AI 分类和 Telegram 集成功能"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Email Summarizer": {
      "main": [
        [
          {
            "node": "Send Daily Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily 8AM Trigger": {
      "main": [
        [
          {
            "node": "Fetch Emails - Past 24 Hours1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Category": {
      "main": [
        [
          {
            "node": "AI: Generate Email Reply",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Summarize Email with AI",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Exit: Not Important",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Email Classifier": {
      "main": [
        [
          {
            "node": "Route by Category",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Organize Email Data": {
      "main": [
        [
          {
            "node": "Email Summarizer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Real-time Email Trigger": {
      "main": [
        [
          {
            "node": "Check: Is Email in Inbox?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize Email with AI": {
      "main": [
        [
          {
            "node": "Send Summary to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI: Generate Email Reply": {
      "main": [
        [
          {
            "node": "Telegram: Send + Approve",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI: Generate Email Reply",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Telegram: Send + Approve": {
      "main": [
        [
          {
            "node": "Check: Telegram Approved?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check: Is Email in Inbox?": {
      "main": [
        [
          {
            "node": "AI Email Classifier",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Exit: Not in Inbox",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check: Telegram Approved?": {
      "main": [
        [
          {
            "node": "Send Email Reply",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Exit: Not Approved",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI: Generate Email Reply",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Summarize Email with AI",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "Email Summarizer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model4": {
      "ai_languageModel": [
        [
          {
            "node": "AI Email Classifier",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "AI Email Classifier",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Emails - Past 24 Hours1": {
      "main": [
        [
          {
            "node": "Organize Email Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - AI 聊天机器人, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量25
分类2
节点类型12
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Roshan Ramani

Roshan Ramani

@rawsun007

I love building smart n8n automations that actually work reliably. My focus is on making everyday tasks like email, social media, and CRM workflows simpler using AI. I've shared templates in the n8n community, including a WhatsApp Expense Tracker that people really enjoy. What keeps me excited is constantly trying new things - testing fresh nodes, playing with AI tools like LangChain, and discovering creative ways to connect systems!

外部链接
在 n8n.io 查看

分享此工作流