8
n8n 中文网amn8n.com

🍳 烹饪伴侣 — 30步工作流 (Telegram + Google Sheets + LLM)

高级

这是一个Personal Productivity, AI Chatbot领域的自动化工作流,包含 41 个节点。主要使用 Switch, Function, Telegram, GoogleSheets, Agent 等节点。 使用AI驱动的Telegram机器人和Google Sheets数据库管理食谱

前置要求
  • Telegram Bot Token
  • Google Sheets API 凭证
  • OpenAI API Key
  • Google Gemini API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移

无法加载工作流预览

导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "name": "🍳 烹饪伴侣 — 30 步工作流 (Telegram + Google Sheets + LLM)",
  "nodes": [
    {
      "name": "Telegram 触发器",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -1920,
        128
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "读取食谱名称",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        496,
        432
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "格式化列表消息",
      "type": "n8n-nodes-base.function",
      "position": [
        1088,
        432
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "Telegram 发送食谱列表",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1744,
        432
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "提取选择参数",
      "type": "n8n-nodes-base.function",
      "position": [
        -736,
        816
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "查找食谱行",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        496,
        1120
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "格式化完整食谱",
      "type": "n8n-nodes-base.function",
      "position": [
        1104,
        1120
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "Telegram 发送完整食谱",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1744,
        1120
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "Telegram 发送 AI 响应",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1760,
        1600
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "命令路由器",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1440,
        64
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "name": "食谱 AI 代理",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        848,
        1600
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "name": "Google Gemini 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        400,
        2288
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "对话记忆",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        688,
        2288
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "name": "思考",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        1040,
        2288
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "name": "读取食谱表格",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        1440,
        2272
      ],
      "parameters": {},
      "typeVersion": 4.7
    },
    {
      "name": "更新食谱表格",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        1792,
        2272
      ],
      "parameters": {},
      "typeVersion": 4.7
    },
    {
      "name": "Telegram 发送菜单",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1760,
        -64
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "提取搜索词",
      "type": "n8n-nodes-base.function",
      "position": [
        -768,
        1296
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "准备食谱创建",
      "type": "n8n-nodes-base.function",
      "position": [
        -768,
        1824
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "准备食谱修改",
      "type": "n8n-nodes-base.function",
      "position": [
        -768,
        2304
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1696,
        -240
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        256
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1696,
        912
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1712,
        1440
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        256
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        912
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        912
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "name": "便签8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -816,
        608
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "name": "便签9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        816,
        1424
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "name": "便签 10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -832,
        1168
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "name": "便签 11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -832,
        2096
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "name": "便签12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -848,
        1632
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "name": "便签13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1712,
        2112
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "name": "便签14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1360,
        2112
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "name": "便签15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        2112
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        224,
        2288
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "name": "便签 16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1504,
        -224
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "name": "便签17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1984,
        0
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "name": "便签18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        624,
        2112
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "name": "便签19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        976,
        2112
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        256
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Think": {
      "ai_tool": [
        [
          {
            "node": "Recipe AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Command Router": {
      "main": [
        [
          {
            "node": "Telegram Send Menu",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Read Recipe Names",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Extract Select Param",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare Recipe Modification",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare Recipe Creation",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Extract Search Term",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recipe AI Agent": {
      "main": [
        [
          {
            "node": "Telegram Send AI Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Command Router",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lookup Recipe Row": {
      "main": [
        [
          {
            "node": "Format Full Recipe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Recipe AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Read Recipe Names": {
      "main": [
        [
          {
            "node": "Format List Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Full Recipe": {
      "main": [
        [
          {
            "node": "Telegram Send Full Recipe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Recipes Sheet": {
      "ai_tool": [
        [
          {
            "node": "Recipe AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Conversation Memory": {
      "ai_memory": [
        [
          {
            "node": "Recipe AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Extract Search Term": {
      "main": [
        [
          {
            "node": "Recipe AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format List Message": {
      "main": [
        [
          {
            "node": "Telegram Send Recipe List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Select Param": {
      "main": [
        [
          {
            "node": "Lookup Recipe Row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Recipes Sheet": {
      "ai_tool": [
        [
          {
            "node": "Recipe AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Recipe Creation": {
      "main": [
        [
          {
            "node": "Recipe AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        []
      ]
    },
    "Prepare Recipe Modification": {
      "main": [
        [
          {
            "node": "Recipe AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 个人效率, AI 聊天机器人

需要付费吗?

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

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

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

外部链接
在 n8n.io 查看

分享此工作流