8
n8n 中文网amn8n.com

通过Telegram AI代理管理KlickTipp中的联系人

高级

这是一个CRM, AI Chatbot领域的自动化工作流,包含 47 个节点。主要使用 Set, Switch, Telegram, Agent, TelegramTrigger 等节点。 通过Telegram机器人和GPT-4o代理管理KlickTipp联系人

前置要求
  • Telegram Bot Token
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "de1Bmx0unOb4OzvK",
  "meta": {
    "instanceId": "95b3ab5a70ab1c8c1906357a367f1b236ef12a1409406fd992f60255f0f95f85",
    "templateCredsSetupCompleted": true
  },
  "name": "通过 Telegram AI Agent 管理 KlickTipp 中的联系人",
  "tags": [],
  "nodes": [
    {
      "id": "9989921d-2df3-40fe-9f0a-090e637763d8",
      "name": "当收到聊天消息时",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        1400,
        -500
      ],
      "webhookId": "97bfbff2-3629-4262-8669-29888c42ae23",
      "parameters": {
        "mode": "webhook",
        "public": true,
        "options": {},
        "authentication": "n8nUserAuth"
      },
      "typeVersion": 1.1
    },
    {
      "id": "25d78214-6214-489f-ab3f-c7113b813838",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2240,
        -620
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "ai4Z3wkDckKxBl1U",
          "name": "(Mykhailo) OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5b7ea68f-8a51-4413-af04-3cca7f1ca86f",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2200,
        -960
      ],
      "parameters": {
        "color": 7,
        "width": 600,
        "height": 460,
        "content": "## 2. 将任意 Agent 与 KlickTipp 工具连接"
      },
      "typeVersion": 1
    },
    {
      "id": "92ab0e41-049b-43ac-8f39-e5b02e7562e7",
      "name": "简单记忆",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        2420,
        -620
      ],
      "parameters": {
        "sessionKey": "={{ $('Telegram Trigger').isExecuted ? $('Telegram Trigger').item.json.message.from.id : $('When chat message received').item.json.sessionId }}",
        "sessionIdType": "customKey"
      },
      "typeVersion": 1.3
    },
    {
      "id": "0069ee54-c56f-4e45-ab66-8f02bb3b312b",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        740,
        -960
      ],
      "parameters": {
        "width": 580,
        "height": 2040,
        "content": "社区节点免责声明:由于此工作流依赖社区节点,仅限于自托管环境。"
      },
      "typeVersion": 1
    },
    {
      "id": "20256111-b1fe-44c3-a2f9-ed1525b9e84b",
      "name": "列出联系人",
      "type": "n8n-nodes-klicktipp.klicktippTool",
      "position": [
        2420,
        -200
      ],
      "parameters": {
        "resource": "subscriber",
        "descriptionType": "manual",
        "toolDescription": "List all contacts"
      },
      "credentials": {
        "klickTippApi": {
          "id": "NTht3frPxvENgu0k",
          "name": "Mykhaylo's KlickTipp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "35250ba6-bad1-4926-98ff-007e2f60ed21",
      "name": "获取联系人",
      "type": "n8n-nodes-klicktipp.klicktippTool",
      "position": [
        2740,
        -200
      ],
      "parameters": {
        "resource": "subscriber",
        "operation": "get",
        "subscriberId": "={{ $fromAI(\"contactId\", \"The contact's ID. Required\", \"number\", \"\") }}",
        "descriptionType": "manual",
        "toolDescription": "Returns the complete data of a contact."
      },
      "credentials": {
        "klickTippApi": {
          "id": "NTht3frPxvENgu0k",
          "name": "Mykhaylo's KlickTipp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "8aebefc8-34b7-4f66-b773-772ccf3deebb",
      "name": "获取联系人 ID",
      "type": "n8n-nodes-klicktipp.klicktippTool",
      "position": [
        2900,
        -200
      ],
      "parameters": {
        "email": "={{ $fromAI(\"email\", \"The contact's email address.\", \"string\", \"\") }}",
        "resource": "subscriber",
        "operation": "search",
        "descriptionType": "manual",
        "toolDescription": "Returns the contact ID for an email address."
      },
      "credentials": {
        "klickTippApi": {
          "id": "NTht3frPxvENgu0k",
          "name": "Mykhaylo's KlickTipp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "8ff3ff81-0476-49d1-9627-840e12e50761",
      "name": "列出已标记联系人",
      "type": "n8n-nodes-klicktipp.klicktippTool",
      "position": [
        2900,
        -40
      ],
      "parameters": {
        "tagId": "={{ $fromAI(\"tagId\", \"The tag ID. Required\", \"number\", \"\") }}",
        "resource": "subscriber",
        "operation": "tagged",
        "descriptionType": "manual",
        "toolDescription": "Lists the IDs and tagging timestamps of all tagged contacts."
      },
      "credentials": {
        "klickTippApi": {
          "id": "NTht3frPxvENgu0k",
          "name": "Mykhaylo's KlickTipp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "f4177135-1a7e-4245-8931-0ac75465756f",
      "name": "列出标签",
      "type": "n8n-nodes-klicktipp.klicktippTool",
      "position": [
        3320,
        -220
      ],
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Lists the IDs and names of all tags."
      },
      "credentials": {
        "klickTippApi": {
          "id": "NTht3frPxvENgu0k",
          "name": "Mykhaylo's KlickTipp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "8e59d336-79ad-4f6e-8256-f44ab9e2ea27",
      "name": "更新联系人",
      "type": "n8n-nodes-klicktipp.klicktippTool",
      "position": [
        2420,
        -20
      ],
      "parameters": {
        "email": "={{ $fromAI(\"email\", \"The contact's email address.\", \"string\", \"\") }}",
        "fields": {
          "dataFields": [
            {
              "fieldId": "fieldFirstName",
              "fieldValue": "={{ $fromAI(\"fieldFirstName\", \"Contact’s first name.\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldLastName",
              "fieldValue": "={{ $fromAI(\"fieldLastName\", \"Contact’s last name.\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldCompanyName",
              "fieldValue": "={{ $fromAI(\"fieldCompany\", \"Contact’s company name.\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldStreet1",
              "fieldValue": "={{ $fromAI(\"fieldAddress1\", \"Contact’s primary street address\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldStreet2",
              "fieldValue": "={{ $fromAI(\"fieldAddress2\", \"Contact’s secondary street address\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldCity",
              "fieldValue": "={{ $fromAI(\"fieldCity\", \"Contact’s city\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldState",
              "fieldValue": "={{ $fromAI(\"fieldState\", \"Contact’s state or region\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldZip",
              "fieldValue": "={{ $fromAI(\"fieldZip\", \"Contact’s ZIP or postal code\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldCountry",
              "fieldValue": "={{ $fromAI(\"fieldCountry\", \"Contact’s country\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldPrivatePhone",
              "fieldValue": "={{ $fromAI(\"fieldPrivatePhone\", \"Contact’s private phone in international format starting with '00' (e.g., 00491631737743)\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldMobilePhone",
              "fieldValue": "={{ $fromAI(\"fieldMobilePhone\", \"Contact’s mobile phone in international format starting with '00' (e.g., 00491631737743)\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldFax",
              "fieldValue": "={{ $fromAI(\"fieldFax\", \"Contact’s fax number in international format starting with '00' (e.g., 0049301234567)\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldWebsite",
              "fieldValue": "={{ $fromAI(\"fieldWebsite\", \"Contact’s website URL\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldBirthday",
              "fieldValue": "={{ $fromAI(\"fieldBirthday\", \"Contact’s birthday as Unix seconds.\", \"number\", \"\") }}"
            },
            {
              "fieldId": "fieldLeadValue",
              "fieldValue": "={{ $fromAI(\"fieldLeadValue\", \"Estimated lead value as a number\", \"number\", \"\") }}"
            }
          ]
        },
        "resource": "subscriber",
        "operation": "update",
        "smsNumber": "={{ $fromAI(\"smsNumber\", \"The contact's SMS number.\", \"string\", \"\") }}",
        "subscriberId": "={{ $fromAI(\"contactId\", \"The contact's ID. Required\", \"number\", \"\") }}",
        "descriptionType": "manual",
        "toolDescription": "Updates a contact by contact ID."
      },
      "credentials": {
        "klickTippApi": {
          "id": "NTht3frPxvENgu0k",
          "name": "Mykhaylo's KlickTipp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "6463b625-e410-48cd-97e1-88b0d97b32ea",
      "name": "删除联系人",
      "type": "n8n-nodes-klicktipp.klicktippTool",
      "position": [
        2580,
        -20
      ],
      "parameters": {
        "resource": "subscriber",
        "operation": "delete",
        "subscriberId": "={{ $fromAI(\"contactId\", \"The contact's ID. Required\", \"string\", \"\") }}",
        "descriptionType": "manual",
        "toolDescription": "Deletes a contact."
      },
      "credentials": {
        "klickTippApi": {
          "id": "NTht3frPxvENgu0k",
          "name": "Mykhaylo's KlickTipp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "9fbb16a9-6e96-4e75-a1a5-c096fddc1951",
      "name": "取消订阅联系人",
      "type": "n8n-nodes-klicktipp.klicktippTool",
      "position": [
        2740,
        -40
      ],
      "parameters": {
        "email": "={{ $fromAI(\"email\", \"The contact's email address. Required\", \"string\", \"\") }}",
        "resource": "subscriber",
        "operation": "unsubscribe",
        "descriptionType": "manual",
        "toolDescription": "Unsubscribes a contact, preventing further communication."
      },
      "credentials": {
        "klickTippApi": {
          "id": "NTht3frPxvENgu0k",
          "name": "Mykhaylo's KlickTipp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "3c620b1b-55e5-40b4-b371-10dde8c1cefa",
      "name": "创建标签",
      "type": "n8n-nodes-klicktipp.klicktippTool",
      "position": [
        3440,
        -220
      ],
      "parameters": {
        "name": "={{ $fromAI(\"tagName\", \"The tag name. Required\", \"string\", \"\") }}",
        "operation": "create",
        "description": "={{ $fromAI(\"tagDescription\", \"标签描述\", \"string\", \"\") }}",
        "descriptionType": "manual",
        "toolDescription": "Creates a new manual tag."
      },
      "credentials": {
        "klickTippApi": {
          "id": "NTht3frPxvENgu0k",
          "name": "Mykhaylo's KlickTipp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "c451d3cb-6323-432c-a98b-8a8c10d8d386",
      "name": "获取标签",
      "type": "n8n-nodes-klicktipp.klicktippTool",
      "position": [
        3560,
        -220
      ],
      "parameters": {
        "tagId": "={{ $fromAI(\"tagId\", \"The tag ID. Required\", \"number\", \"\") }}",
        "operation": "get",
        "descriptionType": "manual",
        "toolDescription": "Returns the name and description of a tag."
      },
      "credentials": {
        "klickTippApi": {
          "id": "NTht3frPxvENgu0k",
          "name": "Mykhaylo's KlickTipp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "46150de8-a733-4d60-ae45-2019913fce9c",
      "name": "删除标签",
      "type": "n8n-nodes-klicktipp.klicktippTool",
      "position": [
        3680,
        -220
      ],
      "parameters": {
        "tagId": "={{ $fromAI(\"tagId\", \"The tag ID. Required\", \"number\", \"\") }}",
        "operation": "delete",
        "descriptionType": "manual",
        "toolDescription": "Deletes a tag."
      },
      "credentials": {
        "klickTippApi": {
          "id": "NTht3frPxvENgu0k",
          "name": "Mykhaylo's KlickTipp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "4aac4674-be12-4126-9bbd-8bc570c296af",
      "name": "更新标签",
      "type": "n8n-nodes-klicktipp.klicktippTool",
      "position": [
        3800,
        -220
      ],
      "parameters": {
        "name": "={{ $fromAI(\"tagName\", \"The tag name\", \"string\", \"\") }}",
        "tagId": "={{ $fromAI(\"tagId\", \"The tag ID. Required\", \"number\", \"\") }}",
        "operation": "update",
        "description": "={{ $fromAI(\"tagDescription\", \"标签描述\", \"string\", \"\") }}",
        "descriptionType": "manual",
        "toolDescription": "Updates a tag."
      },
      "credentials": {
        "klickTippApi": {
          "id": "NTht3frPxvENgu0k",
          "name": "Mykhaylo's KlickTipp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "7477e0b7-ace7-42f7-8cb8-8ed997592d85",
      "name": "列出选择加入流程",
      "type": "n8n-nodes-klicktipp.klicktippTool",
      "position": [
        1380,
        -220
      ],
      "parameters": {
        "resource": "opt-in",
        "descriptionType": "manual",
        "toolDescription": "Lists the IDs and names of all opt-in processes."
      },
      "credentials": {
        "klickTippApi": {
          "id": "NTht3frPxvENgu0k",
          "name": "Mykhaylo's KlickTipp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "43bda647-d273-4768-a429-0a8abff9bec0",
      "name": "获取选择加入流程",
      "type": "n8n-nodes-klicktipp.klicktippTool",
      "position": [
        1540,
        -220
      ],
      "parameters": {
        "listId": "={{ $fromAI(\"optInId\", \"The opt-in process ID. Required\", \"number\", \"\") }}",
        "resource": "opt-in",
        "operation": "get",
        "descriptionType": "manual",
        "toolDescription": "Returns the complete data of an opt-in process."
      },
      "credentials": {
        "klickTippApi": {
          "id": "NTht3frPxvENgu0k",
          "name": "Mykhaylo's KlickTipp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "88414a45-3d7e-41db-8845-1a31f163ab87",
      "name": "列出数据字段",
      "type": "n8n-nodes-klicktipp.klicktippTool",
      "position": [
        1740,
        -200
      ],
      "parameters": {
        "resource": "field",
        "descriptionType": "manual",
        "toolDescription": "Lists the IDs and names of all data fields."
      },
      "credentials": {
        "klickTippApi": {
          "id": "NTht3frPxvENgu0k",
          "name": "Mykhaylo's KlickTipp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "98642fcd-bb96-4883-856b-7affb03ddffd",
      "name": "获取数据字段",
      "type": "n8n-nodes-klicktipp.klicktippTool",
      "position": [
        1880,
        -200
      ],
      "parameters": {
        "resource": "field",
        "operation": "get",
        "apiFieldId": "={{ $fromAI(\"fieldId\", \"The data field ID. Required\", \"string\", \"\") }}",
        "descriptionType": "manual",
        "toolDescription": "Gets the ID and the name of a data field."
      },
      "credentials": {
        "klickTippApi": {
          "id": "NTht3frPxvENgu0k",
          "name": "Mykhaylo's KlickTipp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "004e895c-361b-464d-b258-889363d369bb",
      "name": "取消标记联系人",
      "type": "n8n-nodes-klicktipp.klicktippTool",
      "position": [
        2080,
        -200
      ],
      "parameters": {
        "email": "={{ $fromAI(\"email\", \"The contact's email address. Required\", \"string\", \"\") }}",
        "tagId": "={{ $fromAI(\"tagId\", \"The tag ID. Required\", \"number\", \"\") }}",
        "resource": "contact-tagging",
        "operation": "untag",
        "descriptionType": "manual",
        "toolDescription": "Removes a tag from a contact."
      },
      "credentials": {
        "klickTippApi": {
          "id": "NTht3frPxvENgu0k",
          "name": "Mykhaylo's KlickTipp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "15134ced-fb09-47f2-a818-4885d62ab47b",
      "name": "标记联系人",
      "type": "n8n-nodes-klicktipp.klicktippTool",
      "position": [
        2220,
        -200
      ],
      "parameters": {
        "email": "={{ $fromAI(\"email\", \"The contact's email address. Required\", \"string\", \"\") }}",
        "tagId": "={{ $fromAI(\"tagIds\", 'All the tag IDs in brackets. For example: [12042204,12054769,12071604]', \"json\") }}",
        "resource": "contact-tagging",
        "descriptionType": "manual",
        "toolDescription": "Adds one or more tags to a contact.\nYou can pass a single tag or a list of tags to apply multiple tags in one call."
      },
      "credentials": {
        "klickTippApi": {
          "id": "NTht3frPxvENgu0k",
          "name": "Mykhaylo's KlickTipp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "79a23888-f41f-4a9c-a045-cefcf7abfb15",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1360,
        -300
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 240,
        "content": "## 选择加入流程"
      },
      "typeVersion": 1
    },
    {
      "id": "155a5b36-8de4-4f74-bf00-37bc62b0c081",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3280,
        -300
      ],
      "parameters": {
        "color": 7,
        "width": 620,
        "height": 220,
        "content": "## 标签操作"
      },
      "typeVersion": 1
    },
    {
      "id": "ecd5521a-899e-4010-b3a8-d4ff6b701f8a",
      "name": "获取重定向 URL",
      "type": "n8n-nodes-klicktipp.klicktippTool",
      "position": [
        3100,
        -220
      ],
      "parameters": {
        "email": "={{ $fromAI(\"email\", \"The contact's email address.\", \"string\", \"\") }}",
        "listId": "={{ $fromAI(\"optInId\", \"The opt-in process ID.\", \"number\", \"\") }}",
        "resource": "opt-in",
        "operation": "getRedirect",
        "descriptionType": "manual",
        "toolDescription": "Gets the redirection URL for a specific opt-in process."
      },
      "credentials": {
        "klickTippApi": {
          "id": "NTht3frPxvENgu0k",
          "name": "Mykhaylo's KlickTipp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "093cb61d-f110-4920-a2cb-b9b4c6681060",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1700,
        -300
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 240,
        "content": "## 数据字段"
      },
      "typeVersion": 1
    },
    {
      "id": "18244673-ef94-4d9c-9a7b-f1d4ff460812",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2040,
        -300
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 240,
        "content": "## 联系人标记"
      },
      "typeVersion": 1
    },
    {
      "id": "a37cbe4b-7ad2-483c-be0e-ca52b67753b3",
      "name": "便签8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3040,
        -300
      ],
      "parameters": {
        "color": 7,
        "width": 200,
        "height": 220,
        "content": "## 重定向"
      },
      "typeVersion": 1
    },
    {
      "id": "58544d4b-8c6b-4cc1-b767-228e55fecca6",
      "name": "添加或更新联系人",
      "type": "n8n-nodes-klicktipp.klicktippTool",
      "position": [
        2580,
        -200
      ],
      "parameters": {
        "email": "={{ $fromAI(\"email\", \"The contact's email address. Required\", \"string\", \"\") }}",
        "tagId": "={{ $fromAI(\"tagId\", \"The tag ID.\", \"number\", 0) }}",
        "fields": {
          "dataFields": [
            {
              "fieldId": "fieldFirstName",
              "fieldValue": "={{ $fromAI(\"fieldFirstName\", \"Contact’s first name.\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldLastName",
              "fieldValue": "={{ $fromAI(\"fieldLastName\", \"Contact’s last name.\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldCompanyName",
              "fieldValue": "={{ $fromAI(\"fieldCompany\", \"Contact’s company name.\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldStreet1",
              "fieldValue": "={{ $fromAI(\"fieldAddress1\", \"Contact’s primary street address\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldStreet2",
              "fieldValue": "={{ $fromAI(\"fieldAddress2\", \"Contact’s secondary street address\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldCity",
              "fieldValue": "={{ $fromAI(\"fieldCity\", \"Contact’s city\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldState",
              "fieldValue": "={{ $fromAI(\"fieldState\", \"Contact’s state or region\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldZip",
              "fieldValue": "={{ $fromAI(\"fieldZip\", \"Contact’s ZIP or postal code\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldCountry",
              "fieldValue": "={{ $fromAI(\"fieldCountry\", \"Contact’s country\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldMobilePhone",
              "fieldValue": "={{ $fromAI(\"fieldMobilePhone\", \"Contact’s mobile phone in international format starting with '00' (e.g., 00491631737743)\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldPrivatePhone",
              "fieldValue": "={{ $fromAI(\"fieldPrivatePhone\", \"Contact’s private phone in international format starting with '00' (e.g., 00491631737743)\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldFax",
              "fieldValue": "={{ $fromAI(\"fieldFax\", \"Contact’s fax number in international format starting with '00' (e.g., 0049301234567)\", \"string\", \"\") }}"
            },
            {
              "fieldId": "fieldBirthday",
              "fieldValue": "={{ $fromAI(\n     \"fieldBirthday\",\n     \"Unix seconds for the contact’s birthday — supply **only** when the user explicitly asks to set a birthday (keywords: birthday / birth date / set birthday). Otherwise leave undefined.\",\n     \"number\",\n     undefined\n) ?? undefined }}"
            },
            {
              "fieldId": "fieldLeadValue",
              "fieldValue": "={{ $fromAI(\"fieldLeadValue\", \"Estimated lead value as a number\", \"number\", \"\") }}"
            },
            {
              "fieldId": "fieldWebsite",
              "fieldValue": "={{ $fromAI(\"fieldWebsite\", \"Contact’s website URL\", \"string\", \"\") }}"
            }
          ]
        },
        "listId": "={{ $fromAI(\"optInId\", \"The opt-in process ID.\", \"number\", 0) }}",
        "resource": "subscriber",
        "operation": "subscribe",
        "smsNumber": "={{ $fromAI(\"smsNumber\", \"The contact's SMS number.\", \"string\", \"\") }}",
        "descriptionType": "manual",
        "toolDescription": "Adds a new contact. If a contact with the same email already exists, it will be updated."
      },
      "credentials": {
        "klickTippApi": {
          "id": "NTht3frPxvENgu0k",
          "name": "Mykhaylo's KlickTipp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "b0775e10-e8ed-4fed-bc11-c5674f36ccd4",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2380,
        -300
      ],
      "parameters": {
        "color": 7,
        "width": 640,
        "height": 420,
        "content": "## 联系人管理"
      },
      "typeVersion": 1
    },
    {
      "id": "d3537987-67eb-45bd-8100-0c39635bf112",
      "name": "时间戳转日期",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "onError": "continueRegularOutput",
      "position": [
        3980,
        -220
      ],
      "parameters": {
        "jsCode": "const raw = query;\n\nif (!raw) {\n  return 'N/A';\n}\n\nif (raw === '') {\n  return 'N/A';\n}\n\nconst secs = Number(raw);\nconst isTimestamp = Number.isFinite(secs) && /^[+-]?\\d{8,13}$/.test(String(raw));\n\nif (!isTimestamp) {\n  return 'N/A';\n}\n\nconst ms = secs * 1000;\n\nconst formatted = DateTime\n  .fromMillis(ms, { zone: 'UTC' })\n  .setZone('Europe/Berlin')\n  .toFormat('dd.MM.yyyy HH:mm:ss ZZZ');\n\nreturn String(formatted);",
        "description": "调用此工具将传入的 Unix 秒时间戳转换为 UTC 日期字符串"
      },
      "typeVersion": 1.2,
      "alwaysOutputData": false
    },
    {
      "id": "61919f98-d3bc-463d-ac83-c9cefc8113a5",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3920,
        -300
      ],
      "parameters": {
        "color": 7,
        "width": 400,
        "height": 220,
        "content": "## 附加工具"
      },
      "typeVersion": 1
    },
    {
      "id": "15729f44-2d72-42a1-9255-b100c685d8af",
      "name": "日期转时间戳",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "position": [
        4160,
        -220
      ],
      "parameters": {
        "jsCode": "const raw = query || 'N/A';\n\nconst formats = [\n  'd.LL.yyyy HH:mm:ss',\n  'd.LL.yyyy',           \n  'd LLLL yyyy HH:mm:ss',\n  'd LLLL yyyy',  \n  'd LLL yyyy',\n  'yyyy-MM-dd',\n  'LLLL d, yyyy',\n  'd-M-yyyy',\n];\n\nlet dt = null;\nfor (const fmt of formats) {\n  dt = DateTime.fromFormat(raw, fmt, {\n    zone  : 'Europe/Berlin',\n    locale: 'en',\n  });\n  if (dt.isValid) break;\n}\n\nif (!dt?.isValid) {\n  dt = DateTime.fromISO(raw, { zone: 'Europe/Berlin' });\n}\n\nif (!dt?.isValid) {\n  dt = DateTime.fromSQL?.(raw, { zone: 'Europe/Berlin' });\n}\n\nif (!dt?.isValid) {\n  return 'N/A';\n}\n\nconst timestamp = Math.floor(dt.toUTC().toSeconds());\n\nreturn timestamp;",
        "description": "调用此工具将人类可读的日期字符串(例如 05.05.2025 01:00:00)转换为 Unix 时间戳(秒)"
      },
      "typeVersion": 1.2,
      "alwaysOutputData": true
    },
    {
      "id": "017aaa9a-0315-4e58-aa95-b853b132a68d",
      "name": "Telegram 触发器",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        1400,
        -840
      ],
      "webhookId": "31751764-cf74-40df-8199-e373b665dddb",
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "ZCMqFgXRWNGVFhmQ",
          "name": "KlickTipp Telegram bot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "43e27fbf-5dd2-490a-af4d-4db8559fc499",
      "name": "下载语音文件",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1860,
        -920
      ],
      "webhookId": "c1094130-ae1a-4063-8cbf-2cbd07be1bdd",
      "parameters": {
        "fileId": "={{ $('Telegram Trigger').item.json.message.voice.file_id }}",
        "resource": "file"
      },
      "credentials": {
        "telegramApi": {
          "id": "ZCMqFgXRWNGVFhmQ",
          "name": "KlickTipp Telegram bot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "e5a8bd05-e780-46b3-802a-23272a2e4bea",
      "name": "转录音频",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2020,
        -920
      ],
      "parameters": {
        "options": {},
        "resource": "audio",
        "operation": "transcribe",
        "binaryPropertyName": "=data"
      },
      "credentials": {
        "openAiApi": {
          "id": "ai4Z3wkDckKxBl1U",
          "name": "(Mykhailo) OpenAi account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "2c4490d8-0df0-46df-a833-b166058057b4",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        3080,
        -940
      ],
      "webhookId": "f27ecff7-80d3-40c6-abeb-40dd199fc044",
      "parameters": {
        "text": "={{ $json.output }}",
        "chatId": "={{ $('Telegram Trigger').item.json.message.from.id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "ZCMqFgXRWNGVFhmQ",
          "name": "KlickTipp Telegram bot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "24fed1b4-e71c-4a4a-a9eb-f6150776ee8d",
      "name": "无操作,不执行任何操作",
      "type": "n8n-nodes-base.noOp",
      "position": [
        3080,
        -740
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "348c9850-4a12-4f03-a09a-5d46bcde4ef2",
      "name": "便签9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1360,
        -960
      ],
      "parameters": {
        "color": 7,
        "width": 820,
        "height": 380,
        "content": "## 1. 来自 Telegram 机器人的消息"
      },
      "typeVersion": 1
    },
    {
      "id": "c5a1203d-c011-4ecf-bc11-615e390f58c5",
      "name": "便签 10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1360,
        -560
      ],
      "parameters": {
        "color": 7,
        "width": 820,
        "height": 220,
        "content": "## 1. 来自 n8n 聊天的消息"
      },
      "typeVersion": 1
    },
    {
      "id": "0479362b-ca2c-4aa9-ad53-721e91950df5",
      "name": "便签 11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2820,
        -960
      ],
      "parameters": {
        "color": 7,
        "width": 460,
        "height": 460,
        "content": "## 3. 输出"
      },
      "typeVersion": 1
    },
    {
      "id": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
      "name": "KlickTipp Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2400,
        -860
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "options": {
          "systemMessage": "You are the KlickTipp AI Agent integrated with n8n, helping users manage their KlickTipp data through secure API tools.\n\n## CORE IDENTITY\n- **Role**: AI assistant for KlickTipp contact, tag, list, field, and opt-in/out management\n- **Communication**: Friendly, knowledgeable, AI-first approach\n- **Scope**: ONLY KlickTipp-related tasks. For other requests:\n  - Programming/debugging: \"I'm specialized in KlickTipp management. For coding help, please use a general AI assistant.\"\n  - Off-topic questions: \"I can only help with KlickTipp contacts, tags, and related features.\"\n  - KlickTipp technical issues: Refer to KlickTipp Support: https://www.klicktipp.com/de/support/\n\n## LANGUAGE PROTOCOL\n1. **Check EVERY user message** for language → set as currentLang\n2. **Always respond in the language of the LAST user message**\n3. If detection unclear, maintain previous language (don't ask)\n4. Detection patterns:\n   - German indicators: \"Hallo\", \"zeige\", \"bitte\", \"kannst du\", \"alle\", \"erstelle\", \"ja\", \"nein\", \"kontakt\", \"kontakte\"\n   - English indicators: \"show\", \"please\", \"can you\", \"hello\", \"create\", \"all\", \"yes\", \"no\", \"contact\", \"contacts\"\n   - Ambiguous single words: check context or maintain previous language\n   - Email addresses and names: language-neutral, maintain previous language\n5. **Dynamic switching**: User can switch languages anytime by using clear indicators\n6. **German language rules**:\n   - Use informal \"Du\" (not \"Sie\")\n   - Capitalize all forms of \"Du\" pronouns: Du, Dir, Dich, Dein, Deine, Deinem, Deinen, Deiner, Deines\n   - Example: \"Ich helfe Dir gerne mit Deinen Kontakten\"\n7. **Example flow**:\n   - User: \"Create new contact\" → AI responds in English\n   - User: \"zeige alle kontakte\" → AI responds in German with \"Du\"\n   - User: \"show all tags\" → AI responds in English\n\n## OPERATIONAL PRINCIPLES\n1. **Customer Obsession** - User success is your mission\n2. **Understand First** - Seek clarity before acting\n3. **AI First** - Use AI for smarter, faster solutions\n4. **Make It Work, Then Make It Good** - Build iteratively\n5. **Focus on Impact** - Prioritize what truly matters\n6. **Build Trust** - Be transparent and dependable\n7. **Own Mistakes** - Accept responsibility and offer solutions\n8. **Dream Big, Stay Grounded** - Think boldly, execute realistically\n\n## CRITICAL EXECUTION RULES\n1. **ALWAYS CALL TOOLS** - Never display data not fetched in current turn\n2. **NEVER INVENT DATA** - Output only what tools return\n3. **FOLLOW RESPONSE FORMAT EXACTLY** - No skipped sections or extra headings\n\n## WORKFLOW\n1. Think and plan silently (do not reveal plan to user)\n2. Ignore cached data; treat every request as fresh\n3. Execute planned tool calls precisely\n4. Use mandated CONTACT-RESPONSE FORMAT\n5. If unclear - STOP and ask user (never guess)\n\n## DATA CREATION GUIDELINES\nWhen creating contacts:\n- **Required**: Either email OR smsNumber OR both (at least one must be provided)\n- **Phone number detection**: Numbers starting with 00, +, or containing only digits → treat as smsNumber\n- **NEVER ASK for any information** - create immediately with provided data\n- **DO NOT mention** optional fields, defaults, or missing information\n- If only email provided: set smsNumber = \"\"\n- If only SMS provided: set email = \"\"\n- If both provided: use both values as given\n- For other optional parameters: only include if user explicitly mentions them\n- Auto-select defaults silently: first opt-in process and first tag if not specified\n- Only ask user if multiple matches for ambiguous names\n- **Example responses**:\n  - User: \"create contact email@example.com\" → Create with email, smsNumber=\"\"\n  - User: \"add contact 00491234567890\" → Create with SMS, email=\"\"\n  - User: \"add new contact 00380961987651\" → Create with smsNumber=\"00380961987651\", email=\"\"\n  - User: \"create contact john@doe.com +491234567890\" → Create with both email and SMS\n  - User: \"add john@doe.com with tag Customer\" → Create with email and tag\n  - NEVER say: \"I'll need some basic information\" or \"any additional information?\"\n\n## CONTACT ENRICHMENT SUB-ROUTINE\n**MANDATORY for displaying any contact - enrichContact(contactId):**\n1. getContactById(contactId) → contact\n2. If contact.listid exists → getOptInProcess(contact.listid) → optInData\n   - If optInData.name empty → set \"Predefined double opt-in process\"\n3. **ALWAYS check contact.tags** → for each tagId in contact.tags:\n   - Call getTag(tagId) → tagData\n   - Collect all tag details into tagsDetailed[]\n4. If contact.fieldBirthday exists and is not empty string:\n   - Call timestampToDate with parameter: input = contact.fieldBirthday (as string)\n   - If successful → readableBirthday = result\n   - If error or returns 'N/A' → skip birthday field\n5. Build cleanedContact: start with contact, remove optin/listid, add:\n   - birthday = readableBirthday (only if successfully converted)\n   - optInProcess = optInData || null\n   - tags = tagsDetailed[] (MUST include tag names and descriptions)\n6. return cleanedContact\n\n## RESPONSE LIMITS\n- **Message Size**: If reply > 3900 characters, send: \"I found **[count]** contacts, which is more than can be sent via Telegram in one message. Please give me an email address or a narrower filter if you'd like specific details.\"\n- **Contact List**: If > 10 contacts, show first 5 with message: \"Here are the first 5 of **[total]** contacts I found. If you need details on another contact, please specify the email address or refine your filter.\"\n\n## INTENT ROUTING (Apply in order, first match wins)\n1. **Contact creation with phone number only** → If \"create/add\" + number pattern (00, +, or digits) → Create with SMS (Playbook 6)\n2. **Exact email present** → Show/Tell about email (Playbook 2)\n3. **Tag operations**:\n   a. Copy-tags follow-up (if previous message asked \"Would you like me to copy...?\" AND current includes \"copy\") → Playbook 4\n   b. Add-tags request → Playbook 3\n4. **Numeric limit or date filter** → Show contacts with filter (Playbook 1)\n5. **Default** → Show all contacts (Playbook 1)\n\n## PLAYBOOKS\n\n### Playbook 1: Show contacts (all/limited/filtered)\n1. listContacts() → get contact IDs\n2. Apply filters/limits as requested\n3. Apply CONTACT-LIST LIMIT (max 5 contacts)\n4. For each remaining contact ID:\n   - Call enrichContact(contactId) following the CONTACT ENRICHMENT SUB-ROUTINE\n   - This MUST include: getting tags, opt-in process, and formatting birthday\n5. Collect all enriched contacts\n6. Check MESSAGE SIZE GUARD\n7. Display enriched contacts with all details if guard passes\n\n### Playbook 2: Show/tell about email\n1. getContactIdByEmail(email)\n2. enrichContact(id)\n3. returnContact()\n\n### Playbook 3: Add tag(s) to existing contact\n1. listTags() → map names to tagIds[]\n2. tagContact(email, tagIds[])\n\n### Playbook 4: Copy tags to contact (follow-up only)\n1. getContactIdByEmail(targetEmail)\n2. tagContact(targetEmail, tagIds[])\n\n### Playbook 5: Create contact from template\n1. Pull sourceContact fields; convert birthday if present\n2. addOrUpdateContact(newEmail, data, optInId)\n3. tagContact(newEmail, filteredTagIds[])\n\n### Playbook 6: Create/add contact with data\n1. **Validate input**: Ensure either email OR smsNumber (or both) is provided\n   - If only email: set smsNumber = \"\"\n   - If only smsNumber: set email = \"\"\n   - If both provided: use both values\n   - If neither provided: STOP and say \"Please provide either an email address or SMS number\"\n2. Convert birthday to timestamp if present\n3. Map opt-in/tag names to IDs if given (use first as default if not specified)\n4. addOrUpdateContact(email, smsNumber, data, optInId)\n5. If email provided and tags specified: tagContact(email, tagIds[])\n\n### Playbook 7: Show contacts with specific tag(s)\n1. listTags() → map names to tagIds[]\n2. For each tagId → listTaggedContacts(tagId)\n3. Apply filters/limits\n4. Apply CONTACT-LIST LIMIT\n5. For each remaining contact → enrichContact(contactId) → collect enriched contacts\n6. Check MESSAGE SIZE GUARD\n7. returnContacts() if guard passes\n\n## FINAL RULE\nIf uncertain at any point - STOP, ask the user or call a lookup tool. NEVER guess."
        },
        "promptType": "define"
      },
      "typeVersion": 1.9,
      "alwaysOutputData": true
    },
    {
      "id": "8df2a333-e451-46a9-b429-36bb5fa66c95",
      "name": "设置来自 n8n 聊天的文本",
      "type": "n8n-nodes-base.set",
      "position": [
        1600,
        -500
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "8f30ef73-38a6-47e6-8948-aa93a235aac8",
              "name": "text",
              "type": "string",
              "value": "={{ $json.chatInput }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "7081bd79-6837-4f2d-b1f2-f74840a46ac8",
      "name": "设置来自 Telegram 的文本",
      "type": "n8n-nodes-base.set",
      "position": [
        1860,
        -740
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "54e79aad-6145-4a36-bfc2-d0d380998edb",
              "name": "text",
              "type": "string",
              "value": "={{ $json.message.text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "e0340f07-3c1f-427b-8b4d-c6e1ab28cf9f",
      "name": "检查消息类型",
      "type": "n8n-nodes-base.switch",
      "position": [
        1600,
        -840
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Is voice message?",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "31e900d3-c974-4d23-8fd6-18522272e840",
                    "operator": {
                      "type": "object",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "={{ $('Telegram Trigger').item.json.message.voice }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Is text message?",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "0106af1b-bb61-431b-ab76-32f656b8b116",
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "={{ $('Telegram Trigger').item.json.message.text }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "7633d54b-5675-42ad-95ca-9c13c47c44a0",
      "name": "检查来源",
      "type": "n8n-nodes-base.switch",
      "position": [
        2840,
        -860
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Is Telegram",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "c95e7336-fd11-4156-a4ef-8d25018e4517",
                    "operator": {
                      "type": "boolean",
                      "operation": "true",
                      "singleValue": true
                    },
                    "leftValue": "={{ $('Telegram Trigger').isExecuted }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Is n8n chat",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "11a17ee9-6810-4f57-aea4-c7d0c13c29f0",
                    "operator": {
                      "type": "boolean",
                      "operation": "false",
                      "singleValue": true
                    },
                    "leftValue": "={{ $('Telegram Trigger').isExecuted }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    }
  ],
  "active": true,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "773c3b4d-9eb6-4abb-9dbc-0c9328d8591a",
  "connections": {
    "Get Tag": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "List Tags": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Create Tag": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Delete Tag": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Update Tag": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Contact": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Tag Contact": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "List Contacts": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Untag Contact": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Delete Contact": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Contact ID": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Data Field": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Update Contact": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "KlickTipp Agent": {
      "main": [
        [
          {
            "node": "Check the source",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check the source": {
      "main": [
        [
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Redirect URL": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "List Data Fields": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Check the message type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transcribe audio": {
      "main": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Date to timestamp": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Timestamp to date": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Opt-in Process": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Download voice file": {
      "main": [
        [
          {
            "node": "Transcribe audio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Unsubscribe Contact": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "List Tagged Contacts": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Add or Update Contact": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "List Opt-in Processes": {
      "ai_tool": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Check the message type": {
      "main": [
        [
          {
            "node": "Download voice file",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set text from Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set text from Telegram": {
      "main": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set text from the n8n chat": {
      "main": [
        [
          {
            "node": "KlickTipp Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Set text from the n8n chat",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 客户关系管理, AI 聊天机器人

需要付费吗?

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

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

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

作者
KlickTipp

KlickTipp

@KlickTipp

Reach more people. 100% GDPR compliant. Quickly create automated email campaigns, SMS and marketing automations. Market your knowledge independently of Google & Co., sell lucrative products and activate your customers.

外部链接
在 n8n.io 查看

分享此工作流