8
n8n 中文网amn8n.com

AI驱动邮件营销,集成Google Gemini、Gmail和Sheets

中级

这是一个Lead Nurturing, Multimodal AI领域的自动化工作流,包含 13 个节点。主要使用 If, Set, GmailTool, GoogleSheets, SplitInBatches 等节点。 AI驱动邮件营销,集成Google Gemini、Gmail和Sheets

前置要求
  • Google 账号和 Gmail API 凭证
  • Google Sheets API 凭证
  • 可能需要目标 API 的认证凭证
  • Google Gemini API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "nodes": [
    {
      "id": "49878243-142e-4b32-a3e2-76c8dca37d96",
      "name": "遍历项目",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        624,
        0
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "12d2a156-40af-47a2-b3bf-d26ae44ed763",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -176,
        -176
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "1faffda1-ca81-40e6-a0f3-cbf92bb0282f",
      "name": "便签 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        -176
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "154ea153-3e9d-48cc-934a-18ce2b77f94b",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        -544
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "ae363ca2-083b-4382-8a30-48289dbf890c",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -80,
        0
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "ae9d8cb1-e1bf-4b72-bfc4-e1b40da73e03",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1280,
        32
      ],
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "7bdc8f65-61b7-4d4a-8f53-b6a72ca61845",
      "name": "Google Gemini聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1184,
        320
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "b4287490-44a5-4e82-9aef-e7242ace6bc7",
      "name": "在 Gmail 中发送消息",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        1680,
        320
      ],
      "webhookId": "a5e901fa-06fc-45a8-b957-981825269381",
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "13a93835-87ca-4ab5-a917-032d007eaa66",
      "name": "更新状态",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        1536,
        320
      ],
      "parameters": {},
      "typeVersion": 4.6
    },
    {
      "id": "a13efb7d-e848-4bd0-9bfa-861091336787",
      "name": "HTTP 请求",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        1408,
        320
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "717dd4b7-b1d9-4edb-af2e-d433164027dd",
      "name": "如果邮箱存在",
      "type": "n8n-nodes-base.if",
      "position": [
        912,
        16
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "b5b8aad7-24f2-4a48-9603-54aa21488f17",
      "name": "获取潜在客户",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        416,
        0
      ],
      "parameters": {},
      "typeVersion": 4.6
    },
    {
      "id": "fd8aa925-25cc-4d22-9e6a-ee100332f07c",
      "name": "编辑字段",
      "type": "n8n-nodes-base.set",
      "position": [
        176,
        0
      ],
      "parameters": {},
      "typeVersion": 3.4
    }
  ],
  "pinData": {},
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Leads": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Get Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Update Status": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "If Email Exists": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "If Email Exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message in Gmail": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 客户培育, 多模态 AI

需要付费吗?

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

工作流信息
难度等级
中级
节点数量13
分类2
节点类型11
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
Zain Khan

Zain Khan

@zain

I partner with businesses to streamline processes and accelerate growth through intelligent AI automation and Web/mobile Development. Leveraging deep expertise in GPT-4, LangChain, and n8n, I develop AI-powered agents and sophisticated LLM pipelines.

外部链接
在 n8n.io 查看

分享此工作流