{
  "name": "Lesson 22 Tg bot",
  "nodes": [
    {
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "id": "fd5337d5-1d93-430b-9299-852e5f4b7b99",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "typeVersion": 1,
      "position": [
        -640,
        560
      ],
      "webhookId": "a92348e2-94d5-44c1-b189-01fc43c124e7",
      "credentials": {
        "telegramApi": {
          "id": "5",
          "name": "Telegram Task Bot"
        }
      }
    },
    {
      "parameters": {
        "chatId": "={{ $env.telegram_id }}",
        "text": "Минуточку...",
        "additionalFields": {}
      },
      "id": "e7870c71-897f-40aa-b2d2-e4ac5b0bbda4",
      "name": "Минуточку",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1,
      "position": [
        -220,
        540
      ],
      "credentials": {
        "telegramApi": {
          "id": "5",
          "name": "Telegram Task Bot"
        }
      }
    },
    {
      "parameters": {
        "operation": "editMessageText",
        "chatId": "={{ $env.telegram_id }}",
        "messageId": "={{ $('Минуточку').item.json.result.message_id }}",
        "text": "={{ $json.data }}",
        "additionalFields": {}
      },
      "id": "5e6aa42e-e816-4d3a-97ae-a4d9f2936909",
      "name": "Ответ",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1,
      "position": [
        200,
        540
      ],
      "credentials": {
        "telegramApi": {
          "id": "5",
          "name": "Telegram Task Bot"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json.message.text }}",
              "operation": "notStartsWith",
              "value2": "/"
            }
          ]
        }
      },
      "id": "6b791a43-bebd-4efe-b5ee-44f4d29e5fc1",
      "name": "IF",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        -440,
        560
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://45.12.238.102:3000/api/v1/prediction/5db08cd2-8ac1-4840-8d58-252bb66204ab",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "question",
              "value": "={{ $('Telegram Trigger').item.json.message.text }}"
            }
          ]
        },
        "options": {
          "response": {
            "response": {
              "responseFormat": "text"
            }
          }
        }
      },
      "id": "296b94e0-ed24-463e-bf2d-cb9093833366",
      "name": "Отправка запроса",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        0,
        540
      ],
      "credentials": {
        "httpHeaderAuth": {
          "id": "bkNPyKogRO1TOvSV",
          "name": "Flowise Header Auth"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "IF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Минуточку": {
      "main": [
        [
          {
            "node": "Отправка запроса",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF": {
      "main": [
        [
          {
            "node": "Минуточку",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Отправка запроса": {
      "main": [
        [
          {
            "node": "Ответ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {},
  "versionId": "c451078b-aa59-4d6e-a2a5-3bc4fd48a1ad",
  "id": "qyjp6LSAzdtQvGAg",
  "meta": {
    "instanceId": "62148517c718afe88189b4557f5264eca24fb302b44a11226f98636805acbeef"
  },
  "tags": []
}