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": "Manage contacts in KlickTipp via Telegram AI Agent",
  "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 Chat Model",
      "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. Connect any Agent with a KlickTipp tools"
      },
      "typeVersion": 1
    },
    {
      "id": "92ab0e41-049b-43ac-8f39-e5b02e7562e7",
      "name": "Simple Memory",
      "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": "Community Node Disclaimer: As this workflow relies on a community node, it is limited to self-hosted environments.\n\n### How It Works\n\n**AI Agent and KlickTipp Tools Integration via Telegram:**\nThis component connects a large language model (LLM), such as Claude or OpenAI, to the KlickTipp contact management platform through Telegram messaging. The AI Agent interprets natural language queries received from Telegram and dynamically maps them to KlickTipp API operations, enabling intuitive and automated contact handling through a familiar messaging interface.\n\n### Key Features\n\n**Telegram & LLM Interaction Setup:**\n- Captures messages received via Telegram bot as an alternative to the chat message node.\n- Maintains conversation state using a memory buffer tied to Telegram chat IDs.\n- Interprets user input using an LLM (Claude or OpenAI).\n- Routes interpreted commands to specific KlickTipp tools based on detected intent.\n- Sends responses back to Telegram users with operation results.\n\n\n**KlickTipp Integration:**\nComplete set of KlickTipp API endpoints included:\n- **Contact Management:** Add, update, get, list, delete, and unsubscribe contacts.\n- **Contact Tagging:** Tag, untag, list tagged contacts.\n- **Tag Operations:** Create, get, update, delete, list tags.\n- **Opt-In Processes:** List and retrieve opt-in process details.\n- **Data Fields:** List and get custom data fields.\n- **Redirects:** Retrieve redirect URLs.\n\n\n**Use Cases Supported:**\n- Query contact information via email or name through Telegram messages.\n- Identify and segment contacts by city, region, or behavior via Telegram commands.\n- Create or update contacts from data provided in Telegram messages.\n- Dynamically apply or remove tags to initiate campaigns through Telegram bot interactions.\n- Automate targeted outreach based on contact attributes using Telegram as the control interface.\n\n### Setup Instructions\n\n**Install and Configure Nodes:**\n- Set up a Telegram bot using [BotFather](https://core.telegram.org/bots#6-botfather) and obtain the bot token.\n- Configure the Telegram Trigger node in n8n with your bot token.\n- Configure the LLM model (e.g., OpenAI or Claude) and memory node if used.\n- Connect all required KlickTipp nodes and authenticate using valid API credentials.\n- Activate the workflow.\n\n\n**Define Tagging and Field Mapping:**\n- Identify which fields and tags are relevant to your use cases.\n- Ensure necessary tags and custom fields are already created in KlickTipp.\n\n\n**Workflow Logic:**\n1. **Trigger via Telegram:** A message is received by the Telegram bot and passed to the AI Agent.\n2. **Query Handling via LLM Agent:** AI interprets the natural language input and determines the action.\n3. **Contact Search & Segmentation:** Searches contacts using identifiers (email, address) or criteria.\n4. **Data Operations:** Retrieves, updates, or manages contact and tag data based on interpreted command.\n5. **Campaign Preparation:** Applies tags or sends campaign triggers depending on query results.\n6. **Response via Telegram:** Sends formatted results back to the Telegram user.\n\n\n**Benefits:**\n- **Mobile-First Interface:** Users can manage KlickTipp contacts directly from Telegram on any device.\n- **AI-Powered Automation:** Reduces manual contact search and tagging efforts through intelligent processing.\n- **Scalable Integration:** Built-in support for full range of KlickTipp operations allows diverse use-case handling.\n- **Data Consistency:** Ensures structured data flows between Telegram, AI, and KlickTipp, minimizing errors.\n\n\n**Testing and Deployment:**\nUse defined Telegram messages such as:\n- “Tell me something about the contact with email address X”\n- “Tag all contacts from region Y”\n- “Send campaign Z to customers in area A”\n\n\nValidate expected actions in KlickTipp after message execution and confirm responses in Telegram.\n\n\n**Notes:**\n- **Customization:** Adjust tag logic, AI prompts, and contact field mappings based on project needs.\n- **Extensibility:** The template can be expanded with further logic for Google Sheets input or campaign feedback loops"
      },
      "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\", \"The tag description\", \"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\", \"The tag description\", \"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": "## Opt-in Processes\n"
      },
      "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": "## Tag Operations\n"
      },
      "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": "## Data Fields\n"
      },
      "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": "## Contact Tagging\n"
      },
      "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": "## Redirects\n"
      },
      "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": "## Contact Management"
      },
      "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": "Call this tool to convert an incoming Unix‐seconds timestamp to a UTC date string."
      },
      "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": "## Additional Tools"
      },
      "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": "Call this tool to converts a human-readable date string (e.g. 05.05.2025 01:00:00) into a Unix timestamp in seconds.\nPass the date through the parameter `query` as a string."
      },
      "typeVersion": 1.2,
      "alwaysOutputData": true
    },
    {
      "id": "017aaa9a-0315-4e58-aa95-b853b132a68d",
      "name": "Telegram Trigger",
      "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": "No Operation, do nothing",
      "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.  Message from the Telegram bot\n"
      },
      "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.  Message from the n8n chat\n"
      },
      "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. Output"
      },
      "typeVersion": 1
    },
    {
      "id": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
      "name": "KlickTippエージェント",
      "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": {
    "c451d3cb-6323-432c-a98b-8a8c10d8d386": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "f4177135-1a7e-4245-8931-0ac75465756f": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "3c620b1b-55e5-40b4-b371-10dde8c1cefa": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "46150de8-a733-4d60-ae45-2019913fce9c": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "4aac4674-be12-4126-9bbd-8bc570c296af": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "35250ba6-bad1-4926-98ff-007e2f60ed21": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "15134ced-fb09-47f2-a818-4885d62ab47b": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "20256111-b1fe-44c3-a2f9-ed1525b9e84b": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "92ab0e41-049b-43ac-8f39-e5b02e7562e7": {
      "ai_memory": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "004e895c-361b-464d-b258-889363d369bb": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "6463b625-e410-48cd-97e1-88b0d97b32ea": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "8aebefc8-34b7-4f66-b773-772ccf3deebb": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "98642fcd-bb96-4883-856b-7affb03ddffd": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "8e59d336-79ad-4f6e-8256-f44ab9e2ea27": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "63ba982b-6c63-4af8-b1c3-135ed49a721e": {
      "main": [
        [
          {
            "node": "7633d54b-5675-42ad-95ca-9c13c47c44a0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7633d54b-5675-42ad-95ca-9c13c47c44a0": {
      "main": [
        [
          {
            "node": "2c4490d8-0df0-46df-a833-b166058057b4",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "24fed1b4-e71c-4a4a-a9eb-f6150776ee8d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ecd5521a-899e-4010-b3a8-d4ff6b701f8a": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "88414a45-3d7e-41db-8845-1a31f163ab87": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "017aaa9a-0315-4e58-aa95-b853b132a68d": {
      "main": [
        [
          {
            "node": "e0340f07-3c1f-427b-8b4d-c6e1ab28cf9f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e5a8bd05-e780-46b3-802a-23272a2e4bea": {
      "main": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "15729f44-2d72-42a1-9255-b100c685d8af": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "25d78214-6214-489f-ab3f-c7113b813838": {
      "ai_languageModel": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "d3537987-67eb-45bd-8100-0c39635bf112": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "43bda647-d273-4768-a429-0a8abff9bec0": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "43e27fbf-5dd2-490a-af4d-4db8559fc499": {
      "main": [
        [
          {
            "node": "e5a8bd05-e780-46b3-802a-23272a2e4bea",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9fbb16a9-6e96-4e75-a1a5-c096fddc1951": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "8ff3ff81-0476-49d1-9627-840e12e50761": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "58544d4b-8c6b-4cc1-b767-228e55fecca6": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "7477e0b7-ace7-42f7-8cb8-8ed997592d85": {
      "ai_tool": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "e0340f07-3c1f-427b-8b4d-c6e1ab28cf9f": {
      "main": [
        [
          {
            "node": "43e27fbf-5dd2-490a-af4d-4db8559fc499",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "7081bd79-6837-4f2d-b1f2-f74840a46ac8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7081bd79-6837-4f2d-b1f2-f74840a46ac8": {
      "main": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8df2a333-e451-46a9-b429-36bb5fa66c95": {
      "main": [
        [
          {
            "node": "63ba982b-6c63-4af8-b1c3-135ed49a721e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9989921d-2df3-40fe-9f0a-090e637763d8": {
      "main": [
        [
          {
            "node": "8df2a333-e451-46a9-b429-36bb5fa66c95",
            "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で表示

このワークフローを共有

カテゴリー

カテゴリー: 34