🤙 Telegram 来电接入

高级

这是一个自动化工作流,包含 35 个节点。主要使用 If、Set、Code、Redis、Switch 等节点。 AI聊天机器人呼叫中心:Telegram呼入(生产就绪,第1a部分)

前置要求
  • Redis 服务器连接信息
  • PostgreSQL 数据库连接信息
  • Telegram Bot Token

分类

未分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "pT3WWhziyHqc0Wru",
  "meta": {
    "instanceId": "daae7bb90c8655b08e0b68de8a52b1178f2812f6a234efb0b0509279dbb70b3e",
    "templateCredsSetupCompleted": true
  },
  "name": "🤙 Telegram 来电接入",
  "tags": [
    {
      "id": "no8Mb078mvRgw7PS",
      "name": "DEMO",
      "createdAt": "2025-04-30T05:34:10.330Z",
      "updatedAt": "2025-04-30T05:34:10.330Z"
    },
    {
      "id": "M2uPwGVjWmavBPky",
      "name": "2.0",
      "createdAt": "2025-05-01T16:38:48.524Z",
      "updatedAt": "2025-05-01T16:38:48.524Z"
    },
    {
      "id": "WfVDdyMwitySVPfo",
      "name": "Input",
      "createdAt": "2025-05-05T10:21:45.271Z",
      "updatedAt": "2025-05-05T10:21:45.271Z"
    }
  ],
  "nodes": [
    {
      "id": "83a6a0bd-4d48-4a83-9ac4-9c5391267e70",
      "name": "Telegram 触发器",
      "type": "n8n-nodes-base.telegramTrigger",
      "notes": "@chpy_demo_bot",
      "position": [
        -1560,
        820
      ],
      "webhookId": "dcac86de-74a3-48e4-81b2-7b63c8fac5be",
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1.2
    },
    {
      "id": "604b543f-6eb1-4c3b-88ed-59e21690392d",
      "name": "测试触发器",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -1560,
        1560
      ],
      "webhookId": "9ed1eb5f-bfe9-4bd3-8451-b26d11613388",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "da05274e-8d03-47a6-9e6d-4e67e51d4232",
      "name": "测试输入",
      "type": "n8n-nodes-base.set",
      "position": [
        80,
        1560
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "8fcce9e5-83fe-4d34-a085-18d3236237d5",
      "name": "Telegram 输入",
      "type": "n8n-nodes-base.set",
      "position": [
        80,
        1060
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "4ac6e9d3-3a49-49c1-af6e-03dea00a4487",
      "name": "类型切换",
      "type": "n8n-nodes-base.switch",
      "position": [
        -180,
        800
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "6b11f82b-e996-436f-90b0-02507ded4354",
      "name": "下载音频",
      "type": "n8n-nodes-base.telegram",
      "notes": "@chpy_demo_bot",
      "position": [
        80,
        360
      ],
      "webhookId": "97df0286-dbe3-46dd-ab54-99c01e73e540",
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1.2
    },
    {
      "id": "6c5b409c-23f1-488c-9be9-36ba7ac20f5c",
      "name": "从文件提取",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        260,
        360
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "776fb632-2d0f-4214-be25-e369ec9ab766",
      "name": "Google STT",
      "type": "n8n-nodes-google-speech.googleSpeech",
      "onError": "continueRegularOutput",
      "position": [
        920,
        360
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "ed56defb-887e-4950-a72d-1f5e7132b235",
      "name": "Telegram 语音输入",
      "type": "n8n-nodes-base.set",
      "position": [
        1320,
        340
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "2c34afcc-5936-4009-a3b2-65364f2a4060",
      "name": "输入",
      "type": "n8n-nodes-base.set",
      "position": [
        1560,
        1060
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "4b9e3343-525a-46ee-8164-def8f5603b1b",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "42d7e86f-dd8e-447d-b236-55b6dca3f902",
      "name": "如果是 Telegram",
      "type": "n8n-nodes-base.if",
      "position": [
        1540,
        1560
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "f9a0a9d3-4c74-4322-af8c-06a90edee657",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -20,
        1460
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "d95c57a9-6c1b-474e-86f7-9f6a4dbbaa54",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        960
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "b178b3ca-a944-4d31-a342-a9f1ff6df8e2",
      "name": "便签 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1300,
        880
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "24a7ffa8-86a2-4800-8557-4bfe57aa9f26",
      "name": "如果活跃",
      "type": "n8n-nodes-base.if",
      "position": [
        -720,
        1240
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "a95d2df5-9075-4be7-8428-b67b3ec4e49d",
      "name": "解析服务",
      "type": "n8n-nodes-base.code",
      "position": [
        -720,
        800
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "5d6c8ab7-95b8-4de8-bc9b-9ef55e96f0ec",
      "name": "便签 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        700
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "3b38c690-2b14-44ee-884c-62920a35968e",
      "name": "成员缓存",
      "type": "n8n-nodes-base.redis",
      "notes": "member:telegram:{user_id}:data\nTTL 5m",
      "onError": "continueRegularOutput",
      "position": [
        -1160,
        820
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1
    },
    {
      "id": "a8e8a046-b1ce-4452-82de-84ade7619f73",
      "name": "如果成员缓存",
      "type": "n8n-nodes-base.if",
      "position": [
        -940,
        820
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "6a45ad3d-4afb-4a27-8ab8-39b564007cac",
      "name": "加载成员数据",
      "type": "n8n-nodes-base.postgres",
      "onError": "continueRegularOutput",
      "position": [
        -720,
        1000
      ],
      "parameters": {},
      "executeOnce": true,
      "typeVersion": 2.6,
      "alwaysOutputData": true
    },
    {
      "id": "396b03a6-3d31-4440-89cf-4e206017e97a",
      "name": "保存成员缓存",
      "type": "n8n-nodes-base.redis",
      "notes": "TTL 5m",
      "onError": "continueRegularOutput",
      "position": [
        -440,
        1220
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1
    },
    {
      "id": "ce6bfd49-5e15-4693-9bb0-165b9ab2658c",
      "name": "成员",
      "type": "n8n-nodes-base.set",
      "notes": "language: English",
      "position": [
        -440,
        800
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 3.4
    },
    {
      "id": "01a5ee20-55b5-46e6-b249-3d8dc666be55",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        440,
        320
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "14ec3274-411d-4edf-ba62-20fa251b7632",
      "name": "英语",
      "type": "n8n-nodes-base.set",
      "position": [
        660,
        680
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "04b6d053-f58a-4aed-b973-5b9501e91152",
      "name": "粤语繁体香港",
      "type": "n8n-nodes-base.set",
      "position": [
        660,
        40
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "91fb5e72-928e-46cc-b2a1-a99d6a553f65",
      "name": "中文繁体台湾",
      "type": "n8n-nodes-base.set",
      "position": [
        660,
        360
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "a06a0231-81b6-4670-8471-f8cff2d2c91a",
      "name": "中文简体中国大陆",
      "type": "n8n-nodes-base.set",
      "position": [
        660,
        200
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "f9a3efca-b539-4c70-92c8-db33641715e9",
      "name": "日语日本",
      "type": "n8n-nodes-base.set",
      "position": [
        660,
        520
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "4964da4f-3fde-44c2-b214-fdbf914adf18",
      "name": "如果有转录文本",
      "type": "n8n-nodes-base.if",
      "position": [
        1100,
        360
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "f34dfa75-979e-44fc-9d73-3312e5cb3c4c",
      "name": "无转录文本输入",
      "type": "n8n-nodes-base.set",
      "notes": "I don't understand",
      "position": [
        1720,
        640
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 3.4
    },
    {
      "id": "eb90c445-b21f-4265-aba7-a309eb0d498c",
      "name": "便签 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1620,
        560
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "ddfc222b-b617-470e-96c5-779ebe01c9a7",
      "name": "演示回调",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        1940,
        640
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "09097191-a808-4f35-b111-84604b8ff872",
      "name": "演示呼叫中心",
      "type": "n8n-nodes-base.executeWorkflow",
      "notes": "Demo Call Center",
      "position": [
        1740,
        1060
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1.2
    },
    {
      "id": "f313bea0-0346-4011-82a8-b0a0d4bd46a1",
      "name": "Telegram 测试输出",
      "type": "n8n-nodes-base.telegram",
      "notes": "@chpy_demo_bot",
      "position": [
        1720,
        1540
      ],
      "webhookId": "ff303e8b-3ed5-429f-b26b-88acf01bc90d",
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "timezone": "Etc/UTC",
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": "vuso7W8t402BPcT2",
    "executionOrder": "v1"
  },
  "versionId": "86a4b876-5de9-4f72-afdf-a613d56fe94c",
  "connections": {
    "Input": {
      "main": [
        [
          {
            "node": "Demo Call Center",
            "type": "main",
            "index": 0
          },
          {
            "node": "If Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ja-JP": {
      "main": [
        [
          {
            "node": "Google STT",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Member": {
      "main": [
        [
          {
            "node": "Type Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "yue-Hant-HK",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "cmn-Hans-CN",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "cmn-Hant-TW",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "ja-JP",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "English",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "English": {
      "main": [
        [
          {
            "node": "Google STT",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Active": {
      "main": [
        [
          {
            "node": "Save Member Cache",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Save Member Cache",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google STT": {
      "main": [
        [
          {
            "node": "If Transcript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Test Input": {
      "main": [
        [
          {
            "node": "Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Telegram": {
      "main": [
        [
          {
            "node": "Telegram Test Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Type Switch": {
      "main": [
        [
          {
            "node": "Telegram Input",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Download Audio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cmn-Hant-TW": {
      "main": [
        [
          {
            "node": "Google STT",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "yue-Hant-HK": {
      "main": [
        [
          {
            "node": "Google STT",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Member Cache": {
      "main": [
        [
          {
            "node": "If Member Cache",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Test Trigger": {
      "main": [
        [
          {
            "node": "Test Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Transcript": {
      "main": [
        [
          {
            "node": "Telegram Voice Input",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Transcript Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Service": {
      "main": [
        [
          {
            "node": "Member",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Audio": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Input": {
      "main": [
        [
          {
            "node": "Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Member Cache": {
      "main": [
        [
          {
            "node": "Parse Service",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Load Memer Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Load Memer Data": {
      "main": [
        [
          {
            "node": "If Active",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Member Cache",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Member Cache": {
      "main": [
        [
          {
            "node": "Member",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "No Transcript Input": {
      "main": [
        [
          {
            "node": "Demo Call Back",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Voice Input": {
      "main": [
        [
          {
            "node": "Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

这是一个高级难度的通用自动化工作流。适合高级用户,包含 16+ 个节点的复杂工作流

需要付费吗?

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

工作流信息
难度等级
高级
节点数量35
分类-
节点类型13
难度说明

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

作者
ChatPayLabs

ChatPayLabs

@chatpaylabs

Production Ready AI n8n Workflow Templates Startup Fundraising 💰 Support Us 🦄

外部链接
在 n8n.io 上查看 →

分享此工作流