{
  "name": "Connect AI to any chats in Kommo",
  "nodes": [
    {
      "id": "510e43ca-7ae7-4212-94d7-0ea880fe8366",
      "name": "isVoice",
      "type": "n8n-nodes-base.if",
      "position": [
        1760,
        -140
      ]
    },
    {
      "id": "f9b107c0-b283-4b1a-9e71-996fa331d2c2",
      "name": "get voice",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1960,
        -180
      ]
    },
    {
      "id": "99ac5b7d-a31b-49fa-afe4-ace35dcad7c5",
      "name": "get_entity",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1280,
        -140
      ]
    },
    {
      "id": "73d03fdd-82ce-4f56-abe6-4f5479ae25e7",
      "name": "ai",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2500,
        -120
      ]
    },
    {
      "id": "4c4244da-fa83-4fef-8f06-8f6856786eca",
      "name": "model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2480,
        60
      ]
    },
    {
      "id": "dcd9b4da-ff5c-42bf-9cc4-08fc2fdf19df",
      "name": "memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        2580,
        60
      ]
    },
    {
      "id": "662eab99-9341-43fb-9a41-cf2cf2c5f4fd",
      "name": "hasStopTag",
      "type": "n8n-nodes-base.switch",
      "position": [
        1520,
        -140
      ]
    },
    {
      "id": "9c896b8b-d259-4747-8fff-27168f56ed4f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1720,
        -200
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "7ba5c636-26c6-4b19-8e06-64063612b43c",
      "name": "transcribe voice",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2140,
        -180
      ]
    },
    {
      "id": "7e7a189c-571a-4e58-8150-a1dfeec3d1d0",
      "name": "setText",
      "type": "n8n-nodes-base.set",
      "position": [
        2340,
        -120
      ]
    },
    {
      "id": "d8e951a6-1b69-4355-9f80-1445984869ba",
      "name": "Get token",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2840,
        -120
      ]
    },
    {
      "id": "6a678a0b-f54f-4f48-bf2b-f5b5d557a402",
      "name": "Recieve message",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3000,
        -120
      ]
    },
    {
      "id": "9cd9b3f6-f6a1-4ada-bf75-708e41422f0a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2800,
        -180
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "0808dbf6-dec5-46cb-93b2-6fe32997543b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        920,
        -460
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "ae5267e9-1b79-4fc4-8ed6-2bfef0ab5208",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        920,
        0
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "00ee756a-e524-4643-9e3d-4f631937927c",
      "name": "new_message",
      "type": "n8n-nodes-base.webhook",
      "position": [
        920,
        -140
      ]
    },
    {
      "id": "e2529238-9812-4bdc-9830-683d11205abd",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1500,
        40
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "9af6afc0-30e5-48c3-9ecd-78fd816fb102",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1280,
        40
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "faf33241-b218-4d2d-aabd-2e3156df85ed",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2160,
        20
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "1b818418-71d3-4609-a4be-e9b5c31a27fd",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2500,
        200
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "d692adb2-bb7b-4d73-9358-363e3a67bbc6",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2880,
        40
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "c7a456fc-5265-48bd-9897-2c84b74a60f6",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1240,
        -200
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "c43e082a-d94b-458d-a508-7a567d00ad5c",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2500,
        -219
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "03c4a010-cafe-47b9-a24e-3434b11d6326",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2680,
        80
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "04e3f9b4-1202-4aa1-8ebc-0a39f74d1ac5",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1720,
        -460
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    }
  ],
  "connections": {
    "ai": {
      "main": [
        [
          {
            "node": "Get token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "model": {
      "ai_languageModel": [
        [
          {
            "node": "ai",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "memory": {
      "ai_memory": [
        [
          {
            "node": "ai",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "isVoice": {
      "main": [
        [
          {
            "node": "get voice",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "setText",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "setText": {
      "main": [
        [
          {
            "node": "ai",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get token": {
      "main": [
        [
          {
            "node": "Recieve message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get voice": {
      "main": [
        [
          {
            "node": "transcribe voice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_entity": {
      "main": [
        [
          {
            "node": "hasStopTag",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "hasStopTag": {
      "main": [
        [
          {
            "node": "isVoice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "new_message": {
      "main": [
        [
          {
            "node": "get_entity",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recieve message": {
      "main": [
        []
      ]
    },
    "transcribe voice": {
      "main": [
        [
          {
            "node": "setText",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}