{
  "active": false,
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set Text",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transcribe": {
      "main": [
        [
          {
            "node": "Set Text (voice)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Text": {
      "main": [
        [
          {
            "node": "Set Text (final)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Text (voice)": {
      "main": [
        [
          {
            "node": "Set Text (final)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Text (final)": {
      "main": [
        [
          {
            "node": "Code4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "\u0411\u0418\u0417\u041d\u0415\u0421 \u0410\u0421\u0421\u0418\u0421\u0422\u0415\u041d\u04221",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Calculator1": {
      "ai_tool": [
        [
          {
            "node": "\u0411\u0418\u0417\u041d\u0415\u0421 \u0410\u0421\u0421\u0418\u0421\u0422\u0415\u041d\u04221",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "\u0411\u0418\u0417\u041d\u0415\u0421 \u0410\u0421\u0421\u0418\u0421\u0422\u0415\u041d\u04221": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "OpenAI6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Transcribe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request (Typing On)": {
      "main": [
        [
          {
            "node": "Evolution API1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory": {
      "ai_memory": [
        [
          {
            "node": "\u0411\u0418\u0417\u041d\u0415\u0421 \u0410\u0421\u0421\u0418\u0421\u0422\u0415\u041d\u04221",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Google Sheets1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Switch1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets1": {
      "main": [
        [
          {
            "node": "HTTP Request (Typing On)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch1": {
      "main": [
        [
          {
            "node": "Google Sheets2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Switch2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Switch3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "OpenAI3",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "HTTP Request (Typing On)1": {
      "main": [
        [
          {
            "node": "Evolution API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets2": {
      "main": [
        [
          {
            "node": "HTTP Request (Typing On)1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets3": {
      "main": [
        [
          {
            "node": "Evolution API2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch2": {
      "main": [
        [
          {
            "node": "Google Sheets3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Sheets4",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Sheets5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets4": {
      "main": [
        [
          {
            "node": "Evolution API3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets5": {
      "main": [
        [
          {
            "node": "Evolution API4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets6": {
      "main": [
        [
          {
            "node": "Evolution API5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch3": {
      "main": [
        [
          {
            "node": "Google Sheets9",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Sheets6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request (Typing On)2": {
      "main": [
        [
          {
            "node": "Evolution API6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Evolution API5": {
      "main": [
        [
          {
            "node": "HTTP Request (Typing On)2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Evolution API6": {
      "main": [
        [
          {
            "node": "Google Sheets7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets7": {
      "main": [
        [
          {
            "node": "Evolution API7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request (Typing On)3": {
      "main": [
        [
          {
            "node": "Evolution API8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Evolution API2": {
      "main": [
        [
          {
            "node": "OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI": {
      "main": [
        [
          {
            "node": "HTTP Request (Typing On)3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request (Typing On)4": {
      "main": [
        [
          {
            "node": "Evolution API9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI1": {
      "main": [
        [
          {
            "node": "HTTP Request (Typing On)4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Evolution API3": {
      "main": [
        [
          {
            "node": "OpenAI1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request (Typing On)5": {
      "main": [
        [
          {
            "node": "Evolution API10",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI2": {
      "main": [
        [
          {
            "node": "HTTP Request (Typing On)5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Evolution API4": {
      "main": [
        [
          {
            "node": "OpenAI2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request (Typing On)6": {
      "main": [
        [
          {
            "node": "Evolution API11",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets8": {
      "main": [
        [
          {
            "node": "Evolution API12",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Evolution API11": {
      "main": [
        [
          {
            "node": "Google Sheets8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets9": {
      "main": [
        [
          {
            "node": "HTTP Request (Typing On)6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI3": {
      "main": [
        [
          {
            "node": "Switch4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request (Typing On)7": {
      "main": [
        [
          {
            "node": "Evolution API13",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch4": {
      "main": [
        [
          {
            "node": "Google Sheets10",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Sheets11",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Evolution API15",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request (Typing On)8": {
      "main": [
        [
          {
            "node": "Evolution API14",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets10": {
      "main": [
        [
          {
            "node": "HTTP Request (Typing On)7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets11": {
      "main": [
        [
          {
            "node": "HTTP Request (Typing On)8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "Convert to File1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File1": {
      "main": [
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI4": {
      "main": [
        [
          {
            "node": "OpenAI5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI5": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code1": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Google Sheets12",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Evolution API17",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets12": {
      "main": [
        [
          {
            "node": "Evolution API16",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Evolution API16": {
      "main": [
        [
          {
            "node": "Evolution API18",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If2": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "OpenAI4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "OpenAI5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "If (AGGREGATED?)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets13": {
      "main": [
        [
          {
            "node": "Set CoreFields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code2": {
      "main": [
        [
          {
            "node": "Google Sheets14",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets14": {
      "main": [
        []
      ]
    },
    "Code3": {
      "main": [
        [
          {
            "node": "Google Sheets15",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets15": {
      "main": [
        []
      ]
    },
    "If (AGGREGATED?)": {
      "main": [
        [
          {
            "node": "FunnelRouter",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Sheets16",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If (Row exists?)": {
      "main": [
        [
          {
            "node": "Code3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code4": {
      "main": [
        [
          {
            "node": "\u0411\u0418\u0417\u041d\u0415\u0421 \u0410\u0421\u0421\u0418\u0421\u0422\u0415\u041d\u04221",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If3": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Evolution API18": {
      "main": [
        [
          {
            "node": "Evolution API21",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Evolution API17": {
      "main": [
        [
          {
            "node": "Evolution API20",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets16": {
      "main": [
        [
          {
            "node": "If4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If4": {
      "main": [
        [],
        [
          {
            "node": "Google Sheets13",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI6": {
      "main": [
        [
          {
            "node": "Switch5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch5": {
      "main": [
        [],
        [
          {
            "node": "If3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch6": {
      "main": [
        [
          {
            "node": "Set Text (final)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "\u0411\u0418\u0417\u041d\u0415\u0421 \u0410\u0421\u0421\u0418\u0421\u0422\u0415\u041d\u0422",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Docs": {
      "ai_tool": [
        [
          {
            "node": "\u0411\u0418\u0417\u041d\u0415\u0421 \u0410\u0421\u0421\u0418\u0421\u0422\u0415\u041d\u0422",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "\u0411\u0418\u0417\u041d\u0415\u0421 \u0410\u0421\u0421\u0418\u0421\u0422\u0415\u041d\u0422",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "\u0411\u0418\u0417\u041d\u0415\u0421 \u0410\u0421\u0421\u0418\u0421\u0422\u0415\u041d\u0422",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets17": {
      "ai_tool": [
        [
          {
            "node": "\u0411\u0418\u0417\u041d\u0415\u0421 \u0410\u0421\u0421\u0418\u0421\u0422\u0415\u041d\u0422",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request (Typing On)9": {
      "main": [
        [
          {
            "node": "Evolution API19",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u0411\u0418\u0417\u041d\u0415\u0421 \u0410\u0421\u0421\u0418\u0421\u0422\u0415\u041d\u0422": {
      "main": [
        [
          {
            "node": "HTTP Request (Typing On)9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "FunnelRouter",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory1": {
      "ai_memory": [
        [
          {
            "node": "FunnelRouter",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "FunnelRouter": {
      "main": [
        [
          {
            "node": "Switch6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set CoreFields": {
      "main": [
        [
          {
            "node": "If (Row exists?)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Evolution API21": {
      "main": [
        [
          {
            "node": "Evolution API22",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "createdAt": "2025-09-01T18:48:30.216Z",
  "id": "ABuCeLJ89s54yUKS",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "VEP WAPP",
  "nodes": [
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.body.data.message.audioMessage.mimetype }}",
                    "rightValue": "audio/ogg; codecs=opus",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "id": "a9135976-c57f-483a-84fb-eb5d9c78f6de"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Voice"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "8c844924-b2ed-48b0-935c-c66a8fd0c778",
                    "leftValue": "={{ $json.body.data.message.conversation }}",
                    "rightValue": "",
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Text"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "705bd82a-f8b0-41e3-9a08-e49587753929",
                    "leftValue": "={{ $json.body?.data?.message?.imageMessage?.mimetype \n   || $items('Webhook')[0]?.json?.body?.data?.message?.imageMessage?.mimetype \n   || '' }}",
                    "rightValue": "image/",
                    "operator": {
                      "type": "string",
                      "operation": "contains"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Image"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "7d8d29dd-7113-4a2c-8a96-67fcc1f5ba35",
                    "leftValue": "={{ $json.body?.data?.message?.documentMessage?.mimetype\n   || $items('Webhook')[0]?.json?.body?.data?.message?.documentMessage?.mimetype\n   || '' }}",
                    "rightValue": "application/pdf",
                    "operator": {
                      "type": "string",
                      "operation": "contains"
                    }
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "e1ae13f6-de30-4062-9142-7485a5dd7459",
                    "leftValue": "={{ $json.text }}",
                    "rightValue": "",
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    }
                  }
                ],
                "combinator": "and"
              }
            }
          ]
        },
        "options": {}
      },
      "id": "1d73089c-8b68-422f-a36a-d775268114d7",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        -900,
        100
      ]
    },
    {
      "parameters": {
        "resource": "audio",
        "operation": "transcribe",
        "options": {}
      },
      "id": "054bfd0a-acfa-4d23-8e7a-4269437306f5",
      "name": "Transcribe",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.6,
      "position": [
        -420,
        0
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "fe7ecc99-e1e8-4a5e-bdd6-6fce9757b234",
              "name": "text",
              "value": "={{\n  // 1) \u0438\u0437 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0440\u0430 (\u0432\u0442\u043e\u0440\u043e\u0439 WF)\n  $json.body?.text\n  // 2) \u0435\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u0443\u0436\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u043b \u0442\u0435\u043a\u0441\u0442 \u0440\u0430\u043d\u0435\u0435 \u0432 $json.text\n  || $json.text\n  // 3) \u043f\u0440\u044f\u043c\u043e\u0439 \u0432\u0435\u0431\u0445\u0443\u043a WhatsApp\n  || $json.body?.data?.message?.conversation\n  || $json.body?.data?.message?.extendedTextMessage?.text\n  || $json.body?.message?.conversation\n  // 4) \u0437\u0430\u043f\u0430\u0441\u043d\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u043f\u0443\u0441\u0442\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430\n  || ''\n}}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "0177c215-5529-429f-a706-514be5cac46e",
      "name": "Set Text",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -260,
        200
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "2b2ff60e-9772-4dc6-8dad-7de37ec83103",
              "name": "text",
              "value": "={{ $json.text }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -260,
        0
      ],
      "id": "1787c9f0-0c33-45fc-b0ba-92ed0abdc16c",
      "name": "Set Text (voice)"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "2b2ff60e-9772-4dc6-8dad-7de37ec83103",
              "name": "text",
              "value": "={{ (function () {\n  try {\n    if ($json.text) return $json.text;\n\n    const fromAgg = $items('If (AGGREGATED?)')[0]?.json?.text \n                    || $node['If (AGGREGATED?)']?.json?.text;\n    if (fromAgg) return fromAgg;\n\n    const fromWebhook = $json.body?.text\n                     || $json.body?.data?.message?.conversation\n                     || $json.body?.data?.message?.extendedTextMessage?.text\n                     || $json.body?.message?.conversation;\n    return fromWebhook || '';\n  } catch(e) {\n    return $json.text || '';\n  }\n})() }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -80,
        100
      ],
      "id": "29b71663-9e4a-49d5-b719-827ed377a655",
      "name": "Set Text (final)"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-5-mini",
          "mode": "list",
          "cachedResultName": "gpt-5-mini"
        },
        "options": {
          "responseFormat": "text"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        220,
        260
      ],
      "id": "115dd1ff-91da-4737-b6d2-66d727bbb520",
      "name": "OpenAI Chat Model1",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.toolCalculator",
      "typeVersion": 1,
      "position": [
        420,
        260
      ],
      "id": "e0e13c2e-8e7b-4c26-af65-155652091916",
      "name": "Calculator1"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $('Set Text (final)').item.json.text }}",
        "options": {
          "systemMessage": "=\u0422\u044b \u2014 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432 \u0447\u0430\u0442\u0435.\n\u0412\u0435\u0440\u043d\u0438 \u0421\u0422\u0420\u041e\u0413\u041e \u041e\u0414\u0418\u041d JSON-\u043e\u0431\u044a\u0435\u043a\u0442 \u0431\u0435\u0437 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439 \u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432\u043e\u043a\u0440\u0443\u0433, \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043f\u043e\u043b\u044f\u043c\u0438:\n\n{\n  \"weight_bucket\": \"lt_60\" | \"60_100\" | \"gt_100\" | null,\n  \"weight_kg\": number | null,\n  \"knows_project\": true | false | null,\n  \"follow_ok\": \"yes\" | \"no\"\n}\n\n\u0422\u0435\u0431\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f:\n- current_step: 1 | 2 | 3  (\u044d\u0442\u0430\u043f \u0432\u043e\u0440\u043e\u043d\u043a\u0438)\n- user_message: \u0442\u0435\u043a\u0441\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u0431\u0435\u0437 \u043d\u0430\u0448\u0438\u0445 \u0440\u0435\u043f\u043b\u0438\u043a)\n\n\u0417\u0410\u0414\u0410\u0427\u0418 \u0418 \u041f\u0420\u0410\u0412\u0418\u041b\u0410:\n\n1) weight_kg \u2014 \u0422\u0415\u041a\u0423\u0429\u0418\u0419 \u0432\u0435\u0441 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0432 \u043a\u0433.\n   - \u0418\u0449\u0438 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u0432\u0435\u0441\u0430 \u0432 user_message.\n   - \u0415\u0441\u043b\u0438 \u0440\u044f\u0434\u043e\u043c \u0435\u0441\u0442\u044c \u043c\u0430\u0440\u043a\u0435\u0440\u044b \"\u043a\u0433\"/\"kg\"/\"\u043a\u0438\u043b\u043e\u0433\u0440\u0430\u043c\u043c\" \u2014 \u0431\u0435\u0440\u0438 \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e (\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443).\n   - \u0415\u0441\u043b\u0438 \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u0432 \u043d\u0435\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439 \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u043a\u0443:\n       \u2022 \u0427\u0438\u0441\u043b\u0430 \u2265 150 \u0441\u0447\u0438\u0442\u0430\u0439 \u0440\u043e\u0441\u0442\u043e\u043c (\u0432 \u0441\u0430\u043d\u0442\u0438\u043c\u0435\u0442\u0440\u0430\u0445), \u041d\u0415 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0439 \u0438\u0445 \u043a\u0430\u043a \u0432\u0435\u0441.\n       \u2022 \u0412\u0435\u0441 \u043e\u0431\u044b\u0447\u043d\u043e \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 30\u2013300. \u0415\u0441\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432 \u2014 \u0432\u043e\u0437\u044c\u043c\u0438 \u043f\u0435\u0440\u0432\u044b\u0439.\n   - \u0418\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0439 \u0426\u0415\u041b\u0415\u0412\u041e\u0419 \u0432\u0435\u0441 (\u0444\u0440\u0430\u0437\u044b \"\u0445\u043e\u0447\u0443 55\", \"\u0446\u0435\u043b\u044c 60\", \"\u0434\u043e 70\", \"\u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0434\u043e 65\" \u0438 \u0442.\u043f.) \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0432\u0435\u0441.\n   - \u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b \"63\u201364\", \"63-64\", \"63/64\" \u0442\u0440\u0430\u043a\u0442\u0443\u0439 \u043a\u0430\u043a 63 (\u043b\u0435\u0432\u043e\u0435 \u0447\u0438\u0441\u043b\u043e).\n   - \u041e\u043a\u0440\u0443\u0433\u043b\u044f\u0439 \u0434\u043e 1 \u0437\u043d\u0430\u043a\u0430 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u044f\u0442\u043e\u0439. \u0415\u0441\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0432\u0435\u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f \u2014 weight_kg = null.\n\n2) weight_bucket \u2014 \u043a\u043e\u0440\u0437\u0438\u043d\u0430 \u0432\u0435\u0441\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0422\u0415\u041a\u0423\u0429\u0415\u0413\u041e weight_kg:\n   - \u0415\u0441\u043b\u0438 weight_kg <= 60 \u2192 \"lt_60\"\n   - \u0415\u0441\u043b\u0438 60 < weight_kg <= 100 \u2192 \"60_100\"\n   - \u0415\u0441\u043b\u0438 weight_kg > 100 \u2192 \"gt_100\"\n   - \u0415\u0441\u043b\u0438 weight_kg = null \u2192 weight_bucket = null\n\n3) knows_project \u2014 \u0437\u043d\u0430\u043a\u043e\u043c \u043b\u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c:\n   - true: \u044f\u0432\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0441\u0442\u0438/\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438/\u043e\u043f\u044b\u0442\u0430 (\"\u0437\u043d\u0430\u044e\", \"\u0437\u043d\u0430\u043a\u043e\u043c\", \"\u0441\u043b\u0435\u0436\u0443\", \"\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\", \"\u0443\u0436\u0435 \u0431\u044b\u043b\", \"\u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\", \"\u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b\" \u0438 \u0442.\u043f.).\n   - false: \u044f\u0432\u043d\u043e \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c / \u043f\u0440\u043e\u0441\u0438\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c (\"\u043d\u0435 \u0437\u043d\u0430\u044e\", \"\u0432\u043f\u0435\u0440\u0432\u044b\u0435\", \"\u0447\u0442\u043e \u044d\u0442\u043e\", \"\u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0438\u0442\u0435\" \u0438 \u0442.\u043f.).\n   - null: \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e.\n\n4) follow_ok \u2014 \u0421\u041b\u0415\u0414\u0423\u0415\u0422 \u041b\u0418 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0422\u0415\u041a\u0423\u0429\u0415\u041c\u0423 \u0448\u0430\u0433\u0443 \u0432\u043e\u0440\u043e\u043d\u043a\u0438 (\u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0433\u043b\u0430\u0448\u0430\u0435\u0442\u0441\u044f/\u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f):\n   - current_step = 1 (\u043d\u0430\u0448 \u0432\u043e\u043f\u0440\u043e\u0441: \"\u0420\u0430\u043d\u044c\u0448\u0435 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u0441 \u043d\u0443\u0442\u0440\u0438\u0446\u0438\u043e\u043b\u043e\u0433\u043e\u043c?\"):\n       \u2022 \"yes\" \u2014 \u0435\u0441\u043b\u0438 \u043e\u0442\u0432\u0435\u0442\u0438\u043b \u043f\u043e \u0441\u0443\u0442\u0438 (\u0434\u0430/\u043d\u0435\u0442/\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043e\u043f\u044b\u0442\u0430).\n       \u2022 \"no\" \u2014 \u0435\u0441\u043b\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u0443\u0445\u043e\u0434\u0438\u0442 \u0432 \u043e\u0444\u0444\u0442\u043e\u043f/\u0437\u0430\u0434\u0430\u0451\u0442 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b.\n   - current_step = 2 (\u043d\u0430\u0448 \u0432\u043e\u043f\u0440\u043e\u0441: \"\u0421\u043a\u0430\u0436\u0438\u0442\u0435, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0412\u0415\u0421, \u0420\u041e\u0421\u0422, \u0445\u0440\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u0431\u043e\u043b\u0435\u0432\u0430\u043d\u0438\u044f \u0438 \u041a\u0410\u041a\u041e\u0419 \u0412\u0415\u0421 \u0445\u043e\u0442\u0438\u0442\u0435\"):\n       \u2022 \"yes\" \u2014 \u0435\u0441\u043b\u0438 \u0434\u0430\u043b \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u0443 \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u043d\u0443\u044e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0435\u0441 \u0438\u043b\u0438 \u0440\u043e\u0441\u0442, \u0438\u043b\u0438 \u0437\u0430\u0431\u043e\u043b\u0435\u0432\u0430\u043d\u0438\u044f/\u0446\u0435\u043b\u044c).\n       \u2022 \"no\" \u2014 \u0435\u0441\u043b\u0438 \u043d\u0435 \u0434\u0430\u043b \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u043d\u044b\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u0443\u0445\u043e\u0434\u0438\u0442 \u0432 \u043e\u0444\u0444\u0442\u043e\u043f.\n       \u2022 \u0412\u0410\u0416\u041d\u041e: \u0434\u043b\u044f weight_kg \u0438 weight_bucket \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0422\u041e\u041b\u042c\u041a\u041e \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0432\u0435\u0441 (\u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0432\u0435\u0441 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u043c).\n   - current_step = 3 (\u043c\u044b \u0433\u043e\u043b\u043e\u0441\u043e\u043c \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c: \"\u0417\u043d\u0430\u043a\u043e\u043c\u044b \u043b\u0438 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c?\"):\n       \u2022 \"yes\" \u2014 \u0435\u0441\u043b\u0438 \u043e\u0442\u0432\u0435\u0442\u0438\u043b \u043f\u043e \u0442\u0435\u043c\u0435 (\u0437\u043d\u0430\u043a\u043e\u043c/\u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c \u0438 \u0442.\u043f.).\n       \u2022 \"no\" \u2014 \u0435\u0441\u043b\u0438 \u043d\u0435 \u043e\u0442\u0432\u0435\u0442\u0438\u043b \u043f\u043e \u0441\u0443\u0442\u0438, \u0443\u0445\u043e\u0434\u0438\u0442 \u0432 \u043e\u0444\u0444\u0442\u043e\u043f/\u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b.\n\n\u0424\u043e\u0440\u043c\u0430\u0442 \u0432\u044b\u0432\u043e\u0434\u0430: \u0442\u043e\u043b\u044c\u043a\u043e JSON-\u043e\u0431\u044a\u0435\u043a\u0442 \u0411\u0415\u0417 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432\u043e\u043a\u0440\u0443\u0433, \u0411\u0415\u0417 \u043b\u0438\u0448\u043d\u0438\u0445 \u043f\u043e\u043b\u0435\u0439.\n\n\u041f\u0420\u0418\u041c\u0415\u0420\u042b:\nuser_message: \"\u0420\u043e\u0441\u0442 172, \u0432\u0435\u0441 63.5 \u043a\u0433, \u0445\u043e\u0447\u0443 55\" (current_step=2)\n\u2192 {\"weight_bucket\":\"60_100\",\"weight_kg\":63.5,\"knows_project\":null,\"follow_ok\":\"yes\"}\n\nuser_message: \"\u041f\u0440\u0438\u0432\u0435\u0442! \u042f \u0432\u0430\u0441 \u0437\u043d\u0430\u044e, \u0434\u0430\u0432\u043d\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0430. \u0421\u0435\u0439\u0447\u0430\u0441 105\u043a\u0433.\" (current_step=1)\n\u2192 {\"weight_bucket\":\"gt_100\",\"weight_kg\":105,\"knows_project\":true,\"follow_ok\":\"yes\"}\n\nuser_message: \"\u0427\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u043f\u0440\u043e\u0435\u043a\u0442? \u041d\u0435 \u0437\u043d\u0430\u044e \u0432\u0430\u0441. 170\u0441\u043c, 58\" (current_step=2)\n\u2192 {\"weight_bucket\":\"lt_60\",\"weight_kg\":58,\"knows_project\":false,\"follow_ok\":\"yes\"}\n\nuser_message: \"\u0414\u0430, \u0434\u0430\u0432\u0430\u0439\u0442\u0435!\" (current_step=1)\n\u2192 {\"weight_bucket\":null,\"weight_kg\":null,\"knows_project\":null,\"follow_ok\":\"yes\"}\n\nuser_message: \"\u0426\u0435\u043b\u044c 55. \u0420\u043e\u0441\u0442 170\" (current_step=2)\n\u2192 {\"weight_bucket\":null,\"weight_kg\":null,\"knows_project\":null,\"follow_ok\":\"yes\"}   // \u0446\u0435\u043b\u044c \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u043c, \u0440\u043e\u0441\u0442\u0430 \u043c\u0430\u043b\u043e \u0434\u043b\u044f \u0432\u0435\u0441\u0430\n\nuser_message: \"\u041d\u0435 \u0441\u0435\u0439\u0447\u0430\u0441. \u0410 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u043e\u0438\u0442?\" (current_step=1)\n\u2192 {\"weight_bucket\":null,\"weight_kg\":null,\"knows_project\":null,\"follow_ok\":\"no\"}\n"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        240,
        100
      ],
      "id": "db4edd64-21e6-46bf-95cc-1c7c9fe0f4f2",
      "name": "\u0411\u0418\u0417\u041d\u0415\u0421 \u0410\u0421\u0421\u0418\u0421\u0422\u0415\u041d\u04221"
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "0ea67612-498f-434c-9f2d-a11e918b46c4/messages-upsert",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        -3560,
        100
      ],
      "id": "3d0d5298-0a33-40d5-8a89-625938ff7ce6",
      "name": "Webhook"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://evolution-api-production-9e6a.up.railway.app/chat/getBase64FromMediaMessage/{{ $json.body.instance || 'VEPPERS' }}\n",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "apikey",
              "value": "={{ $json.body.apikey }}"
            },
            {
              "name": "content-type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({\n  message: {\n    key: {\n      id: $json.body.data.key.id,\n      remoteJid: $json.body.data.key.remoteJid\n    }\n  },\n  convertToMp4: false\n}) }}\n",
        "options": {
          "response": {
            "response": {
              "responseFormat": "json"
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -740,
        0
      ],
      "id": "f25ae4cc-a8cc-45df-9efe-2ec64945b352",
      "name": "HTTP Request"
    },
    {
      "parameters": {
        "operation": "toBinary",
        "sourceProperty": "={{ $json.base64 ? 'base64' : $json.data?.base64 ? 'data.base64' : $json.result?.base64 ? 'result.base64' : '' }}",
        "options": {
          "fileName": "={{ $json.fileName || 'voice.ogg' }}",
          "mimeType": "={{ $json.mimetype || 'audio/ogg' }}"
        }
      },
      "type": "n8n-nodes-base.convertToFile",
      "typeVersion": 1.1,
      "position": [
        -600,
        0
      ],
      "id": "37e7fbd7-5944-4bea-8f27-fb4c0e1054bf",
      "name": "Convert to File"
    },
    {
      "parameters": {
        "resource": "messages-api",
        "instanceName": "VEPPERS",
        "remoteJid": "={{ \n  $items('Edit Fields1')[0]?.json?.contact_id\n  || $json.contact_id\n  || $node[\"Webhook\"].json.body?.contact_id\n  || $node[\"Webhook\"].json.body?.from\n  || $node[\"Webhook\"].json.body?.data?.key?.remoteJid\n  || ''\n}}",
        "messageText": "\u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0434\u043d\u044f )  \n\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043d\u0430\u0441\u0442\u0430\u0441\u0438\u044f \u0412\u0435\u043f\u0435\u0440\u0441 - \u044f \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430,  \u0434\u0438\u043f\u043b\u043e\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0443\u0442\u0440\u0438\u0446\u0438\u043e\u043b\u043e\u0433.   \n\n\u041f\u043e\u0434\u0441\u043a\u0430\u0436\u0438\u0442\u0435 \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0440\u0430\u043d\u044c\u0448\u0435 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u0441 \u043d\u0443\u0442\u0440\u0438\u0446\u0438\u043e\u043b\u043e\u0433\u043e\u043c ?\ud83d\udc90",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        1540,
        -60
      ],
      "id": "7e784bbc-8c29-4ab1-8da8-2aa7a75430f1",
      "name": "Evolution API1",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://evolution-api-production-9e6a.up.railway.app/chat/sendPresence/VEPPERS",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "apikey",
              "value": "sdvsdgs37e4jgfvuh2g24rsdfsf"
            },
            {
              "name": "content-type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ ({\n  number: String(\n    $json.number\n    || $json.contact_id\n    || $node[\"Webhook\"].json.body?.from\n    || $node[\"Webhook\"].json.body?.sender\n    || ''\n  ).split('@')[0].replace(/\\D/g,''),\n  presence: 'composing',   // \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e: 'composing' | 'paused' | 'recording'\n  delay: $json.typingDelayMs ?? 40000\n}) }}",
        "options": {}
      },
      "id": "7a958b2a-b42e-4696-98db-50bbe9966cbc",
      "name": "HTTP Request (Typing On)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        1220,
        -60
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "onError": "continueRegularOutput",
      "notes": "\u0418\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u043d\u0430\u0431\u043e\u0440\u0430 (typing). \u0422\u0440\u0435\u0431\u0443\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c item \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0435 remoteJid, \u0438\u043d\u0430\u0447\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0443\u0442\u044c \u043a JID \u0438\u0437 \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431\u0445\u0443\u043a\u0430."
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc",
          "mode": "list",
          "cachedResultName": "\u0414\u0438\u0430\u043b\u043e\u0433\u0438",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u0412\u043e\u0442\u0441\u0430\u043f",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit#gid=0"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "contact_id",
              "lookupValue": "={{ $('Edit Fields1').item.json.contact_id }}"
            }
          ]
        },
        "combineFilters": "OR",
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        740,
        100
      ],
      "id": "c9129523-4391-45fb-90c8-253da74958fd",
      "name": "Google Sheets",
      "alwaysOutputData": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{\n  // 1) \u0442\u043e, \u0447\u0442\u043e \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c item\n  $json.contact_id\n  // 2) \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043d\u043e \u0432 Edit Fields1 (\u0431\u0435\u0440\u0451\u043c \u043f\u0435\u0440\u0432\u044b\u0439 item \u0442\u043e\u0433\u043e \u0443\u0437\u043b\u0430)\n  || $items(\"Edit Fields1\")[0]?.json?.contact_id\n  // 3) \u043f\u0440\u044f\u043c\u043e\u0439 \u0432\u0435\u0431\u0445\u0443\u043a Evolution\n  || $json.body?.data?.key?.remoteJid\n  || $json.body?.sender\n  || $json.body?.from\n  // 4) \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043d\u043e\u043c\u0435\u0440, \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c jid\n  || (()=>{\n        const phone = $json.phone || $items(\"Edit Fields1\")[0]?.json?.phone;\n        if (phone) return String(phone).replace(/\\D/g,'') + '@s.whatsapp.net';\n        return '';\n     })()\n  // 5) \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0444\u043e\u043b\u0431\u044d\u043a\n  || 'unknown@s.whatsapp.net'\n}}",
        "contextWindowLength": 50
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        320,
        260
      ],
      "id": "85aa13ad-e803-489e-a6eb-3f2583b5f48e",
      "name": "Window Buffer Memory"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "dac984c0-46e2-443e-9251-349f82856453",
              "leftValue": "={{ $items('Google Sheets').filter(i => Object.keys(i.json).length > 0).length }}",
              "rightValue": 0,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            }
          ],
          "combinator": "or"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        880,
        100
      ],
      "id": "aa53fe8b-6b33-4bb1-9056-77400640ca11",
      "name": "If"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "73482944-918c-4ef2-8ea8-6b86298df2ed",
                    "leftValue": "={{ $json.step }}",
                    "rightValue": 1,
                    "operator": {
                      "type": "number",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "f8fcd211-6bf3-48af-93fb-3e237ee231a3",
                    "leftValue": "={{ $json.step }}",
                    "rightValue": 2,
                    "operator": {
                      "type": "number",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "d9457889-dfb5-4279-a4c3-2703e3c7a59f",
                    "leftValue": "={{ $json.step }}",
                    "rightValue": 3,
                    "operator": {
                      "type": "number",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "76a13f81-63e1-488d-b700-1afede2a49cf",
                    "leftValue": "={{ $json.step }}",
                    "rightValue": 4,
                    "operator": {
                      "type": "number",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "aa1a5f9e-d2d6-4d05-aba4-2c432e97cfa1",
                    "leftValue": "={{ $json.step }}",
                    "rightValue": 5,
                    "operator": {
                      "type": "number",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        1040,
        320
      ],
      "id": "c3e1bc4a-c8d1-4f27-99a7-7030ef1390f9",
      "name": "Switch1"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc",
          "mode": "list",
          "cachedResultName": "\u0414\u0438\u0430\u043b\u043e\u0433\u0438",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u0412\u043e\u0442\u0441\u0430\u043f",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "step": "1",
            "contact_id": "={{ $('Edit Fields1').item.json.contact_id }}",
            "name": "={{ $('Webhook').item.json.body.name }}",
            "1 \u044d\u0442\u0430\u043f": "={{ $json[\"1 \u044d\u0442\u0430\u043f\"] || $items(\"Edit Fields1\")[0].json.date }}",
            "FirstAt": "={{ $json.FirstAt || $items(\"Edit Fields1\")[0].json.date }}",
            "LastAt": "={{ $items(\"Edit Fields1\")[0].json.date }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "contact_id",
              "displayName": "contact_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "step",
              "displayName": "step",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "weight_kg",
              "displayName": "weight_kg",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "FirstAt",
              "displayName": "FirstAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "LastAt",
              "displayName": "LastAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "1 \u044d\u0442\u0430\u043f",
              "displayName": "1 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "2 \u044d\u0442\u0430\u043f",
              "displayName": "2 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "3 \u044d\u0442\u0430\u043f",
              "displayName": "3 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "4 \u044d\u0442\u0430\u043f",
              "displayName": "4 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "5 \u044d\u0442\u0430\u043f",
              "displayName": "5 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "6 \u044d\u0442\u0430\u043f",
              "displayName": "6 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1060,
        -60
      ],
      "id": "08f88c94-a7ad-46e2-acf7-9dfbd7b425f1",
      "name": "Google Sheets1",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "messages-api",
        "instanceName": "VEPPERS",
        "remoteJid": "={{ $('Switch1').item.json.contact_id }}",
        "messageText": "\u042f \u043f\u043e\u043d\u044f\u043b\u0430 \u0412\u0430\u0441 \ud83d\ude4c \ud83d\ude09 \n\u0421\u043a\u0430\u0436\u0438\u0442\u0435 \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0432\u0435\u0441 , \u0440\u043e\u0441\u0442,  \u0445\u0440\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u0431\u043e\u043b\u0435\u0432\u0430\u043d\u0438\u044f \u0438 \u043a\u0430\u043a\u043e\u0439 \u0432\u0435\u0441 \u0445\u043e\u0442\u0438\u0442\u0435 ?\ud83d\udc90",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        1540,
        120
      ],
      "id": "4ad5235b-a780-4b68-bd4c-35d7ad709e1e",
      "name": "Evolution API",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://evolution-api-production-9e6a.up.railway.app/chat/sendPresence/VEPPERS",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "apikey",
              "value": "sdvsdgs37e4jgfvuh2g24rsdfsf"
            },
            {
              "name": "content-type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({\n  number:  String(($json.contact_id\n                   || $json.body?.data?.key?.participant\n                   || $json.body?.data?.key?.remoteJid\n                   || $json.body?.sender\n                   || '')).split('@')[0].replace(/\\D/g,''),\n  presence: 'composing',\n  delay: 20000\n}) }}\n",
        "options": {}
      },
      "id": "95a102aa-e55e-49ec-a4c5-2521bc57f24c",
      "name": "HTTP Request (Typing On)1",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        1380,
        120
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notes": "\u0418\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u043d\u0430\u0431\u043e\u0440\u0430 (typing). \u0422\u0440\u0435\u0431\u0443\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c item \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0435 remoteJid, \u0438\u043d\u0430\u0447\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0443\u0442\u044c \u043a JID \u0438\u0437 \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431\u0445\u0443\u043a\u0430."
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc",
          "mode": "list",
          "cachedResultName": "\u0414\u0438\u0430\u043b\u043e\u0433\u0438",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u0412\u043e\u0442\u0441\u0430\u043f",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "step": "2",
            "contact_id": "={{ $json.contact_id }}",
            "name": "={{ $('Webhook').item.json.body.name }}",
            "LastAt": "={{ $items(\"Edit Fields1\")[0].json.date }}",
            "2 \u044d\u0442\u0430\u043f": "={{ $json[\"2 \u044d\u0442\u0430\u043f\"] || $items(\"Edit Fields1\")[0].json.date }}"
          },
          "matchingColumns": [
            "contact_id"
          ],
          "schema": [
            {
              "id": "contact_id",
              "displayName": "contact_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "step",
              "displayName": "step",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "weight_kg",
              "displayName": "weight_kg",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "FirstAt",
              "displayName": "FirstAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "LastAt",
              "displayName": "LastAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "1 \u044d\u0442\u0430\u043f",
              "displayName": "1 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "2 \u044d\u0442\u0430\u043f",
              "displayName": "2 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "3 \u044d\u0442\u0430\u043f",
              "displayName": "3 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "4 \u044d\u0442\u0430\u043f",
              "displayName": "4 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "5 \u044d\u0442\u0430\u043f",
              "displayName": "5 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "6 \u044d\u0442\u0430\u043f",
              "displayName": "6 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1220,
        120
      ],
      "id": "ce74f70d-60cf-4d67-985c-df7fe055f27e",
      "name": "Google Sheets2",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "messages-api",
        "operation": "send-audio",
        "instanceName": "VEPPERS",
        "remoteJid": "={{ $('Edit Fields1').item.json.contact_id }}",
        "media": "https://drive.google.com/uc?export=download&id=1_ljlE_2GNdp0RMHFeOwlwEEX8m-BmxZC",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        1700,
        320
      ],
      "id": "a7f3cc14-4df9-40c2-9632-9b8ef2298c93",
      "name": "Evolution API2",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc",
          "mode": "list",
          "cachedResultName": "\u0414\u0438\u0430\u043b\u043e\u0433\u0438",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u0412\u043e\u0442\u0441\u0430\u043f",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "step": "3",
            "contact_id": "={{ $('Edit Fields1').item.json.contact_id }}",
            "weight_kg": "={{ $('Code').item.json.weight_kg }}",
            "LastAt": "={{ $items(\"Edit Fields1\")[0].json.date }}",
            "3 \u044d\u0442\u0430\u043f": "={{ $json[\"3 \u044d\u0442\u0430\u043f\"] || $items(\"Edit Fields1\")[0].json.date }}"
          },
          "matchingColumns": [
            "contact_id"
          ],
          "schema": [
            {
              "id": "contact_id",
              "displayName": "contact_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "step",
              "displayName": "step",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "weight_kg",
              "displayName": "weight_kg",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "FirstAt",
              "displayName": "FirstAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "LastAt",
              "displayName": "LastAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "1 \u044d\u0442\u0430\u043f",
              "displayName": "1 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "2 \u044d\u0442\u0430\u043f",
              "displayName": "2 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "3 \u044d\u0442\u0430\u043f",
              "displayName": "3 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "4 \u044d\u0442\u0430\u043f",
              "displayName": "4 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "5 \u044d\u0442\u0430\u043f",
              "displayName": "5 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "6 \u044d\u0442\u0430\u043f",
              "displayName": "6 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1540,
        320
      ],
      "id": "8fb0a22f-f6eb-41dd-bf33-7ab3127cf583",
      "name": "Google Sheets3",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "73482944-918c-4ef2-8ea8-6b86298df2ed",
                    "leftValue": "={{ $('Code').item.json.weight_bucket }}",
                    "rightValue": "lt_60",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "f8fcd211-6bf3-48af-93fb-3e237ee231a3",
                    "leftValue": "={{ $('Code').item.json.weight_bucket }}",
                    "rightValue": "60_100",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "5f8acd0d-ffa9-4d31-bf04-65eb8a995fae",
                    "leftValue": "={{ $('Code').item.json.weight_bucket }}",
                    "rightValue": "gt_100",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        1320,
        480
      ],
      "id": "f37af26b-5106-4d0b-bb69-150de7758263",
      "name": "Switch2"
    },
    {
      "parameters": {
        "resource": "messages-api",
        "operation": "send-audio",
        "instanceName": "VEPPERS",
        "remoteJid": "={{ $('Edit Fields1').item.json.contact_id }}",
        "media": "https://drive.google.com/uc?export=download&id=1HFjYmgGa8UbJhwRY2xY6UD-f52wEwS7s",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        1700,
        480
      ],
      "id": "1f9cad13-f963-466a-a373-9d0a7472e5dd",
      "name": "Evolution API3",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc",
          "mode": "list",
          "cachedResultName": "\u0414\u0438\u0430\u043b\u043e\u0433\u0438",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u0412\u043e\u0442\u0441\u0430\u043f",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "step": "3",
            "contact_id": "={{ $('Switch1').item.json.contact_id }}",
            "weight_kg": "={{ $('Code').item.json.weight_kg }}",
            "LastAt": "={{ $items(\"Edit Fields1\")[0].json.date }}",
            "3 \u044d\u0442\u0430\u043f": "={{ $json[\"3 \u044d\u0442\u0430\u043f\"] || $items(\"Edit Fields1\")[0].json.date }}"
          },
          "matchingColumns": [
            "contact_id"
          ],
          "schema": [
            {
              "id": "contact_id",
              "displayName": "contact_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "step",
              "displayName": "step",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "weight_kg",
              "displayName": "weight_kg",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "FirstAt",
              "displayName": "FirstAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "LastAt",
              "displayName": "LastAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "1 \u044d\u0442\u0430\u043f",
              "displayName": "1 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "2 \u044d\u0442\u0430\u043f",
              "displayName": "2 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "3 \u044d\u0442\u0430\u043f",
              "displayName": "3 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "4 \u044d\u0442\u0430\u043f",
              "displayName": "4 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "5 \u044d\u0442\u0430\u043f",
              "displayName": "5 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "6 \u044d\u0442\u0430\u043f",
              "displayName": "6 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1540,
        480
      ],
      "id": "16879b9b-e69f-4a69-981b-5407989f026d",
      "name": "Google Sheets4",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "messages-api",
        "operation": "send-audio",
        "instanceName": "VEPPERS",
        "remoteJid": "={{ $('Edit Fields1').item.json.contact_id }}",
        "media": "https://drive.google.com/uc?export=download&id=1HFjYmgGa8UbJhwRY2xY6UD-f52wEwS7s",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        1700,
        640
      ],
      "id": "915a04b8-4b5c-4e14-91da-b4cba8b9a529",
      "name": "Evolution API4",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc",
          "mode": "list",
          "cachedResultName": "\u0414\u0438\u0430\u043b\u043e\u0433\u0438",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u0412\u043e\u0442\u0441\u0430\u043f",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "step": "3",
            "contact_id": "={{ $('Edit Fields1').item.json.contact_id }}",
            "weight_kg": "={{ $('Code').item.json.weight_kg }}",
            "LastAt": "={{ $items(\"Edit Fields1\")[0].json.date }}",
            "3 \u044d\u0442\u0430\u043f": "={{ $json[\"3 \u044d\u0442\u0430\u043f\"] || $items(\"Edit Fields1\")[0].json.date }}"
          },
          "matchingColumns": [
            "contact_id"
          ],
          "schema": [
            {
              "id": "contact_id",
              "displayName": "contact_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "step",
              "displayName": "step",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "weight_kg",
              "displayName": "weight_kg",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "FirstAt",
              "displayName": "FirstAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "LastAt",
              "displayName": "LastAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "1 \u044d\u0442\u0430\u043f",
              "displayName": "1 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "2 \u044d\u0442\u0430\u043f",
              "displayName": "2 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "3 \u044d\u0442\u0430\u043f",
              "displayName": "3 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "4 \u044d\u0442\u0430\u043f",
              "displayName": "4 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "5 \u044d\u0442\u0430\u043f",
              "displayName": "5 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "6 \u044d\u0442\u0430\u043f",
              "displayName": "6 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1540,
        640
      ],
      "id": "6c06721e-b333-4d0e-ac50-25fa0283b1b9",
      "name": "Google Sheets5",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// \u0411\u0435\u0440\u0451\u043c JSON \u043e\u0442 \u0430\u0433\u0435\u043d\u0442\u0430: \u043f\u043e\u043b\u0435 \"output\" \u2014 \u044d\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u0430 \u0441 JSON\nconst raw = $json.output ?? $json.response ?? $json.data ?? $json.message ?? $json.text ?? null;\n\nlet weight_kg = null;\nlet weight_bucket = null; // 'lt_60' | '60_100' | 'gt_100' | null\nlet knows_project = null; // true | false | null\nlet follow_ok = 'no';     // 'yes' | 'no'\n\nif (raw) {\n  try {\n    const parsed = (typeof raw === 'string') ? JSON.parse(raw) : raw;\n\n    // weight_kg\n    if (typeof parsed.weight_kg === 'number') {\n      weight_kg = parsed.weight_kg;\n    } else if (typeof parsed.weight_kg === 'string' && parsed.weight_kg.trim() !== '') {\n      const n = Number(parsed.weight_kg.replace(',', '.'));\n      weight_kg = Number.isFinite(n) ? n : null;\n    }\n\n    // weight_bucket (\u0435\u0441\u043b\u0438 \u0430\u0433\u0435\u043d\u0442 \u043d\u0435 \u043f\u0440\u0438\u0441\u043b\u0430\u043b \u2014 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c \u0441\u0430\u043c\u0438 \u0438\u0437 weight_kg)\n    if (['lt_60','60_100','gt_100'].includes(parsed.weight_bucket)) {\n      weight_bucket = parsed.weight_bucket;\n    } else if (typeof weight_kg === 'number') {\n      if (weight_kg > 100) weight_bucket = 'gt_100';\n      else if (weight_kg > 60) weight_bucket = '60_100';\n      else weight_bucket = 'lt_60';\n    } else {\n      weight_bucket = null;\n    }\n\n    // knows_project\n    if (parsed.knows_project === true || parsed.knows_project === false || parsed.knows_project === null) {\n      knows_project = parsed.knows_project;\n    } else if (typeof parsed.knows_project === 'string') {\n      const s = parsed.knows_project.trim().toLowerCase();\n      knows_project = (s === 'true') ? true : (s === 'false' ? false : null);\n    }\n\n    // follow_ok\n    if (parsed.follow_ok === 'yes' || parsed.follow_ok === 'no') {\n      follow_ok = parsed.follow_ok;\n    }\n  } catch (e) {\n    // \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0434\u0435\u0444\u043e\u043b\u0442\u044b\n  }\n}\n\nreturn [{\n  ...$json,\n  weight_kg,\n  weight_bucket,\n  knows_project,\n  follow_ok\n}];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        580,
        100
      ],
      "id": "128012bf-ce8a-44eb-9de1-ae9ef8875436",
      "name": "Code"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "73482944-918c-4ef2-8ea8-6b86298df2ed",
                    "leftValue": "={{ $('Code').item.json.knows_project }}",
                    "rightValue": "true",
                    "operator": {
                      "type": "boolean",
                      "operation": "true",
                      "singleValue": true
                    }
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "f8fcd211-6bf3-48af-93fb-3e237ee231a3",
                    "leftValue": "={{ $('Code').item.json.knows_project }}",
                    "rightValue": "false",
                    "operator": {
                      "type": "boolean",
                      "operation": "false",
                      "singleValue": true
                    }
                  }
                ],
                "combinator": "and"
              }
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        1320,
        920
      ],
      "id": "7bf7f5b2-31fa-4e8f-bf02-99e7270c7139",
      "name": "Switch3"
    },
    {
      "parameters": {
        "resource": "messages-api",
        "operation": "send-audio",
        "instanceName": "VEPPERS",
        "remoteJid": "={{ $('Edit Fields1').item.json.contact_id }}",
        "media": "https://drive.google.com/uc?export=download&id=1BGfJkWlQDQCHD2UPUz47IcCpSSbiWaJZ",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        1700,
        1020
      ],
      "id": "09511d54-bb94-45f4-a655-0dba63b2babd",
      "name": "Evolution API5",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc",
          "mode": "list",
          "cachedResultName": "\u0414\u0438\u0430\u043b\u043e\u0433\u0438",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u0412\u043e\u0442\u0441\u0430\u043f",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "step": "4",
            "contact_id": "={{ $json.contact_id }}",
            "name": "={{ $json.name }}",
            "LastAt": "={{ $items(\"Edit Fields1\")[0].json.date }}",
            "4 \u044d\u0442\u0430\u043f": "={{ $json[\"4 \u044d\u0442\u0430\u043f\"] || $items(\"Edit Fields1\")[0].json.date }}"
          },
          "matchingColumns": [
            "contact_id"
          ],
          "schema": [
            {
              "id": "contact_id",
              "displayName": "contact_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "step",
              "displayName": "step",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "weight_kg",
              "displayName": "weight_kg",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "FirstAt",
              "displayName": "FirstAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "LastAt",
              "displayName": "LastAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "1 \u044d\u0442\u0430\u043f",
              "displayName": "1 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "2 \u044d\u0442\u0430\u043f",
              "displayName": "2 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "3 \u044d\u0442\u0430\u043f",
              "displayName": "3 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "4 \u044d\u0442\u0430\u043f",
              "displayName": "4 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "5 \u044d\u0442\u0430\u043f",
              "displayName": "5 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "6 \u044d\u0442\u0430\u043f",
              "displayName": "6 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1540,
        1020
      ],
      "id": "2d2cc6c5-3426-48bf-bdb8-03909e947270",
      "name": "Google Sheets6",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "messages-api",
        "instanceName": "VEPPERS",
        "remoteJid": "={{ $('Edit Fields1').item.json.contact_id }}",
        "messageText": "\u041f\u0430\u0440\u0430 \u0441\u043b\u043e\u0432 \u043e\u0431\u043e \u043c\u043d\u0435 \ud83e\ude77   \n\n\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043d\u0430\u0441\u0442\u0430\u0441\u0438\u044f \u0412\u0435\u043f\u0435\u0440\u0441, \u044f \u0434\u0438\u043f\u043b\u043e\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0443\u0442\u0440\u0438\u0446\u0438\u043e\u043b\u043e\u0433, \u043f\u0441\u0438\u0445\u043e\u043b\u043e\u0433, \u043a\u043e\u0443\u0447 ICF, \u043f\u0441\u0438\u0445\u043e\u0441\u0430\u043c\u043e\u0442\u043e\u043b\u043e\u0433, \u0432 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043d\u0430\u0445\u043e\u0436\u0443\u0441\u044c 8 \u043b\u0435\u0442  \n\n\u261d\ufe0f\ud83d\udcaf\u0421\u043e \u043c\u043d\u043e\u0439 \u043f\u043e\u0445\u0443\u0434\u0435\u043b\u043e \u0431\u043e\u043b\u0435\u0435 3800 \u0447\u0435\u043b\u043e\u0432\u0435\u043a. \u0421\u043d\u0438\u043c\u0430\u044e \u0434\u0438\u0430\u0433\u043d\u043e\u0437\u044b: \u0441\u0430\u0445\u0430\u0440\u043d\u044b\u0439 \u0434\u0438\u0430\u0431\u0435\u0442, \u0440\u0435\u0437\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c, \u043e\u0436\u0438\u0440\u0435\u043d\u0438\u0435, \u0431\u0435\u0441\u043f\u043b\u043e\u0434\u0438\u0435, \u0433\u0438\u043f\u0435\u0440\u0442\u043e\u043d\u0438\u044f.    \ud83d\udcaa\u041f\u043e\u043c\u043e\u0433\u0430\u044e \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0432\u0435\u0441 \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u0435. \u0421\u043e \u043c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0438\u0437 30 \u043a\u0443\u0440\u0430\u0442\u043e\u0440\u043e\u0432. \ud83e\udd1d  \n\n\u041a\u0430\u043a \u043c\u044b \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u043c \u043f\u043e\u0445\u0443\u0434\u0435\u0442\u044c: \n\u2705\u0420\u0430\u0431\u043e\u0442\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 \u0432 \u0412\u0430\u0442\u0441\u0430\u043f \u0432 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u043a\u0443\u0440\u0430\u0442\u043e\u0440\u0430.  \n\u2764\ufe0f\u041a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u043f\u043e 15-20 \u0447\u0435\u043b\u043e\u0432\u0435\u043a. \n\u270d\ufe0f\u0412 \u0433\u0440\u0443\u043f\u043f\u0435 \u0432\u0435\u0434\u0435\u200c\u0442\u0441\u044f \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430, \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0412\u0430\u0448\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u0435.  \n\ud83e\udd1d\u041f\u0441\u0438\u0445\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435, \u043a\u043e\u0443\u0447\u0438\u043d\u0433\u043e\u0432\u043e\u0435 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0435\u043d\u0438\u0435. \n\ud83d\udc49\u0412\u044b\u0434\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u043d\u044e.  \n\ud83d\udcc3\u0415\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u0430\u044f(!) \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c \u043f\u043e \u0432\u0441\u0435\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c.  \n\u270d\ufe0f\u041c\u044b \u0432\u0435\u0434\u0435\u200c\u043c \u0437\u0430 \u0412\u0430\u043c\u0438 \u043f\u0438\u0449\u0435\u0432\u044b\u0435 \u0434\u043d\u0435\u0432\u043d\u0438\u043a\u0438.  \n\u2705\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u0430\u043b\u043e\u0440\u0438\u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. \u0412\u0441\u0435 \u0443\u0436\u0435 \u043f\u0440\u043e\u0441\u0447\u0438\u0442\u0430\u043d\u043e \u0437\u0430 \u0412\u0430\u0441. \n\ud83c\udf1f\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043c\u0435\u043d\u044e \ud83d\udc4d\ud83d\udc49\u0432\u0437\u0430\u0438\u043c\u043e\u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b  (\u0442.\u0435. \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u0432\u044b\u0431\u043e\u0440 \u043d\u0430 \u0412\u0430\u0448 \u0432\u043a\u0443\u0441). \n\ud83d\udca5\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b \u043f\u0438\u0442\u0430\u043d\u0438\u044f (\u043f\u0440\u043e\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u0445). \n\ud83c\udf89\u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0432 \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0435\u0434\u0430.  \n\n\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\ud83c\udf1f\u041f\u043e\u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437 \u0438 \u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430 \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0441 \u043b\u0438\u0448\u043d\u0438\u043c \u0432\u0435\u0441\u043e\u043c \u0438 \u043e\u0447\u0435\u043d\u044c \u0441\u043a\u043e\u0440\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0433\u0430\u0440\u0434\u0435\u0440\u043e\u0431 \ud83d\udc57\ud83d\udc60 )  \n\n\u0422\u0430\u043a\u0436\u0435 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u0435, \u0441\u043d\u044f\u0442\u044c \u0434\u0438\u0430\u0433\u043d\u043e\u0437\u044b: \u0421\u04142, \u0440\u0435\u0437\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u043a \u0438\u043d\u0441\u0443\u043b\u0438\u043d\u0443, \u0433\u0438\u043f\u0435\u0440\u0442\u043e\u043d\u0438\u044f, \u043e\u0436\u0438\u0440\u0435\u043d\u0438\u0435, \u0436\u0438\u0440\u043e\u0432\u043e\u0439 \u0433\u0435\u043f\u043e\u0442\u043e\u0437 \u0438 \u0442\u0434.",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        2080,
        1020
      ],
      "id": "93995d52-d520-4e3b-9ece-fee3683ef622",
      "name": "Evolution API6",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://evolution-api-production-9e6a.up.railway.app/chat/sendPresence/{{ $node[\"Webhook\"].json.body.instance || 'VEPPERS' }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "apikey",
              "value": "=sdvsdgs37e4jgfvuh2g24rsdfsf"
            },
            {
              "name": "content-type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ ({\n  number: String(\n    $('Edit Fields1').item.json.contact_id\n    || $json.contact_id\n    || $json.number\n    || $json.remoteJid\n    || $json.body?.data?.key?.remoteJid\n    || $json.body?.data?.key?.participant\n    || $json.body?.sender\n    || $json.from\n    || ''\n  ).split('@')[0].replace(/\\D/g,''),\n  presence: $json.presence || 'composing',   // 'composing' | 'recording'\n  delay: $json.PresenceComposingDelay ?? $json.typingDelayMs ?? 20000\n}) }}",
        "options": {}
      },
      "id": "7c5b1f4c-c5b4-41d6-a953-23e38f161c31",
      "name": "HTTP Request (Typing On)2",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        1920,
        1020
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notes": "\u0418\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u043d\u0430\u0431\u043e\u0440\u0430 (typing). \u0422\u0440\u0435\u0431\u0443\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c item \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0435 remoteJid, \u0438\u043d\u0430\u0447\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0443\u0442\u044c \u043a JID \u0438\u0437 \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431\u0445\u0443\u043a\u0430."
    },
    {
      "parameters": {
        "resource": "messages-api",
        "instanceName": "VEPPERS",
        "remoteJid": "={{ $('Edit Fields1').item.json.contact_id }}",
        "messageText": "=\ud83d\udcb8\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c   \n\n7500 \u0440\u0443\u0431.  (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u0440\u0430\u0441\u0441\u0440\u043e\u0447\u043a\u0430!) \n\ud83d\udd35\u0415\u0441\u043b\u0438 \u043e\u043f\u043b\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0435 \u0421\u0415\u0413\u041e\u0414\u041d\u042f \u0432 \n\ud83d\udd3a\u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u0441\u0443\u0442\u043e\u043a, \u0442\u043e (!)\ud83d\udc49 \n\ud83d\udd3a6500 \u0440\u0443\u0431. - \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0413\u0440\u0443\u043f\u043f\u0435 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430 \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u043c\u0435\u0441\u044f\u0446 (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u043e\u043f\u043b\u0430\u0442\u0430 \u0432 2 \u044d\u0442\u0430\u043f\u0430 \u043f\u043e 3250 \u0440\u0443\u0431) \n\u041f\u0440\u043e\u043b\u043e\u043d\u0433\u0430\u0446\u0438\u044f \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0441\u044f\u0446 (\u043f\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438) - 4000 \u0440\u0443\u0431 \u0432 \u043c\u0435\u0441\u044f\u0446.   \n\n\ud83d\udfe2\u0414\u0430\u0442\u0430 \u0441\u0442\u0430\u0440\u0442\u0430: {{ $json['\u0414\u0430\u0442\u0430 \u0441\u0442\u0430\u0440\u0442\u0430'] }}   \n\n\ud83d\udd34\u041d\u0430\u0448\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0418\u043d\u0441\u0442\u0430\u0433\u0440\u0430\u043c\u043c\ud83d\udc47   \n\nhttps://instagram.com/a.vepers?utm_medium=copy_link   \n\n\u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c https://t.me/+9oiL-YbTotY0MTdi  \n\n\u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c \"\u0421\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \" https://t.me/+evDmVWbiMcRiOGYy   \n\n\u0421\u0430\u0439\u0442 https://anastasiavepers.ru/   \n\n\u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b,  \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0439\u0442\u0435, \u044f \u0441 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435\u043c \u043d\u0430 \u043d\u0438\u0445 \u043e\u0442\u0432\u0435\u0447\u0443  \ud83d\udc8b\ud83e\udd1d ",
        "options_message": {
          "delay": 10000
        }
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        2500,
        1020
      ],
      "id": "df4697b8-e0c5-4cd4-9793-33aa4ca25580",
      "name": "Evolution API7",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1aVsjAorVhubrACj_YNSLy3t-rQYfBwjL1IQ_aBKRpEI",
          "mode": "list",
          "cachedResultName": "\u0410\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1aVsjAorVhubrACj_YNSLy3t-rQYfBwjL1IQ_aBKRpEI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u041b\u0438\u0441\u04421",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1aVsjAorVhubrACj_YNSLy3t-rQYfBwjL1IQ_aBKRpEI/edit#gid=0"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        2300,
        1020
      ],
      "id": "4c740dff-71be-49a1-8e2c-0b224e1342de",
      "name": "Google Sheets7",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "messages-api",
        "instanceName": "VEPPERS",
        "remoteJid": "={{ $('Edit Fields1').item.json.contact_id }}",
        "messageText": "={{ $node[\"OpenAI\"].json.message.content }}",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        2420,
        320
      ],
      "id": "07b788e6-ddd1-4287-88c3-4de1d43474b6",
      "name": "Evolution API8",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://evolution-api-production-9e6a.up.railway.app/chat/sendPresence/VEPPERS",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "apikey",
              "value": "sdvsdgs37e4jgfvuh2g24rsdfsf"
            },
            {
              "name": "content-type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ ({\n  number: String(\n    $('Edit Fields1').item.json.contact_id\n    || $json.contact_id\n    || $json.number\n    || $json.remoteJid\n    || $json.body?.data?.key?.remoteJid\n    || $json.body?.data?.key?.participant\n    || $json.body?.sender\n    || $json.from\n    || ''\n  ).split('@')[0].replace(/\\D/g,''),\n  presence: $json.presence || 'composing',   // 'composing' | 'recording'\n  delay: $json.PresenceComposingDelay ?? $json.typingDelayMs ?? 20000\n}) }}",
        "options": {}
      },
      "id": "719bda8f-efd5-4ed4-acb1-294772977e8b",
      "name": "HTTP Request (Typing On)3",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        2240,
        320
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notes": "\u0418\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u043d\u0430\u0431\u043e\u0440\u0430 (typing). \u0422\u0440\u0435\u0431\u0443\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c item \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0435 remoteJid, \u0438\u043d\u0430\u0447\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0443\u0442\u044c \u043a JID \u0438\u0437 \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431\u0445\u0443\u043a\u0430."
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-4.1-mini-2025-04-14",
          "mode": "list",
          "cachedResultName": "GPT-4.1-MINI-2025-04-14"
        },
        "messages": {
          "values": [
            {
              "content": "={{ \n  $json.text\n  || $node[\"Set Text (final)\"]?.json?.text\n  || $node[\"Transcribe\"]?.json?.text\n  || $node[\"Webhook\"].json.body?.data?.message?.conversation\n  || `\u0440\u043e\u0441\u0442: ${$json.height_cm || ''} \u0441\u043c; \u0432\u0435\u0441: ${$json.weight_kg || $node[\"Code\"].json.weight_kg || ''} \u043a\u0433`\n}}"
            },
            {
              "content": "\u0422\u044b \u2014 \u043d\u0443\u0442\u0440\u0438\u0446\u0438\u043e\u043b\u043e\u0433 \u0438 \u0436\u0435\u043d\u0441\u043a\u0438\u0439 \u043a\u043e\u0443\u0447, \u043e\u0431\u0449\u0430\u0435\u0448\u044c\u0441\u044f \u0441 \u0442\u0451\u043f\u043b\u043e\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0438 \u043b\u0451\u0433\u043a\u043e\u0441\u0442\u044c\u044e.\n\u041d\u0430 \u0432\u0445\u043e\u0434 \u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0448\u044c \u0440\u043e\u0441\u0442 (\u0432 \u0441\u043c) \u0438 \u0432\u0435\u0441 (\u0432 \u043a\u0433).\n\n\u0422\u0432\u043e\u044f \u0437\u0430\u0434\u0430\u0447\u0430:\n\n\u041d\u0430\u0439\u0442\u0438 \u0440\u043e\u0441\u0442 \u0438 \u0432\u0435\u0441, \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 \u043c\u0430\u0441\u0441\u044b \u0442\u0435\u043b\u0430 (\u0418\u041c\u0422 = \u0432\u0435\u0441 / (\u0440\u043e\u0441\u0442 \u0432 \u043c\u0435\u0442\u0440\u0430\u0445)^2).\n\n\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044e \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 \u0412\u041e\u0417:\n\n<18.5 \u2014 \u0434\u0435\u0444\u0438\u0446\u0438\u0442 \u043c\u0430\u0441\u0441\u044b\n\n18.5\u201324.9 \u2014 \u043d\u043e\u0440\u043c\u0430\n\n25\u201329.9 \u2014 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u0439 \u0432\u0435\u0441\n\n30\u201334.9 \u2014 \u043e\u0436\u0438\u0440\u0435\u043d\u0438\u0435 I \u0441\u0442\u0435\u043f\u0435\u043d\u0438\n\n35\u201339.9 \u2014 \u043e\u0436\u0438\u0440\u0435\u043d\u0438\u0435 II \u0441\u0442\u0435\u043f\u0435\u043d\u0438\n\n\u226540 \u2014 \u043e\u0436\u0438\u0440\u0435\u043d\u0438\u0435 III \u0441\u0442\u0435\u043f\u0435\u043d\u0438\n\n\u041e\u0442\u0432\u0435\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u043e\u0432\u0430\u043c\u0438:\n\u00ab\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0418\u041c\u0422 (\u0418\u043d\u0434\u0435\u043a\u0441 \u043c\u0430\u0441\u0441\u044b \u0442\u0435\u043b\u0430)\u2026\u00bb\n\n\u0414\u0430\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 3\u20134 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f:\n\n\u0423\u043a\u0430\u0436\u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0439 \u0418\u041c\u0422 (\u0441 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u043e \u0434\u0435\u0441\u044f\u0442\u044b\u0445) \u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044e.\n\n\u0415\u0441\u043b\u0438 \u0418\u041c\u0422 \u0432 \u043d\u043e\u0440\u043c\u0435: \u043f\u043e\u0445\u0432\u0430\u043b\u0438 (\u00ab\u0432\u044b \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0435\u0441\u044c \ud83c\udf38\u00bb \u0438\u043b\u0438 \u00ab\u0432\u044b \u0432 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0438 \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u0442\u0435\u043b\u043e\u043c \ud83d\udc83\u00bb), \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438, \u0447\u0442\u043e \u043e\u0442 25 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u00ab\u043b\u0438\u0448\u043d\u0438\u0439 \u0432\u0435\u0441\u00bb, \u0438 \u0432\u0430\u0436\u043d\u043e \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.\n\n\u0415\u0441\u043b\u0438 \u0418\u041c\u0422 \u0432\u044b\u0448\u0435 \u043d\u043e\u0440\u043c\u044b: \u043f\u043e\u0434\u0431\u043e\u0434\u0440\u0438, \u0434\u043e\u0431\u0430\u0432\u044c \u044d\u043d\u0435\u0440\u0433\u0438\u044e (\u00ab\u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u2728\u00bb), \u043f\u043e\u043a\u0430\u0436\u0438, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c.\n\n\u0415\u0441\u043b\u0438 \u0434\u0435\u0444\u0438\u0446\u0438\u0442: \u043c\u044f\u0433\u043a\u043e \u0443\u043a\u0430\u0436\u0438 \u043d\u0430 \u0440\u0438\u0441\u043a\u0438 (\u00ab\u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0438\u043b \ud83c\udf38\u00bb), \u0434\u043e\u0431\u0430\u0432\u044c \u0437\u0430\u0431\u043e\u0442\u044b \u0438 \u043d\u0430\u0434\u0435\u0436\u0434\u044b.\n\n\u0412\u0441\u0435\u0433\u0434\u0430 \u043f\u0438\u0448\u0438 \u0432 \u0436\u0435\u043d\u0441\u043a\u043e\u043c \u0441\u0442\u0438\u043b\u0435, \u0434\u0440\u0443\u0436\u0435\u043b\u044e\u0431\u043d\u043e, \u0441 \u044d\u043c\u043e\u0434\u0437\u0438, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0448\u044c \u043f\u043e\u0434\u0440\u0443\u0433\u0443.\n\n\u0417\u0430\u0432\u0435\u0440\u0448\u0438 \u043b\u0451\u0433\u043a\u0438\u043c \u043d\u0430\u043c\u0451\u043a\u043e\u043c \u043d\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u0431\u0435\u0437 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f:\n\u00ab\u0412 \u0421\u0442\u0440\u043e\u0439\u043d\u044f\u0448\u043a\u0430\u0445 \u043c\u044b \u043c\u044f\u0433\u043a\u043e \u0432\u0435\u0434\u0451\u043c \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c \u043a \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u043e\u043c\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0443 \ud83d\udc95\n\n\u041f\u043e\u0434\u0441\u043a\u0430\u0436\u0438\u0442\u0435, \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043d\u0430\u043c\u0438, \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430?)\u00bb\n\n\u0424\u043e\u0440\u043c\u0430\u0442 \u043e\u0442\u0432\u0435\u0442\u0430:\n\u2014 3\u20134 \u0436\u0438\u0432\u044b\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u044d\u043c\u043e\u0434\u0437\u0438.\n\u2014 \u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u0438 \u0442\u0430\u0431\u043b\u0438\u0446.\n\n\ud83d\udd39 \u041f\u0440\u0438\u043c\u0435\u0440\u044b\n\n\u0412\u0432\u043e\u0434: \u00ab\u0420\u043e\u0441\u0442 170, \u0432\u0435\u0441 63\u00bb\n\u0412\u044b\u0432\u043e\u0434:\n\u00ab\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0418\u041c\u0422 (\u0418\u043d\u0434\u0435\u043a\u0441 \u043c\u0430\u0441\u0441\u044b \u0442\u0435\u043b\u0430) \u2014 \u043e\u043d \u0440\u0430\u0432\u0435\u043d 21,8 \ud83c\udf38 \u042d\u0442\u043e \u043d\u043e\u0440\u043c\u0430, \u0432\u044b \u0434\u0435\u0440\u0436\u0438\u0442\u0435 \u0441\u0435\u0431\u044f \u0432 \u0444\u043e\u0440\u043c\u0435\ud83d\udcaa\ud83d\udc83 \u041d\u043e \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0441\u043a\u0438\u043d\u0443\u0442\u044c, \u043f\u043e \u0418\u041c\u0422 \u0437\u0430\u043f\u0430\u0441 \u0435\u0441\u0442\u044c \u0438 \u044d\u0442\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043c\u0430\ud83d\udc95 \n\n\u041f\u043e\u0434\u0441\u043a\u0430\u0436\u0438\u0442\u0435, \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043d\u0430\u043c\u0438, \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430?)\u00bb\n\n\u0412\u0432\u043e\u0434: \u00ab\u0420\u043e\u0441\u0442 172, \u0432\u0435\u0441 92\u00bb\n\u0412\u044b\u0432\u043e\u0434:\n\u00ab\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0418\u041c\u0422 (\u0418\u043d\u0434\u0435\u043a\u0441 \u043c\u0430\u0441\u0441\u044b \u0442\u0435\u043b\u0430) \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c 31,1 \u2728 \u042d\u0442\u043e \u0443\u0436\u0435 \u043e\u0436\u0438\u0440\u0435\u043d\u0438\u0435 I \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \ud83d\ude4c \u0412\u0441\u0451 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0443 \u043f\u0438\u0442\u0430\u043d\u0438\u044f. \u0421\u043d\u0438\u0436\u0430\u044f\u0441\u044c \u043a \u0418\u041c\u0422 30 \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044e \u00ab\u043b\u0438\u0448\u043d\u0438\u0439 \u0432\u0435\u0441\u00bb, \u043d\u0443 \u0430 \u0442\u0430\u043c \u043d\u0435 \u0437\u0430 \u0433\u043e\u0440\u0430\u043c\u0438 \u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f \u00ab\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0441\u00bb\ud83d\ude09\ud83e\udd1d\n\n\u041f\u043e\u0434\u0441\u043a\u0430\u0436\u0438\u0442\u0435, \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043d\u0430\u043c\u0438, \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430?)\u00bb",
              "role": "system"
            }
          ]
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        1900,
        320
      ],
      "id": "c7b5d30d-09d9-4580-a83d-27804d5d14b1",
      "name": "OpenAI",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "messages-api",
        "instanceName": "VEPPERS",
        "remoteJid": "={{ $('Edit Fields1').item.json.contact_id }}",
        "messageText": "={{ $node[\"OpenAI1\"].json.message.content }}",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        2420,
        480
      ],
      "id": "c52bcbe5-29a2-4dad-9cef-0dccf62063ce",
      "name": "Evolution API9",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://evolution-api-production-9e6a.up.railway.app/chat/sendPresence/VEPPERS",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "apikey",
              "value": "sdvsdgs37e4jgfvuh2g24rsdfsf"
            },
            {
              "name": "content-type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ ({\n  number: String(\n    $('Edit Fields1').item.json.contact_id\n    || $json.contact_id\n    || $json.number\n    || $json.remoteJid\n    || $json.body?.data?.key?.remoteJid\n    || $json.body?.data?.key?.participant\n    || $json.body?.sender\n    || $json.from\n    || ''\n  ).split('@')[0].replace(/\\D/g,''),\n  presence: $json.presence || 'composing',   // 'composing' | 'recording'\n  delay: $json.PresenceComposingDelay ?? $json.typingDelayMs ?? 20000\n}) }}",
        "options": {}
      },
      "id": "f161c2e1-7ec7-449d-9489-0b97b604c402",
      "name": "HTTP Request (Typing On)4",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        2240,
        480
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notes": "\u0418\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u043d\u0430\u0431\u043e\u0440\u0430 (typing). \u0422\u0440\u0435\u0431\u0443\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c item \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0435 remoteJid, \u0438\u043d\u0430\u0447\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0443\u0442\u044c \u043a JID \u0438\u0437 \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431\u0445\u0443\u043a\u0430."
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-4.1-mini-2025-04-14",
          "mode": "list",
          "cachedResultName": "GPT-4.1-MINI-2025-04-14"
        },
        "messages": {
          "values": [
            {
              "content": "={{ \n  $json.text\n  || $node[\"Set Text (final)\"]?.json?.text\n  || $node[\"Transcribe\"]?.json?.text\n  || $node[\"Webhook\"].json.body?.data?.message?.conversation\n  || `\u0440\u043e\u0441\u0442: ${$json.height_cm || ''} \u0441\u043c; \u0432\u0435\u0441: ${$json.weight_kg || $node[\"Code\"].json.weight_kg || ''} \u043a\u0433`\n}}"
            },
            {
              "content": "\u0422\u044b \u2014 \u043d\u0443\u0442\u0440\u0438\u0446\u0438\u043e\u043b\u043e\u0433 \u0438 \u0436\u0435\u043d\u0441\u043a\u0438\u0439 \u043a\u043e\u0443\u0447, \u043e\u0431\u0449\u0430\u0435\u0448\u044c\u0441\u044f \u0441 \u0442\u0451\u043f\u043b\u043e\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0438 \u043b\u0451\u0433\u043a\u043e\u0441\u0442\u044c\u044e.\n\u041d\u0430 \u0432\u0445\u043e\u0434 \u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0448\u044c \u0440\u043e\u0441\u0442 (\u0432 \u0441\u043c) \u0438 \u0432\u0435\u0441 (\u0432 \u043a\u0433).\n\n\u0422\u0432\u043e\u044f \u0437\u0430\u0434\u0430\u0447\u0430:\n\n\u041d\u0430\u0439\u0442\u0438 \u0440\u043e\u0441\u0442 \u0438 \u0432\u0435\u0441, \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 \u043c\u0430\u0441\u0441\u044b \u0442\u0435\u043b\u0430 (\u0418\u041c\u0422 = \u0432\u0435\u0441 / (\u0440\u043e\u0441\u0442 \u0432 \u043c\u0435\u0442\u0440\u0430\u0445)^2).\n\n\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044e \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 \u0412\u041e\u0417:\n\n<18.5 \u2014 \u0434\u0435\u0444\u0438\u0446\u0438\u0442 \u043c\u0430\u0441\u0441\u044b\n\n18.5\u201324.9 \u2014 \u043d\u043e\u0440\u043c\u0430\n\n25\u201329.9 \u2014 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u0439 \u0432\u0435\u0441\n\n30\u201334.9 \u2014 \u043e\u0436\u0438\u0440\u0435\u043d\u0438\u0435 I \u0441\u0442\u0435\u043f\u0435\u043d\u0438\n\n35\u201339.9 \u2014 \u043e\u0436\u0438\u0440\u0435\u043d\u0438\u0435 II \u0441\u0442\u0435\u043f\u0435\u043d\u0438\n\n\u226540 \u2014 \u043e\u0436\u0438\u0440\u0435\u043d\u0438\u0435 III \u0441\u0442\u0435\u043f\u0435\u043d\u0438\n\n\u041e\u0442\u0432\u0435\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u043e\u0432\u0430\u043c\u0438:\n\u00ab\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0418\u041c\u0422 (\u0418\u043d\u0434\u0435\u043a\u0441 \u043c\u0430\u0441\u0441\u044b \u0442\u0435\u043b\u0430)\u2026\u00bb\n\n\u0414\u0430\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 3\u20134 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f:\n\n\u0423\u043a\u0430\u0436\u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0439 \u0418\u041c\u0422 (\u0441 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u043e \u0434\u0435\u0441\u044f\u0442\u044b\u0445) \u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044e.\n\n\u0415\u0441\u043b\u0438 \u0418\u041c\u0422 \u0432 \u043d\u043e\u0440\u043c\u0435: \u043f\u043e\u0445\u0432\u0430\u043b\u0438 (\u00ab\u0432\u044b \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0435\u0441\u044c \ud83c\udf38\u00bb \u0438\u043b\u0438 \u00ab\u0432\u044b \u0432 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0438 \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u0442\u0435\u043b\u043e\u043c \ud83d\udc83\u00bb), \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438, \u0447\u0442\u043e \u043e\u0442 25 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u00ab\u043b\u0438\u0448\u043d\u0438\u0439 \u0432\u0435\u0441\u00bb, \u0438 \u0432\u0430\u0436\u043d\u043e \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.\n\n\u0415\u0441\u043b\u0438 \u0418\u041c\u0422 \u0432\u044b\u0448\u0435 \u043d\u043e\u0440\u043c\u044b: \u043f\u043e\u0434\u0431\u043e\u0434\u0440\u0438, \u0434\u043e\u0431\u0430\u0432\u044c \u044d\u043d\u0435\u0440\u0433\u0438\u044e (\u00ab\u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u2728\u00bb), \u043f\u043e\u043a\u0430\u0436\u0438, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c.\n\n\u0415\u0441\u043b\u0438 \u0434\u0435\u0444\u0438\u0446\u0438\u0442: \u043c\u044f\u0433\u043a\u043e \u0443\u043a\u0430\u0436\u0438 \u043d\u0430 \u0440\u0438\u0441\u043a\u0438 (\u00ab\u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0438\u043b \ud83c\udf38\u00bb), \u0434\u043e\u0431\u0430\u0432\u044c \u0437\u0430\u0431\u043e\u0442\u044b \u0438 \u043d\u0430\u0434\u0435\u0436\u0434\u044b.\n\n\u0412\u0441\u0435\u0433\u0434\u0430 \u043f\u0438\u0448\u0438 \u0432 \u0436\u0435\u043d\u0441\u043a\u043e\u043c \u0441\u0442\u0438\u043b\u0435, \u0434\u0440\u0443\u0436\u0435\u043b\u044e\u0431\u043d\u043e, \u0441 \u044d\u043c\u043e\u0434\u0437\u0438, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0448\u044c \u043f\u043e\u0434\u0440\u0443\u0433\u0443.\n\n\u0417\u0430\u0432\u0435\u0440\u0448\u0438 \u043b\u0451\u0433\u043a\u0438\u043c \u043d\u0430\u043c\u0451\u043a\u043e\u043c \u043d\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u0431\u0435\u0437 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f:\n\u00ab\u0412 \u0421\u0442\u0440\u043e\u0439\u043d\u044f\u0448\u043a\u0430\u0445 \u043c\u044b \u043c\u044f\u0433\u043a\u043e \u0432\u0435\u0434\u0451\u043c \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c \u043a \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u043e\u043c\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0443 \ud83d\udc95\n\n\u041f\u043e\u0434\u0441\u043a\u0430\u0436\u0438\u0442\u0435, \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043d\u0430\u043c\u0438, \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430?)\u00bb\n\n\u0424\u043e\u0440\u043c\u0430\u0442 \u043e\u0442\u0432\u0435\u0442\u0430:\n\u2014 3\u20134 \u0436\u0438\u0432\u044b\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u044d\u043c\u043e\u0434\u0437\u0438.\n\u2014 \u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u0438 \u0442\u0430\u0431\u043b\u0438\u0446.\n\n\ud83d\udd39 \u041f\u0440\u0438\u043c\u0435\u0440\u044b\n\n\u0412\u0432\u043e\u0434: \u00ab\u0420\u043e\u0441\u0442 170, \u0432\u0435\u0441 63\u00bb\n\u0412\u044b\u0432\u043e\u0434:\n\u00ab\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0418\u041c\u0422 (\u0418\u043d\u0434\u0435\u043a\u0441 \u043c\u0430\u0441\u0441\u044b \u0442\u0435\u043b\u0430) \u2014 \u043e\u043d \u0440\u0430\u0432\u0435\u043d 21,8 \ud83c\udf38 \u042d\u0442\u043e \u043d\u043e\u0440\u043c\u0430, \u0432\u044b \u0434\u0435\u0440\u0436\u0438\u0442\u0435 \u0441\u0435\u0431\u044f \u0432 \u0444\u043e\u0440\u043c\u0435\ud83d\udcaa\ud83d\udc83 \u041d\u043e \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0441\u043a\u0438\u043d\u0443\u0442\u044c, \u043f\u043e \u0418\u041c\u0422 \u0437\u0430\u043f\u0430\u0441 \u0435\u0441\u0442\u044c \u0438 \u044d\u0442\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043c\u0430\ud83d\udc95 \n\n\u041f\u043e\u0434\u0441\u043a\u0430\u0436\u0438\u0442\u0435, \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043d\u0430\u043c\u0438, \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430?)\u00bb\n\n\u0412\u0432\u043e\u0434: \u00ab\u0420\u043e\u0441\u0442 172, \u0432\u0435\u0441 92\u00bb\n\u0412\u044b\u0432\u043e\u0434:\n\u00ab\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0418\u041c\u0422 (\u0418\u043d\u0434\u0435\u043a\u0441 \u043c\u0430\u0441\u0441\u044b \u0442\u0435\u043b\u0430) \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c 31,1 \u2728 \u042d\u0442\u043e \u0443\u0436\u0435 \u043e\u0436\u0438\u0440\u0435\u043d\u0438\u0435 I \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \ud83d\ude4c \u0412\u0441\u0451 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0443 \u043f\u0438\u0442\u0430\u043d\u0438\u044f. \u0421\u043d\u0438\u0436\u0430\u044f\u0441\u044c \u043a \u0418\u041c\u0422 30 \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044e \u00ab\u043b\u0438\u0448\u043d\u0438\u0439 \u0432\u0435\u0441\u00bb, \u043d\u0443 \u0430 \u0442\u0430\u043c \u043d\u0435 \u0437\u0430 \u0433\u043e\u0440\u0430\u043c\u0438 \u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f \u00ab\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0441\u00bb\ud83d\ude09\ud83e\udd1d\n\n\u041f\u043e\u0434\u0441\u043a\u0430\u0436\u0438\u0442\u0435, \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043d\u0430\u043c\u0438, \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430?)\u00bb",
              "role": "system"
            }
          ]
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        1900,
        480
      ],
      "id": "016795a1-b136-4a2a-bf5a-b101c8bc3d0c",
      "name": "OpenAI1",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "messages-api",
        "instanceName": "VEPPERS",
        "remoteJid": "={{ $('Edit Fields1').item.json.contact_id }}",
        "messageText": "={{ $node[\"OpenAI2\"].json.message.content }}",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        2420,
        640
      ],
      "id": "64670ec2-6bef-40a9-beb9-6d88e52688c3",
      "name": "Evolution API10",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://evolution-api-production-9e6a.up.railway.app/chat/sendPresence/VEPPERS",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "apikey",
              "value": "sdvsdgs37e4jgfvuh2g24rsdfsf"
            },
            {
              "name": "content-type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ ({\n  number: String(\n    $('Edit Fields1').item.json.contact_id\n    || $json.contact_id\n    || $json.number\n    || $json.remoteJid\n    || $json.body?.data?.key?.remoteJid\n    || $json.body?.data?.key?.participant\n    || $json.body?.sender\n    || $json.from\n    || ''\n  ).split('@')[0].replace(/\\D/g,''),\n  presence: $json.presence || 'composing',   // 'composing' | 'recording'\n  delay: $json.PresenceComposingDelay ?? $json.typingDelayMs ?? 20000\n}) }}",
        "options": {}
      },
      "id": "61dedce5-9c97-43c1-973a-3ce4f21a4ca5",
      "name": "HTTP Request (Typing On)5",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        2240,
        640
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "onError": "continueRegularOutput",
      "notes": "\u0418\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u043d\u0430\u0431\u043e\u0440\u0430 (typing). \u0422\u0440\u0435\u0431\u0443\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c item \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0435 remoteJid, \u0438\u043d\u0430\u0447\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0443\u0442\u044c \u043a JID \u0438\u0437 \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431\u0445\u0443\u043a\u0430."
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-4.1-mini-2025-04-14",
          "mode": "list",
          "cachedResultName": "GPT-4.1-MINI-2025-04-14"
        },
        "messages": {
          "values": [
            {
              "content": "={{ \n  $json.text\n  || $node[\"Set Text (final)\"]?.json?.text\n  || $node[\"Transcribe\"]?.json?.text\n  || $node[\"Webhook\"].json.body?.data?.message?.conversation\n  || `\u0440\u043e\u0441\u0442: ${$json.height_cm || ''} \u0441\u043c; \u0432\u0435\u0441: ${$json.weight_kg || $node[\"Code\"].json.weight_kg || ''} \u043a\u0433`\n}}"
            },
            {
              "content": "\u0422\u044b \u2014 \u043d\u0443\u0442\u0440\u0438\u0446\u0438\u043e\u043b\u043e\u0433 \u0438 \u0436\u0435\u043d\u0441\u043a\u0438\u0439 \u043a\u043e\u0443\u0447, \u043e\u0431\u0449\u0430\u0435\u0448\u044c\u0441\u044f \u0441 \u0442\u0451\u043f\u043b\u043e\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0438 \u043b\u0451\u0433\u043a\u043e\u0441\u0442\u044c\u044e.\n\u041d\u0430 \u0432\u0445\u043e\u0434 \u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0448\u044c \u0440\u043e\u0441\u0442 (\u0432 \u0441\u043c) \u0438 \u0432\u0435\u0441 (\u0432 \u043a\u0433).\n\n\u0422\u0432\u043e\u044f \u0437\u0430\u0434\u0430\u0447\u0430:\n\n\u041d\u0430\u0439\u0442\u0438 \u0440\u043e\u0441\u0442 \u0438 \u0432\u0435\u0441, \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 \u043c\u0430\u0441\u0441\u044b \u0442\u0435\u043b\u0430 (\u0418\u041c\u0422 = \u0432\u0435\u0441 / (\u0440\u043e\u0441\u0442 \u0432 \u043c\u0435\u0442\u0440\u0430\u0445)^2).\n\n\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044e \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 \u0412\u041e\u0417:\n\n<18.5 \u2014 \u0434\u0435\u0444\u0438\u0446\u0438\u0442 \u043c\u0430\u0441\u0441\u044b\n\n18.5\u201324.9 \u2014 \u043d\u043e\u0440\u043c\u0430\n\n25\u201329.9 \u2014 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u0439 \u0432\u0435\u0441\n\n30\u201334.9 \u2014 \u043e\u0436\u0438\u0440\u0435\u043d\u0438\u0435 I \u0441\u0442\u0435\u043f\u0435\u043d\u0438\n\n35\u201339.9 \u2014 \u043e\u0436\u0438\u0440\u0435\u043d\u0438\u0435 II \u0441\u0442\u0435\u043f\u0435\u043d\u0438\n\n\u226540 \u2014 \u043e\u0436\u0438\u0440\u0435\u043d\u0438\u0435 III \u0441\u0442\u0435\u043f\u0435\u043d\u0438\n\n\u041e\u0442\u0432\u0435\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u043e\u0432\u0430\u043c\u0438:\n\u00ab\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0418\u041c\u0422 (\u0418\u043d\u0434\u0435\u043a\u0441 \u043c\u0430\u0441\u0441\u044b \u0442\u0435\u043b\u0430)\u2026\u00bb\n\n\u0414\u0430\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 3\u20134 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f:\n\n\u0423\u043a\u0430\u0436\u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0439 \u0418\u041c\u0422 (\u0441 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u043e \u0434\u0435\u0441\u044f\u0442\u044b\u0445) \u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044e.\n\n\u0415\u0441\u043b\u0438 \u0418\u041c\u0422 \u0432 \u043d\u043e\u0440\u043c\u0435: \u043f\u043e\u0445\u0432\u0430\u043b\u0438 (\u00ab\u0432\u044b \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0435\u0441\u044c \ud83c\udf38\u00bb \u0438\u043b\u0438 \u00ab\u0432\u044b \u0432 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0438 \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u0442\u0435\u043b\u043e\u043c \ud83d\udc83\u00bb), \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438, \u0447\u0442\u043e \u043e\u0442 25 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u00ab\u043b\u0438\u0448\u043d\u0438\u0439 \u0432\u0435\u0441\u00bb, \u0438 \u0432\u0430\u0436\u043d\u043e \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.\n\n\u0415\u0441\u043b\u0438 \u0418\u041c\u0422 \u0432\u044b\u0448\u0435 \u043d\u043e\u0440\u043c\u044b: \u043f\u043e\u0434\u0431\u043e\u0434\u0440\u0438, \u0434\u043e\u0431\u0430\u0432\u044c \u044d\u043d\u0435\u0440\u0433\u0438\u044e (\u00ab\u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u2728\u00bb), \u043f\u043e\u043a\u0430\u0436\u0438, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c.\n\n\u0415\u0441\u043b\u0438 \u0434\u0435\u0444\u0438\u0446\u0438\u0442: \u043c\u044f\u0433\u043a\u043e \u0443\u043a\u0430\u0436\u0438 \u043d\u0430 \u0440\u0438\u0441\u043a\u0438 (\u00ab\u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0438\u043b \ud83c\udf38\u00bb), \u0434\u043e\u0431\u0430\u0432\u044c \u0437\u0430\u0431\u043e\u0442\u044b \u0438 \u043d\u0430\u0434\u0435\u0436\u0434\u044b.\n\n\u0412\u0441\u0435\u0433\u0434\u0430 \u043f\u0438\u0448\u0438 \u0432 \u0436\u0435\u043d\u0441\u043a\u043e\u043c \u0441\u0442\u0438\u043b\u0435, \u0434\u0440\u0443\u0436\u0435\u043b\u044e\u0431\u043d\u043e, \u0441 \u044d\u043c\u043e\u0434\u0437\u0438, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0448\u044c \u043f\u043e\u0434\u0440\u0443\u0433\u0443.\n\n\u0417\u0430\u0432\u0435\u0440\u0448\u0438 \u043b\u0451\u0433\u043a\u0438\u043c \u043d\u0430\u043c\u0451\u043a\u043e\u043c \u043d\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u0431\u0435\u0437 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f:\n\u00ab\u0412 \u0421\u0442\u0440\u043e\u0439\u043d\u044f\u0448\u043a\u0430\u0445 \u043c\u044b \u043c\u044f\u0433\u043a\u043e \u0432\u0435\u0434\u0451\u043c \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c \u043a \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u043e\u043c\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0443 \ud83d\udc95\n\n\u041f\u043e\u0434\u0441\u043a\u0430\u0436\u0438\u0442\u0435, \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043d\u0430\u043c\u0438, \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430?)\u00bb\n\n\u0424\u043e\u0440\u043c\u0430\u0442 \u043e\u0442\u0432\u0435\u0442\u0430:\n\u2014 3\u20134 \u0436\u0438\u0432\u044b\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u044d\u043c\u043e\u0434\u0437\u0438.\n\u2014 \u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u0438 \u0442\u0430\u0431\u043b\u0438\u0446.\n\n\ud83d\udd39 \u041f\u0440\u0438\u043c\u0435\u0440\u044b\n\n\u0412\u0432\u043e\u0434: \u00ab\u0420\u043e\u0441\u0442 170, \u0432\u0435\u0441 63\u00bb\n\u0412\u044b\u0432\u043e\u0434:\n\u00ab\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0418\u041c\u0422 (\u0418\u043d\u0434\u0435\u043a\u0441 \u043c\u0430\u0441\u0441\u044b \u0442\u0435\u043b\u0430) \u2014 \u043e\u043d \u0440\u0430\u0432\u0435\u043d 21,8 \ud83c\udf38 \u042d\u0442\u043e \u043d\u043e\u0440\u043c\u0430, \u0432\u044b \u0434\u0435\u0440\u0436\u0438\u0442\u0435 \u0441\u0435\u0431\u044f \u0432 \u0444\u043e\u0440\u043c\u0435\ud83d\udcaa\ud83d\udc83 \u041d\u043e \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0441\u043a\u0438\u043d\u0443\u0442\u044c, \u043f\u043e \u0418\u041c\u0422 \u0437\u0430\u043f\u0430\u0441 \u0435\u0441\u0442\u044c \u0438 \u044d\u0442\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043c\u0430\ud83d\udc95 \n\n\u041f\u043e\u0434\u0441\u043a\u0430\u0436\u0438\u0442\u0435, \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043d\u0430\u043c\u0438, \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430?)\u00bb\n\n\u0412\u0432\u043e\u0434: \u00ab\u0420\u043e\u0441\u0442 172, \u0432\u0435\u0441 92\u00bb\n\u0412\u044b\u0432\u043e\u0434:\n\u00ab\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0418\u041c\u0422 (\u0418\u043d\u0434\u0435\u043a\u0441 \u043c\u0430\u0441\u0441\u044b \u0442\u0435\u043b\u0430) \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c 31,1 \u2728 \u042d\u0442\u043e \u0443\u0436\u0435 \u043e\u0436\u0438\u0440\u0435\u043d\u0438\u0435 I \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \ud83d\ude4c \u0412\u0441\u0451 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0443 \u043f\u0438\u0442\u0430\u043d\u0438\u044f. \u0421\u043d\u0438\u0436\u0430\u044f\u0441\u044c \u043a \u0418\u041c\u0422 30 \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044e \u00ab\u043b\u0438\u0448\u043d\u0438\u0439 \u0432\u0435\u0441\u00bb, \u043d\u0443 \u0430 \u0442\u0430\u043c \u043d\u0435 \u0437\u0430 \u0433\u043e\u0440\u0430\u043c\u0438 \u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f \u00ab\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0441\u00bb\ud83d\ude09\ud83e\udd1d\n\n\u041f\u043e\u0434\u0441\u043a\u0430\u0436\u0438\u0442\u0435, \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043d\u0430\u043c\u0438, \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430?)\u00bb",
              "role": "system"
            }
          ]
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        1900,
        640
      ],
      "id": "7f341b4d-c863-4f6c-a7e3-e869e427da0b",
      "name": "OpenAI2",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "messages-api",
        "instanceName": "VEPPERS",
        "remoteJid": "={{ $('Edit Fields1').item.json.contact_id }}",
        "messageText": "\u0417\u0434\u043e\u0440\u043e\u0432\u043e \u0441\u043d\u043e\u0432\u0430 \u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0430\u0441 \u0440\u044f\u0434\u043e\u043c! \ud83d\udc9a \u0412\u044b \u0437\u043d\u0430\u0435\u0442\u0435 \u043d\u0430\u0448 \u043f\u043e\u0434\u0445\u043e\u0434 \u2014 \u043c\u044f\u0433\u043a\u043e, \u043f\u043e \u0434\u0435\u043b\u0443 \u0438 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c. \u041d\u0438\u0436\u0435 \u2014 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0439 \u0441\u0442\u0430\u0440\u0442 \ud83d\udc47",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        1920,
        860
      ],
      "id": "e81c3564-6d86-4a28-ae46-3adbe376498b",
      "name": "Evolution API11",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://evolution-api-production-9e6a.up.railway.app/chat/sendPresence/VEPPERS",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "apikey",
              "value": "sdvsdgs37e4jgfvuh2g24rsdfsf"
            },
            {
              "name": "content-type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({\n  number: String(\n    $('Edit Fields1').item.json.contact_id\n    || $json.contact_id\n    || $json.number\n    || $json.remoteJid\n    || $json.body?.data?.key?.remoteJid\n    || $json.body?.sender\n    || $json.from\n    || ''\n  ).split('@')[0].replace(/\\D/g,''),\n  // \u0434\u043b\u044f \u0442\u0432\u043e\u0435\u0433\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 presence/delay \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432 \u041a\u041e\u0420\u041d\u0415\n  presence: 'composing',           // \u0438\u043b\u0438 'recording'\n  delay: ($json.PresenceComposingDelay ?? $json.typingDelayMs ?? 20000)\n}) }}\n",
        "options": {}
      },
      "id": "3ce925fd-5e15-4517-829c-4e32ba4cbab8",
      "name": "HTTP Request (Typing On)6",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        1700,
        860
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notes": "\u0418\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u043d\u0430\u0431\u043e\u0440\u0430 (typing). \u0422\u0440\u0435\u0431\u0443\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c item \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0435 remoteJid, \u0438\u043d\u0430\u0447\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0443\u0442\u044c \u043a JID \u0438\u0437 \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431\u0445\u0443\u043a\u0430."
    },
    {
      "parameters": {
        "resource": "messages-api",
        "instanceName": "VEPPERS",
        "remoteJid": "={{ $('Edit Fields1').item.json.contact_id }}",
        "messageText": "=\ud83d\udcb8\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c   \n\n7500 \u0440\u0443\u0431.  (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u0440\u0430\u0441\u0441\u0440\u043e\u0447\u043a\u0430!) \n\ud83d\udd35\u0415\u0441\u043b\u0438 \u043e\u043f\u043b\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0435 \u0421\u0415\u0413\u041e\u0414\u041d\u042f \u0432 \n\ud83d\udd3a\u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u0441\u0443\u0442\u043e\u043a, \u0442\u043e (!)\ud83d\udc49 \n\ud83d\udd3a6500 \u0440\u0443\u0431. - \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0413\u0440\u0443\u043f\u043f\u0435 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430 \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u043c\u0435\u0441\u044f\u0446 (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u043e\u043f\u043b\u0430\u0442\u0430 \u0432 2 \u044d\u0442\u0430\u043f\u0430 \u043f\u043e 3250 \u0440\u0443\u0431) \n\u041f\u0440\u043e\u043b\u043e\u043d\u0433\u0430\u0446\u0438\u044f \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0441\u044f\u0446 (\u043f\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438) - 4000 \u0440\u0443\u0431 \u0432 \u043c\u0435\u0441\u044f\u0446.   \n\n\ud83d\udfe2\u0414\u0430\u0442\u0430 \u0441\u0442\u0430\u0440\u0442\u0430: {{ $json['\u0414\u0430\u0442\u0430 \u0441\u0442\u0430\u0440\u0442\u0430'] }}   \n\n\ud83d\udd34\u041d\u0430\u0448\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0418\u043d\u0441\u0442\u0430\u0433\u0440\u0430\u043c\u043c\ud83d\udc47   \n\nhttps://instagram.com/a.vepers?utm_medium=copy_link   \n\n\u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c https://t.me/+9oiL-YbTotY0MTdi  \n\n\u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c \"\u0421\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \" https://t.me/+evDmVWbiMcRiOGYy   \n\n\u0421\u0430\u0439\u0442 https://anastasiavepers.ru/   \n\n\u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b,  \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0439\u0442\u0435, \u044f \u0441 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435\u043c \u043d\u0430 \u043d\u0438\u0445 \u043e\u0442\u0432\u0435\u0447\u0443  \ud83d\udc8b\ud83e\udd1d ",
        "options_message": {
          "delay": 10000
        }
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        2300,
        860
      ],
      "id": "05f186db-b64e-41c6-95a8-186fdf71a7cf",
      "name": "Evolution API12",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1aVsjAorVhubrACj_YNSLy3t-rQYfBwjL1IQ_aBKRpEI",
          "mode": "list",
          "cachedResultName": "\u0410\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1aVsjAorVhubrACj_YNSLy3t-rQYfBwjL1IQ_aBKRpEI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u041b\u0438\u0441\u04421",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1aVsjAorVhubrACj_YNSLy3t-rQYfBwjL1IQ_aBKRpEI/edit#gid=0"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        2080,
        860
      ],
      "id": "23246aee-4124-440f-a597-9552184dacb5",
      "name": "Google Sheets8",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc",
          "mode": "list",
          "cachedResultName": "\u0414\u0438\u0430\u043b\u043e\u0433\u0438",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u0412\u043e\u0442\u0441\u0430\u043f",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "step": "4",
            "contact_id": "={{ $('Edit Fields1').item.json.contact_id }}",
            "name": "={{ $json.name }}",
            "FirstAt": "={{ $json.FirstAt || $items(\"Edit Fields1\")[0].json.date }}",
            "4 \u044d\u0442\u0430\u043f": "={{ $json[\"4 \u044d\u0442\u0430\u043f\"] || $items(\"Edit Fields1\")[0].json.date }}"
          },
          "matchingColumns": [
            "contact_id"
          ],
          "schema": [
            {
              "id": "contact_id",
              "displayName": "contact_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "step",
              "displayName": "step",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "weight_kg",
              "displayName": "weight_kg",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "FirstAt",
              "displayName": "FirstAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "LastAt",
              "displayName": "LastAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "1 \u044d\u0442\u0430\u043f",
              "displayName": "1 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "2 \u044d\u0442\u0430\u043f",
              "displayName": "2 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "3 \u044d\u0442\u0430\u043f",
              "displayName": "3 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "4 \u044d\u0442\u0430\u043f",
              "displayName": "4 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "5 \u044d\u0442\u0430\u043f",
              "displayName": "5 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "6 \u044d\u0442\u0430\u043f",
              "displayName": "6 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1540,
        860
      ],
      "id": "5c76e429-3755-4ed8-bf4b-b2d7e2728043",
      "name": "Google Sheets9",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "d76bcca3-b1bd-45dd-bdef-bc1f0e56e1c5",
                    "leftValue": "={{ (JSON.parse(($items(\"OpenAI3\")[0]?.json?.message?.content) || \"{}\")).answer }}",
                    "rightValue": "full",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "b7f20159-4ce8-417e-905a-17a07d280c59",
                    "leftValue": "={{ (JSON.parse(($items(\"OpenAI3\")[0]?.json?.message?.content) || \"{}\")).answer }}",
                    "rightValue": "split",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "171f4d59-e35f-48a6-b4d6-444f06e23ecf",
                    "leftValue": "={{ (JSON.parse(($items(\"OpenAI3\")[0]?.json?.message?.content) || \"{}\")).answer }}",
                    "rightValue": "other",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        -1020,
        780
      ],
      "id": "9440618d-aac9-4778-8269-873fcbbf703d",
      "name": "Switch4"
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-4.1-mini-2025-04-14",
          "mode": "list",
          "cachedResultName": "GPT-4.1-MINI-2025-04-14"
        },
        "messages": {
          "values": [
            {
              "content": "\u0422\u044b \u2014 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043e\u0442\u0432\u0435\u0442\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043f\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0443 \u043e\u043f\u043b\u0430\u0442\u044b.\n\u0412\u0435\u0440\u043d\u0438 \u0421\u0422\u0420\u041e\u0413\u041e \u043e\u0434\u0438\u043d JSON-\u043e\u0431\u044a\u0435\u043a\u0442 \u0411\u0415\u0417 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439 \u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0440\u043e\u0432\u043d\u043e \u0432 \u0442\u0430\u043a\u043e\u043c \u0432\u0438\u0434\u0435:\n\n{\n  \"answer\": \"full\" | \"split\" | \"other\",\n  \"full_amount\": number | null,\n  \"part_amount\": number | null\n}\n\n\u041f\u0440\u0430\u0432\u0438\u043b\u0430:\n1) \"full\" \u2014 \u0435\u0441\u043b\u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u044f\u0432\u043d\u043e \u0441\u043e\u0433\u043b\u0430\u0441\u0435\u043d \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0435\u0439\u0447\u0430\u0441/\u0441\u0435\u0433\u043e\u0434\u043d\u044f/ \u0418\u041b\u0418 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 6500 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: \u00ab\u043f\u0435\u0440\u0435\u0432\u043e\u0436\u0443 6500\u00bb, \u00ab\u043e\u043f\u043b\u0430\u0447\u0443 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e\u00bb, \u00ab\u0433\u043e\u0442\u043e\u0432 \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0446\u0435\u043b\u0438\u043a\u043e\u043c\u00bb).\n2) \"split\" \u2014 \u0435\u0441\u043b\u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0445\u043e\u0447\u0435\u0442 \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0432 2 \u044d\u0442\u0430\u043f\u0430/\u0432 \u0440\u0430\u0441\u0441\u0440\u043e\u0447\u043a\u0443/\u0447\u0430\u0441\u0442\u044f\u043c\u0438, \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u00ab\u043f\u043e 3250\u00bb, \u00ab\u0434\u0432\u0443\u043c\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430\u043c\u0438\u00bb, \u00ab\u0432 \u0434\u0432\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430\u00bb, \u00ab50/50\u00bb, \u00ab\u0447\u0430\u0441\u0442\u044f\u043c\u0438\u00bb, \u00ab\u0440\u0430\u0441\u0441\u0440\u043e\u0447\u043a\u0430\u00bb.\n3) \"other\" \u2014 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043e\u0442\u0432\u0435\u0442: \u0443\u0442\u043e\u0447\u043d\u044f\u044e\u0449\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u00ab\u043f\u043e\u0434\u0443\u043c\u0430\u044e\u00bb, \u00ab\u043f\u043e\u0437\u0436\u0435\u00bb, \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u0440\u043e \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u043f\u043b\u0430\u0442\u044b, \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435 4000 (\u044d\u0442\u043e \u0446\u0435\u043d\u0430 \u043f\u0440\u043e\u043b\u043e\u043d\u0433\u0430\u0446\u0438\u0438, \u041d\u0415 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u043b\u0430\u0442\u0451\u0436), \u043c\u043e\u043b\u0447\u0430\u043d\u0438\u0435 \u043f\u043e \u0441\u0443\u0442\u0438 \u0438 \u0442.\u0434.\n\n\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0447\u0438\u0441\u0435\u043b:\n- \u0421\u0447\u0438\u0442\u0430\u0439 6500 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432/\u0437\u043d\u0430\u043a\u043e\u0432 (\u00ab6 500\u00bb, \u00ab6,500\u00bb, \u00ab6500\u0440\u00bb, \u00ab6500 \u0440\u0443\u0431\u00bb \u0438 \u0442.\u043f.).\n- \u0421\u0447\u0438\u0442\u0430\u0439 3250 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e (\u00ab3 250\u00bb, \u00ab3,250\u00bb \u0438 \u0442.\u043f.).\n- \u0418\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0439 \u0447\u0438\u0441\u043b\u0430 \u043d\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0435\u0441\u044f \u043a \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u043f\u043b\u0430\u0442\u0435\u0436\u0443 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u00ab4000\u00bb \u2014 \u044d\u0442\u043e \u043d\u0435 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u043b\u0430\u0442\u0435\u0436, \u043d\u0435 \u043f\u043e\u0432\u043e\u0434 \u0434\u043b\u044f \"split\" \u0438\u043b\u0438 \"full\").\n\n\u041f\u043e\u043b\u044f \u0432 \u043e\u0442\u0432\u0435\u0442\u0435:\n- \"answer\": \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u0438\u0437 \"full\" | \"split\" | \"other\".\n- \"full_amount\": 6500 \u0435\u0441\u043b\u0438 answer=\"full\", \u0438\u043d\u0430\u0447\u0435 null.\n- \"part_amount\": 3250 \u0435\u0441\u043b\u0438 answer=\"split\" (2 \u043f\u043b\u0430\u0442\u0435\u0436\u0430), \u0438\u043d\u0430\u0447\u0435 null.\n\n\u0412\u0435\u0440\u043d\u0438 \u0422\u041e\u041b\u042c\u041a\u041e JSON-\u043e\u0431\u044a\u0435\u043a\u0442, \u0431\u0435\u0437 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u0438 \u0431\u0435\u0437 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432\u043e\u043a\u0440\u0443\u0433.",
              "role": "system"
            },
            {
              "content": "={{ \n  $json.text\n  || $node[\"Set Text (final)\"]?.json?.text\n  || $node[\"Transcribe\"]?.json?.text\n  || $node[\"Webhook\"].json.body?.data?.message?.conversation\n}}"
            }
          ]
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        -1340,
        640
      ],
      "id": "5d6d2daa-bfc9-4e6a-af54-5ea1ec7422a3",
      "name": "OpenAI3",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "messages-api",
        "instanceName": "={{ $node[\"Webhook\"].json.body.instance || 'VEPPERS' }}",
        "remoteJid": "={{ $('Edit Fields1').item.json.contact_id }}",
        "messageText": "\u041e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0434\u043b\u044f \u0432\u0430\u0441 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0447\u0435\u0440\u0435\u0437 \u0420\u043e\u0431\u043e\u043a\u0430\u0441\u0441\u0443\ud83d\udc47\n\nhttps://auth.robokassa.ru/merchant/Invoice/ac1LPG8h9kqRWGd1OoLuvQ\n\n6500 \u0440\u0443\u0431\u043b\u0435\u0439, \u0431\u0443\u0434\u0435\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u044b \u0437\u0430 \u043e\u043f\u043b\u0430\u0442\u0443 \u043f\u043e \u0421\u0411\u041f\ud83d\ude4f\n\u041d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u043e\u043f\u043b\u0430\u0442\u0443 \u0438 \u043f\u0440\u0438\u0448\u043b\u0438\u0442\u0435 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442, \u044f \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u043c \u0432\u0430\u0448 \u043a\u043e\u043d\u0442\u0430\u043a\u0442 \u0433\u043b\u0430\u0432\u043d\u043e\u043c\u0443 \u043a\u0443\u0440\u0430\u0442\u043e\u0440\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432\u0430\u0441 \u0432 \u0433\u0440\u0443\u043f\u043f\u0443",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        -440,
        640
      ],
      "id": "ac0f9311-a9fe-4743-96c2-b10a56b9f553",
      "name": "Evolution API13",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://evolution-api-production-9e6a.up.railway.app/chat/sendPresence/VEPPERS",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "apikey",
              "value": "sdvsdgs37e4jgfvuh2g24rsdfsf"
            },
            {
              "name": "content-type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ ({\n  number: String(\n    $('Edit Fields1').item.json.contact_id\n    || $json.contact_id\n    || $json.number\n    || $json.remoteJid\n    || $json.body?.data?.key?.remoteJid\n    || $json.body?.data?.key?.participant\n    || $json.body?.sender\n    || $json.from\n    || ''\n  ).split('@')[0].replace(/\\D/g,''),\n  presence: $json.presence || 'composing',   // 'composing' | 'recording'\n  delay: $json.PresenceComposingDelay ?? $json.typingDelayMs ?? 20000\n}) }}",
        "options": {}
      },
      "id": "e7e9dc7d-71e2-418a-afbf-8b82651a2205",
      "name": "HTTP Request (Typing On)7",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        -620,
        640
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notes": "\u0418\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u043d\u0430\u0431\u043e\u0440\u0430 (typing). \u0422\u0440\u0435\u0431\u0443\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c item \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0435 remoteJid, \u0438\u043d\u0430\u0447\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0443\u0442\u044c \u043a JID \u0438\u0437 \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431\u0445\u0443\u043a\u0430."
    },
    {
      "parameters": {
        "resource": "messages-api",
        "instanceName": "={{ $node[\"Webhook\"].json.body.instance || 'VEPPERS' }}",
        "remoteJid": "={{ $('Edit Fields1').item.json.contact_id }}",
        "messageText": "\u041e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0434\u043b\u044f \u0432\u0430\u0441 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0447\u0435\u0440\u0435\u0437 \u0420\u043e\u0431\u043e\u043a\u0430\u0441\u0441\u0443\ud83d\udc47\n\nhttps://auth.robokassa.ru/merchant/Invoice/d2To3yQFxU-ayotyPuULWQ\n\n3250 \u0440\u0443\u0431\u043b\u0435\u0439, \u0431\u0443\u0434\u0435\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u044b \u0437\u0430 \u043e\u043f\u043b\u0430\u0442\u0443 \u043f\u043e \u0421\u0411\u041f\ud83d\ude4f\n\u041d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u043e\u043f\u043b\u0430\u0442\u0443 \u0438 \u043f\u0440\u0438\u0448\u043b\u0438\u0442\u0435 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442, \u044f \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u043c \u0432\u0430\u0448 \u043a\u043e\u043d\u0442\u0430\u043a\u0442 \u0433\u043b\u0430\u0432\u043d\u043e\u043c\u0443 \u043a\u0443\u0440\u0430\u0442\u043e\u0440\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432\u0430\u0441 \u0432 \u0433\u0440\u0443\u043f\u043f\u0443",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        -440,
        780
      ],
      "id": "058bccc0-7c2b-4570-bd7b-b1b37a0bfde9",
      "name": "Evolution API14",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://evolution-api-production-9e6a.up.railway.app/chat/sendPresence/VEPPERS",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "apikey",
              "value": "sdvsdgs37e4jgfvuh2g24rsdfsf"
            },
            {
              "name": "content-type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ ({\n  number: String(\n    $('Edit Fields1').item.json.contact_id\n    || $json.contact_id\n    || $json.number\n    || $json.remoteJid\n    || $json.body?.data?.key?.remoteJid\n    || $json.body?.data?.key?.participant\n    || $json.body?.sender\n    || $json.from\n    || ''\n  ).split('@')[0].replace(/\\D/g,''),\n  presence: $json.presence || 'composing',   // 'composing' | 'recording'\n  delay: $json.PresenceComposingDelay ?? $json.typingDelayMs ?? 20000\n}) }}",
        "options": {}
      },
      "id": "c174ecf5-72e6-4ead-8bab-43ea11a9c202",
      "name": "HTTP Request (Typing On)8",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        -620,
        780
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notes": "\u0418\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u043d\u0430\u0431\u043e\u0440\u0430 (typing). \u0422\u0440\u0435\u0431\u0443\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c item \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0435 remoteJid, \u0438\u043d\u0430\u0447\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0443\u0442\u044c \u043a JID \u0438\u0437 \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431\u0445\u0443\u043a\u0430."
    },
    {
      "parameters": {
        "resource": "messages-api",
        "instanceName": "={{ $node[\"Webhook\"].json.body.instance || 'VEPPERS' }}",
        "remoteJid": "=79933244832@s.whatsapp.net",
        "messageText": "={{ (() => {\n  const j = $json;\n\n  // \u0418\u043c\u044f: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0442\u043e, \u0447\u0442\u043e \u043a\u043b\u0430\u0434\u0451\u0442 Switch (BAD.NAME / NAME),\n  // \u0437\u0430\u0442\u0435\u043c \u043a\u043e\u0440\u043d\u0435\u0432\u044b\u0435/\u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0440\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430, \u0432 \u043a\u043e\u043d\u0446\u0435 \u2014 \u0438\u0437 Edit Fields1.\n  const name = (\n    j.BAD?.NAME\n    ?? j.NAME\n    ?? j.name\n    ?? j.body?.name\n    ?? j.body?.pushName\n    ?? j.body?.data?.pushName\n    ?? $items(\"Edit Fields1\")[0]?.json?.name\n    ?? ''\n  ).toString().trim() || '\u2014';\n\n  // \u041d\u043e\u043c\u0435\u0440: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0437 Switch (BAD.FON / phone), \u0437\u0430\u0442\u0435\u043c contact_id \u0438 \u0442.\u0434.\n  const digits = String(\n    j.BAD?.FON\n    ?? j.phone\n    ?? j.FON\n    ?? j.contact_id\n    ?? j.body?.contact_id\n    ?? j.body?.from\n    ?? $items(\"Edit Fields1\")[0]?.json?.contact_id\n    ?? ''\n  ).split('@')[0].replace(/\\D/g,'');\n\n  // \u0422\u0435\u043a\u0441\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430: \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439, \u0441 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c\u0438 \u0444\u043e\u043b\u0431\u044d\u043a\u0430\u043c\u0438\n  const text =\n    $items(\"Set Text (final)\")[0]?.json?.text\n    ?? j.text\n    ?? j.body?.text\n    ?? j.body?.data?.message?.conversation\n    ?? '[\u043d\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430]';\n\n  return [\n    '\u041b\u0438\u0434 \u2014 \u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435',\n    '',\n    `\u0418\u043c\u044f: ${name}`,\n    digits ? `\u0422\u0435\u043b\u0435\u0444\u043e\u043d: +${digits}` : '\u0422\u0435\u043b\u0435\u0444\u043e\u043d: \u2014',\n    `\u0422\u0435\u043a\u0441\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430: ${text}`,\n  ].join('\\n');\n})() }}",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        -820,
        940
      ],
      "id": "aa6a27ea-3c59-496d-8886-b216c2db0914",
      "name": "Evolution API15",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc",
          "mode": "list",
          "cachedResultName": "\u0414\u0438\u0430\u043b\u043e\u0433\u0438",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u0412\u043e\u0442\u0441\u0430\u043f",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "step": "5",
            "contact_id": "={{ $('Switch1').item.json.contact_id }}",
            "LastAt": "={{ $items(\"Edit Fields1\")[0].json.date }}",
            "5 \u044d\u0442\u0430\u043f": "={{ $json[\"5 \u044d\u0442\u0430\u043f\"] || $items(\"Edit Fields1\")[0].json.date }}"
          },
          "matchingColumns": [
            "contact_id"
          ],
          "schema": [
            {
              "id": "contact_id",
              "displayName": "contact_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "step",
              "displayName": "step",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "weight_kg",
              "displayName": "weight_kg",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "FirstAt",
              "displayName": "FirstAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "LastAt",
              "displayName": "LastAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "1 \u044d\u0442\u0430\u043f",
              "displayName": "1 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "2 \u044d\u0442\u0430\u043f",
              "displayName": "2 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "3 \u044d\u0442\u0430\u043f",
              "displayName": "3 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "4 \u044d\u0442\u0430\u043f",
              "displayName": "4 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "5 \u044d\u0442\u0430\u043f",
              "displayName": "5 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "6 \u044d\u0442\u0430\u043f",
              "displayName": "6 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        -820,
        640
      ],
      "id": "1c75c57f-6e09-4f63-aa2d-16bc0f060329",
      "name": "Google Sheets10",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc",
          "mode": "list",
          "cachedResultName": "\u0414\u0438\u0430\u043b\u043e\u0433\u0438",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u0412\u043e\u0442\u0441\u0430\u043f",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "step": "5",
            "contact_id": "={{ $('Switch1').item.json.contact_id }}",
            "LastAt": "={{ $items(\"Edit Fields1\")[0].json.date }}",
            "5 \u044d\u0442\u0430\u043f": "={{ $json[\"5 \u044d\u0442\u0430\u043f\"] || $items(\"Edit Fields1\")[0].json.date }}"
          },
          "matchingColumns": [
            "contact_id"
          ],
          "schema": [
            {
              "id": "contact_id",
              "displayName": "contact_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "step",
              "displayName": "step",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "weight_kg",
              "displayName": "weight_kg",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "FirstAt",
              "displayName": "FirstAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "LastAt",
              "displayName": "LastAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "1 \u044d\u0442\u0430\u043f",
              "displayName": "1 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "2 \u044d\u0442\u0430\u043f",
              "displayName": "2 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "3 \u044d\u0442\u0430\u043f",
              "displayName": "3 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "4 \u044d\u0442\u0430\u043f",
              "displayName": "4 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "5 \u044d\u0442\u0430\u043f",
              "displayName": "5 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "6 \u044d\u0442\u0430\u043f",
              "displayName": "6 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        -820,
        780
      ],
      "id": "7bafa421-14bf-480f-a5ab-291688897257",
      "name": "Google Sheets11",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "image",
        "operation": "analyze",
        "modelId": {
          "__rl": true,
          "value": "gpt-4o-2024-11-20",
          "mode": "list",
          "cachedResultName": "GPT-4O-2024-11-20"
        },
        "text": "\u0442\u0435\u043a\u0441\u0442 \u0441 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438",
        "inputType": "base64",
        "binaryPropertyName": "file",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        -140,
        640
      ],
      "id": "002ab299-9fdc-4389-9db2-7ca97ef6fa20",
      "name": "OpenAI4",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://evolution-api-production-9e6a.up.railway.app/chat/getBase64FromMediaMessage/{{ $node[\"Webhook\"].json.body.instance || 'VEPPERS' }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "apikey",
              "value": "={{ $node[\"Webhook\"].json.body.apikey || $json.body?.apikey || $env.EVO_API_KEY }}"
            },
            {
              "name": "content-type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({\n  message: {\n    key: {\n      id: $node[\"Webhook\"].json.body.data.key.id,\n      remoteJid: $node[\"Webhook\"].json.body.data.key.remoteJid\n    }\n  },\n  convertToMp4: false\n}) }}",
        "options": {
          "response": {
            "response": {
              "neverError": true,
              "responseFormat": "json"
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -860,
        360
      ],
      "id": "d53052dd-1342-4656-a856-e61cc5fee61e",
      "name": "HTTP Request1"
    },
    {
      "parameters": {
        "operation": "toBinary",
        "sourceProperty": "base64",
        "binaryPropertyName": "file",
        "options": {
          "fileName": "={{ $json.fileName || 'receipt.jpg' }}",
          "mimeType": "={{ $json.mimetype || 'image/jpeg' }}"
        }
      },
      "type": "n8n-nodes-base.convertToFile",
      "typeVersion": 1.1,
      "position": [
        -680,
        360
      ],
      "id": "434ed586-5ab0-428e-a77f-afca248ce3f3",
      "name": "Convert to File1"
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-4.1-mini-2025-04-14",
          "mode": "list",
          "cachedResultName": "GPT-4.1-MINI-2025-04-14"
        },
        "messages": {
          "values": [
            {
              "content": "\u0422\u044b \u043f\u0430\u0440\u0441\u0435\u0440 \u0447\u0435\u043a\u043e\u0432. \u0412\u0435\u0440\u043d\u0438 \u0422\u041e\u041b\u042c\u041a\u041e JSON \u0431\u0435\u0437 \u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u0431\u0435\u0437 ```.\n\n\u0421\u0445\u0435\u043c\u0430:\n{\n  \"receipt\": \"yes|no|uncertain\",\n  \"paid\": \"yes|no|uncertain\",\n  \"amount\": number|null,\n  \"method\": \"sbp|card|transfer|cash|unknown\",\n  \"confidence\": number  // 0..1\n}\n\n\u0415\u0441\u043b\u0438 \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u043e \u2014 \u0441\u0442\u0430\u0432\u044c \"uncertain\" \u0438 amount=null.\n\u0421\u0443\u043c\u043c\u0443 \u2014 \u0447\u0438\u0441\u043b\u043e\u043c (\u0432 \u0440\u0443\u0431\u043b\u044f\u0445) \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0438 \u0432\u0430\u043b\u044e\u0442\u044b.",
              "role": "system"
            },
            {
              "content": "={{ $json.content }}\n{{ $json.text }}"
            }
          ]
        },
        "jsonOutput": true,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        0,
        640
      ],
      "id": "2ec9a024-882c-4137-8e5f-03322be43708",
      "name": "OpenAI5",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "let o = {};\ntry { o = JSON.parse($json.message?.content || '{}'); } catch(e) {}\n\nconst base64 = $node[\"HTTP Request1\"].json?.base64 \n            || $node[\"HTTP Request1\"].json?.result?.base64 \n            || null;\n\nconst mimetype = $node[\"HTTP Request1\"].json?.mimetype || 'image/jpeg';\nconst fileName = $node[\"HTTP Request1\"].json?.fileName || (mimetype === 'application/pdf' ? 'receipt.pdf' : 'receipt.jpg');\n\nreturn [{\n  // \u0438\u0437 OpenAI5\n  receipt: o.receipt || 'uncertain',\n  paid: o.paid || 'uncertain',\n  amount: Number.isFinite(o.amount) ? o.amount : null,\n  method: o.method || 'unknown',\n\n  // \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0435 \u043f\u043e\u043b\u044f\n  is_paid: (o.paid === 'yes'),\n  name: $node[\"Webhook\"].json.body?.data?.pushName || '',\n  phone: String($node[\"Webhook\"].json.body?.data?.key?.remoteJid || $node[\"Webhook\"].json.body?.sender || '').split('@')[0].replace(/\\D/g,''),\n  caption_or_text: $node[\"Webhook\"].json.body?.data?.message?.imageMessage?.caption \n                 || $node[\"Webhook\"].json.body?.data?.message?.conversation || '',\n\n  // \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0444\u0430\u0439\u043b\u0430\n  base64,\n  mimetype,\n  fileName\n}];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        300,
        640
      ],
      "id": "e8e1badb-9310-419f-8941-bb1e6b3dd83b",
      "name": "Code1"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "f69fbc8c-cc54-45ce-bc38-97b15e8c34a3",
              "leftValue": "={{ $('OpenAI5').item.json.message.content.paid }}",
              "rightValue": "yes",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        500,
        640
      ],
      "id": "8f9c6d79-ed95-403e-9394-c8fad8f64b79",
      "name": "If1"
    },
    {
      "parameters": {
        "resource": "messages-api",
        "instanceName": "={{ $node[\"Webhook\"].json.body.instance || 'VEPPERS' }}",
        "remoteJid": "=79933244832@s.whatsapp.net",
        "messageText": "=\u2705 \u041a\u043b\u0438\u0435\u043d\u0442 \u043e\u043f\u043b\u0430\u0442\u0438\u043b\n\u0418\u043c\u044f: {{ $('If1').item.json.name }}\n\u0422\u0435\u043b\u0435\u0444\u043e\u043d: +{{ $('If1').item.json.phone }}\n\u0421\u0443\u043c\u043c\u0430: {{ $('OpenAI5').item.json.message.content.amount }}\n\u041c\u0435\u0442\u043e\u0434: {{ $('OpenAI5').item.json.message.content.method }}",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        60,
        860
      ],
      "id": "99583ed1-c318-4dcb-8518-eee9bf562da4",
      "name": "Evolution API16",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "resource": "messages-api",
        "instanceName": "={{ $node[\"Webhook\"].json.body.instance || 'VEPPERS' }}",
        "remoteJid": "=79933244832@s.whatsapp.net",
        "messageText": "=\u26a0\ufe0f \u043b\u0438\u0434 \u043f\u0440\u0438\u0441\u043b\u0430\u043b \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442 \u043e\u043f\u043b\u0430\u0442\u044b, \u043d\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043b\u0430 \u043e\u043f\u043b\u0430\u0442\u0443\n\n\u0418\u043c\u044f: {{ $('If1').item.json.name }}\n\u0422\u0435\u043b\u0435\u0444\u043e\u043d: +{{ $('If1').item.json.phone }}",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        500,
        860
      ],
      "id": "d8ced697-a762-4ab2-a3d9-ae57e7615994",
      "name": "Evolution API17",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc",
          "mode": "list",
          "cachedResultName": "\u0414\u0438\u0430\u043b\u043e\u0433\u0438",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u0412\u043e\u0442\u0441\u0430\u043f",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "step": "\u043e\u043f\u043b\u0430\u0447\u0435\u043d\u043e",
            "contact_id": "={{ $('Webhook').item.json.body.data.key.remoteJid }}",
            "LastAt": "={{ $json.LastAt || $json.date || new Date().toISOString() }}}",
            "6 \u044d\u0442\u0430\u043f": "={{ $json[\"6 \u044d\u0442\u0430\u043f\"] || $json.offerSentAt || $json.date || new Date().toISOString() }}"
          },
          "matchingColumns": [
            "contact_id"
          ],
          "schema": [
            {
              "id": "contact_id",
              "displayName": "contact_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "step",
              "displayName": "step",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "weight_kg",
              "displayName": "weight_kg",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "FirstAt",
              "displayName": "FirstAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "LastAt",
              "displayName": "LastAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "1 \u044d\u0442\u0430\u043f",
              "displayName": "1 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "2 \u044d\u0442\u0430\u043f",
              "displayName": "2 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "3 \u044d\u0442\u0430\u043f",
              "displayName": "3 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "4 \u044d\u0442\u0430\u043f",
              "displayName": "4 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "5 \u044d\u0442\u0430\u043f",
              "displayName": "5 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "6 \u044d\u0442\u0430\u043f",
              "displayName": "6 \u044d\u0442\u0430\u043f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        -80,
        860
      ],
      "id": "487dfc8d-c3a0-4fbc-af56-126feae7972d",
      "name": "Google Sheets12",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "messages-api",
        "operation": "send-image",
        "instanceName": "={{ $node[\"Webhook\"].json.body.instance || 'VEPPERS' }}",
        "remoteJid": "=79933244832@s.whatsapp.net",
        "media": "={{ $('If1').item.json.base64 }}",
        "caption": "=",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        200,
        860
      ],
      "id": "82a96855-dcc2-4344-871f-8b2533ea217b",
      "name": "Evolution API18",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "operation": "pdf",
        "binaryPropertyName": "file",
        "options": {}
      },
      "type": "n8n-nodes-base.extractFromFile",
      "typeVersion": 1,
      "position": [
        -260,
        360
      ],
      "id": "7fa15ed6-7adc-4854-aa2e-4b45f9f1b9ce",
      "name": "Extract from File"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "f69fbc8c-cc54-45ce-bc38-97b15e8c34a3",
              "leftValue": "={{$binary.file.mimeType}}",
              "rightValue": "application/pdf",
              "operator": {
                "type": "string",
                "operation": "contains"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -500,
        360
      ],
      "id": "e049b095-a5df-4793-9e9c-94b37402bf13",
      "name": "If2"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "7a1bc435-55e8-4180-8e8b-6b1549813d12",
              "name": "phone",
              "value": "={{ (\n  $node[\"Webhook\"].json.body?.phone\n  || $node[\"Webhook\"].json.body?.from\n  || $node[\"Webhook\"].json.body?.data?.key?.remoteJid\n  || $node[\"Webhook\"].json.body?.remoteJid\n  || ''\n).toString().split('@')[0].replace(/\\D/g,'') }}",
              "type": "string"
            },
            {
              "id": "c5dd7444-ccf6-4c84-b27a-5dda06daa588",
              "name": "text",
              "value": "={{ (\n  $node[\"Webhook\"].json.body?.text\n  || $node[\"Webhook\"].json.body?.data?.message?.conversation\n  || ''\n).toString().trim() }}",
              "type": "string"
            },
            {
              "id": "57747cdb-749e-4134-9789-47f72b75356c",
              "name": "stage",
              "value": "={{ $json.body?.stage || 'bmi' }}",
              "type": "string"
            },
            {
              "id": "33dc288d-d221-4971-8385-932047188471",
              "name": "now",
              "value": "={{ Date.now() }}",
              "type": "string"
            },
            {
              "id": "c97c9878-1ae4-4284-a488-66e1975491d3",
              "name": "key",
              "value": "={{ (\n  (\n    $node[\"Webhook\"].json.body?.phone\n    || $node[\"Webhook\"].json.body?.from\n    || $node[\"Webhook\"].json.body?.data?.key?.remoteJid\n    || ''\n  ).toString().split('@')[0].replace(/\\D/g,'')\n) + ':' + ($node[\"Webhook\"].json.body?.stage || 'bmi') }}",
              "type": "string"
            },
            {
              "id": "f419217f-85ad-44d8-a9f6-6b1026983f52",
              "name": "chunk",
              "value": "={{ JSON.stringify({\n  text:\n    $node[\"Webhook\"].json.body?.text\n    || $node[\"Webhook\"].json.body?.data?.message?.conversation\n    || '',\n  ts: Date.now()\n}) }}",
              "type": "string"
            },
            {
              "id": "927c4e67-ba8e-4f75-9031-57e5b84c545d",
              "name": "contact_id",
              "value": "={{ (() => {\n  const raw =\n    $node[\"Webhook\"].json.body?.remoteJid\n    || $node[\"Webhook\"].json.body?.from\n    || $node[\"Webhook\"].json.body?.data?.key?.remoteJid\n    || '';\n  const s = String(raw).trim();\n  if (s.includes('@')) return s;\n  const d = s.replace(/\\D/g,'');\n  return d ? `${d}@s.whatsapp.net` : '';\n})() }}",
              "type": "string"
            },
            {
              "id": "ca5175a3-27b6-4501-adb9-eebb66234308",
              "name": "aggregated",
              "value": "={{ !!$node[\"Webhook\"].json.body?.aggregated }}",
              "type": "boolean"
            },
            {
              "id": "dc882aba-28fb-498f-8abf-10a48803b9ab",
              "name": "date",
              "value": "={{ new Date().toLocaleDateString('ru-RU', { timeZone: 'Europe/Moscow' }) }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -2620,
        100
      ],
      "id": "130a97f5-c15e-45bd-8c23-ca5d98e1bc4f",
      "name": "Edit Fields1"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc",
          "mode": "list",
          "cachedResultName": "\u0414\u0438\u0430\u043b\u043e\u0433\u0438",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 8285682,
          "mode": "list",
          "cachedResultName": "logs wapp",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit#gid=8285682"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "key",
              "lookupValue": "={{ (function () {\n  const jid =\n    $json.contact_id\n    || $items(\"If4\")[0]?.json?.contact_id\n    || $json.body?.data?.key?.remoteJid\n    || $json.body?.sender\n    || $json.body?.from\n    || $items(\"Webhook\")[0]?.json?.body?.data?.key?.remoteJid\n    || $items(\"Webhook1\")?.[0]?.json?.body?.data?.key?.remoteJid\n    || $items(\"Webhook\")[0]?.json?.body?.sender\n    || $items(\"Webhook1\")?.[0]?.json?.body?.sender\n    || '';\n  const digits = String(jid).split('@')[0].replace(/\\D/g,'');\n  const stage  = $json.stage || 'bmi';\n  return digits ? (digits + ':' + stage) : ($json.key || (':' + stage));\n})() }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        -2440,
        340
      ],
      "id": "4a5df8ca-0d5d-4c39-8ded-3a2431a779d8",
      "name": "Google Sheets13",
      "alwaysOutputData": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// --- \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438: \u0441\u043f\u0435\u0440\u0432\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 item, \u0437\u0430\u0442\u0435\u043c \u0432\u0435\u0431\u0445\u0443\u043a \u043a\u0430\u043a fallback ---\nconst cur  = $json || {};\nconst body = cur.body || {};\nconst data = body.data || {};\n\n// \u0425\u0435\u043b\u043f\u0435\u0440\u044b\nconst onlyDigits = v => String(v || '').split('@')[0].replace(/\\D/g,'');\nconst pick = (...xs) => xs.find(v => v !== undefined && v !== null && String(v).trim() !== '');\n\n// \u041a\u043e\u043d\u0442\u0430\u043a\u0442/\u0438\u043c\u044f/\u0442\u0435\u043a\u0441\u0442\nconst jid   = pick(cur.contact_id, data.key?.remoteJid, body.sender, body.from, '');\nconst name  = String(pick(cur.name,  data.pushName, body.pushName, '') || '').trim();\nconst text  = String(pick(cur.text,\n                          body.text,\n                          data.message?.conversation,\n                          data.message?.extendedTextMessage?.text,\n                          body.message?.conversation,\n                          '') || '').trim();\n\nconst phone = onlyDigits(jid);\nconst stage = cur.stage || 'bmi';\nconst key   = phone ? `${phone}:${stage}` : (cur.key || `:${stage}`);\n\nconst now    = Date.now();\nconst buffer = text ? JSON.stringify([{ text, ts: now }]) : JSON.stringify([]);\n\nreturn [{ json: { key, phone, stage, firstAt: now, lastAt: now, buffer, name } }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -2600,
        700
      ],
      "id": "e1272e2d-3277-42bb-b652-e63435a96fb7",
      "name": "Code2"
    },
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc",
          "mode": "list",
          "cachedResultName": "\u0414\u0438\u0430\u043b\u043e\u0433\u0438",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 8285682,
          "mode": "list",
          "cachedResultName": "logs wapp",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit#gid=8285682"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "key": "={{ $json.key }}",
            "phone": "={{ $json.phone }}",
            "lastAt": "={{ $json.lastAt }}",
            "stage": "={{ $json.stage }}",
            "firstAt": "={{ $json.firstAt }}",
            "buffer": "={{ $json.buffer }}",
            "name": "={{$json.name}}"
          },
          "matchingColumns": [
            "key"
          ],
          "schema": [
            {
              "id": "key",
              "displayName": "key",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "phone",
              "displayName": "phone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "stage",
              "displayName": "stage",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "firstAt",
              "displayName": "firstAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "lastAt",
              "displayName": "lastAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "buffer",
              "displayName": "buffer",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        -2420,
        700
      ],
      "id": "88ef4840-c949-4238-bfd5-288571186f88",
      "name": "Google Sheets14",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438\nconst cur = $json || {};\nconst row = $items(\"Google Sheets13\")[0]?.json || {};\nconst body = cur.body || {};\nconst data = body.data || {};\n\n// \u0425\u0435\u043b\u043f\u0435\u0440\u044b\nconst onlyDigits = v => String(v || '').split('@')[0].replace(/\\D/g,'');\nconst pick = (...xs) => xs.find(v => v !== undefined && v !== null && String(v).trim() !== '');\n\n// \u0412\u0440\u0435\u043c\u044f/\u044d\u0442\u0430\u043f\nconst now   = Number.isFinite(+cur.now) ? +cur.now : Date.now();\nconst stage = row.stage || cur.stage || 'bmi';\n\n// \u041a\u043e\u043d\u0442\u0430\u043a\u0442 \u0438 \u043a\u043b\u044e\u0447\nconst phone = String(\n  cur.phone\n  || onlyDigits(cur.contact_id)\n  || onlyDigits(row.key && String(row.key).split(':')[0])\n);\nlet key = row.key || cur.key || (phone ? `${phone}:${stage}` : `:${stage}`);\nif (!key || /^:/.test(key)) key = phone ? `${phone}:${stage}` : (key || `:${stage}`);\n\n// \u0422\u0435\u043a\u0441\u0442\nconst text = String(pick(\n  cur.text,\n  body.text,\n  data.message?.conversation,\n  data.message?.extendedTextMessage?.text,\n  body.message?.conversation,\n  ''\n) || '').trim();\n\n// \u0411\u0443\u0444\u0435\u0440\nlet arr = [];\ntry { arr = row.buffer ? JSON.parse(row.buffer) : []; } catch { arr = []; }\nconst chunk  = text ? { text, ts: now } : null;\nconst exists = chunk ? arr.some(x => String(x?.ts) === String(chunk.ts) && String(x?.text || '') === chunk.text) : false;\nconst nextArr = chunk ? (exists ? arr : [...arr, chunk]) : arr;\n\n// \u0418\u043c\u044f\nconst name = String(pick(row.name, cur.name, data.pushName, body.pushName, '') || '').trim();\n\nreturn [{ json: { key, phone, stage, firstAt: row.firstAt || now, lastAt: now, buffer: JSON.stringify(nextArr), name } }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -2600,
        540
      ],
      "id": "b626f9c6-fc6b-4f01-a7ba-f02f5c55880c",
      "name": "Code3"
    },
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc",
          "mode": "list",
          "cachedResultName": "\u0414\u0438\u0430\u043b\u043e\u0433\u0438",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 8285682,
          "mode": "list",
          "cachedResultName": "logs wapp",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit#gid=8285682"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "key": "={{ $json.key }}",
            "lastAt": "={{ $json.lastAt }}",
            "buffer": "={{$json.buffer}}",
            "name": "={{$json.name}}",
            "firstAt": "={{ $json.firstAt }}"
          },
          "matchingColumns": [
            "key"
          ],
          "schema": [
            {
              "id": "key",
              "displayName": "key",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "phone",
              "displayName": "phone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "stage",
              "displayName": "stage",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "firstAt",
              "displayName": "firstAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "lastAt",
              "displayName": "lastAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "buffer",
              "displayName": "buffer",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        -2420,
        540
      ],
      "id": "e36f882c-630b-425a-9dde-bf185a1f011d",
      "name": "Google Sheets15",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "fc7f633a-d184-488f-9914-6a58f6a466fc",
              "leftValue": "={{ $json.aggregated }}",
              "rightValue": "true",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -2440,
        100
      ],
      "id": "ef9f054a-1a4d-402b-888b-81897e604cdb",
      "name": "If (AGGREGATED?)"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "fc7f633a-d184-488f-9914-6a58f6a466fc",
              "leftValue": "={{$items('Google Sheets13').filter(i => Object.keys(i.json).length > 0).length}}",
              "rightValue": 0,
              "operator": {
                "type": "number",
                "operation": "gt"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -2760,
        700
      ],
      "id": "9c6d863b-1a43-4093-85df-1751f84cde9f",
      "name": "If (Row exists?)"
    },
    {
      "parameters": {
        "jsCode": "// \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a json \u043b\u044e\u0431\u043e\u0433\u043e \u0443\u0437\u043b\u0430 (\u0435\u0441\u043b\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u043b\u0441\u044f \u2014 \u0432\u0435\u0440\u043d\u0451\u0442 {})\nconst get = (name) => {\n  try { const a = $items(name); return (Array.isArray(a) && a.length) ? a[0].json : {}; }\n  catch(e){ return {}; }\n};\n\nlet o = {};\ntry { o = JSON.parse($json.message?.content || '{}'); } catch(e) {}\n\nconst hr = get(\"HTTP Request1\");   // \u0432\u043c\u0435\u0441\u0442\u043e $node[\"HTTP Request1\"]\nconst base64   = hr.base64 || hr.result?.base64 || null;\nconst mimetype = hr.mimetype || 'image/jpeg';\nconst fileName = hr.fileName || (mimetype === 'application/pdf' ? 'receipt.pdf' : 'receipt.jpg');\n\nreturn [{\n  // \u0438\u0437 OpenAI5\n  receipt: o.receipt || 'uncertain',\n  paid: o.paid || 'uncertain',\n  amount: Number.isFinite(o.amount) ? o.amount : null,\n  method: o.method || 'unknown',\n\n  // \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0435 \u043f\u043e\u043b\u044f\n  is_paid: (o.paid === 'yes'),\n  name: $items(\"Webhook\")[0]?.json?.body?.data?.pushName || '',\n  phone: String(($items(\"Webhook\")[0]?.json?.body?.data?.key?.remoteJid\n              || $items(\"Webhook\")[0]?.json?.body?.sender || ''))\n           .split('@')[0].replace(/\\D/g,''),\n  caption_or_text: $items(\"Webhook\")[0]?.json?.body?.data?.message?.imageMessage?.caption\n                || $items(\"Webhook\")[0]?.json?.body?.data?.message?.conversation || '',\n\n  // \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0444\u0430\u0439\u043b\u0430\n  base64, mimetype, fileName\n}];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        60,
        100
      ],
      "id": "a184eb00-1f46-49e0-ab78-1ec7810b1224",
      "name": "Code4"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "8895f5dc-3d67-4044-929f-7bf5afd16221",
              "leftValue": "={{ $json.body?.data?.message?.imageMessage?.mimetype \n   || $items('Webhook')[0]?.json?.body?.data?.message?.imageMessage?.mimetype \n   || '' }}",
              "rightValue": "image/",
              "operator": {
                "type": "string",
                "operation": "contains"
              }
            },
            {
              "id": "9f3dcc7a-f4d6-4c6d-a77e-f8a14e7b6d8b",
              "leftValue": "={{ $json.body?.data?.message?.documentMessage?.mimetype\n   || $items('Webhook')[0]?.json?.body?.data?.message?.documentMessage?.mimetype\n   || '' }}",
              "rightValue": "application/pdf",
              "operator": {
                "type": "string",
                "operation": "contains"
              }
            }
          ],
          "combinator": "or"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -2800,
        100
      ],
      "id": "c413f3b4-4a06-4dc6-a15c-a6f05898ed0e",
      "name": "If3"
    },
    {
      "parameters": {
        "resource": "messages-api",
        "instanceName": "={{ $node[\"Webhook\"].json.body.instance || 'VEPPERS' }}",
        "remoteJid": "={{ $('Webhook').item.json.body.data.key.remoteJid }}",
        "messageText": "=\u041f\u0435\u0440\u0435\u0434\u0430\u044e \u0432\u0430\u0448 \u043a\u043e\u043d\u0442\u0430\u043a\u0442 \u0433\u043b\u0430\u0432\u043d\u043e\u043c\u0443 \u043a\u0443\u0440\u0430\u0442\u043e\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043e\u043d\u0430 \u0441\u0432\u044f\u0436\u0435\u0442\u0441\u044f \u0441 \u0432\u0430\u043c\u0438 \u0432 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \ud83d\udcac",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        680,
        860
      ],
      "id": "7afe2ac4-ffb2-429b-8469-e83fcfd13c7c",
      "name": "Evolution API20",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "resource": "messages-api",
        "operation": "send-audio",
        "instanceName": "VEPPERS",
        "remoteJid": "={{ $('Webhook').item.json.body.data.key.remoteJid }}",
        "media": "https://drive.google.com/uc?export=download&id=1MVVGwWHZ9uQ8vXhr0RZm6lhSYqKl6Go8",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        -80,
        1040
      ],
      "id": "3b550e8d-28b9-4881-bc3b-adba75cd3dee",
      "name": "Evolution API21",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc",
          "mode": "list",
          "cachedResultName": "\u0414\u0438\u0430\u043b\u043e\u0433\u0438",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u0412\u043e\u0442\u0441\u0430\u043f",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WOCQBIfJEhzbwSSK1dOF26JMQBO0JAwpuLLVHWnIWUc/edit#gid=0"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "contact_id",
              "lookupValue": "={{    $json.contact_id    || $node[\"Webhook\"].json.body.data.key.remoteJid    || $node[\"Webhook\"].json.body.sender    || $node[\"Webhook\"].json.body.from  }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        -2940,
        340
      ],
      "id": "9202389d-dd09-4b56-a911-42837d790655",
      "name": "Google Sheets16",
      "alwaysOutputData": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "99235f3b-a0e7-4ec8-b75a-edfd607ee5f2",
              "leftValue": "={{\n  (\n    $items(\"Google Sheets16\")[0]?.json?.status\n    || $items(\"Google Sheets16\")[0]?.json?.Status\n    || ''\n  ).toString().trim().toLowerCase()\n}}",
              "rightValue": "stop",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -2740,
        340
      ],
      "id": "66d6fc9c-acfa-4da9-b0e8-834dc2ca77d0",
      "name": "If4"
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "GPT-4O-MINI"
        },
        "messages": {
          "values": [
            {
              "content": "=\u0422\u044b \u2014 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0440\u043e\u0443\u0442\u0435\u0440 WhatsApp-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u041f\u043e \u0432\u0445\u043e\u0434\u043d\u043e\u043c\u0443 \u0442\u0435\u043a\u0441\u0442\u0443 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044f \u043a\u0430\u043a \u00ab\u041a\u0443\u0440\u0430\u0442\u043e\u0440\u00bb (\u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f) \u0438\u043b\u0438 \u00ab\u041a\u043b\u0438\u0435\u043d\u0442\u00bb (\u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435).\n\n\u041a\u0420\u0418\u0422\u0415\u0420\u0418\u0418:\n- route=\"curator\" \u2014 \u0435\u0441\u043b\u0438 \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u0435\u0441\u0442\u044c \u044f\u0432\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u0442\u0432\u0435\u0442\u0447\u0438\u043a\u043e\u043c: \u0441\u0442\u0430\u0440\u0442/start \u0438\u043b\u0438 \u0441\u0442\u043e\u043f//stop (RU/EN, \u0440\u0435\u0433\u0438\u0441\u0442\u0440/\u043f\u0440\u043e\u0431\u0435\u043b\u044b/\u044d\u043c\u043e\u0434\u0437\u0438 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0439). \u0422\u0430\u043a\u0436\u0435 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u0432 \u043a\u0430\u043a\u043e\u043c-\u043b\u0438\u0431\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0435.\n- route=\"client\" \u2014 \u0432\u0441\u0451 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435: \u0432\u043e\u043f\u0440\u043e\u0441\u044b/\u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u0431\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (\u00ab\u043a\u043e\u0433\u0434\u0430 \u0441\u0442\u0430\u0440\u0442?\u00bb, \u00ab\u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 stop\u00bb), \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0438 \u043b\u044e\u0431\u043e\u0439 \u0438\u043d\u043e\u0439 \u0442\u0435\u043a\u0441\u0442.\n\n\u0422\u0420\u0415\u0411\u041e\u0412\u0410\u041d\u0418\u042f:\n- \u0412\u0435\u0440\u043d\u0438 \u0441\u0442\u0440\u043e\u0433\u043e \u041e\u0414\u041d\u0423 \u0441\u0442\u0440\u043e\u043a\u0443 JSON \u0431\u0435\u0437 \u043b\u0438\u0448\u043d\u0435\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430:\n{\"route\":\"curator\"} \u0438\u043b\u0438 {\"route\":\"client\"}\n- \u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u043b\u0435\u0439. \u0420\u0430\u0431\u043e\u0442\u0430\u0439 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e (temperature=0).\n",
              "role": "system"
            },
            {
              "content": "={{ \n  $json.body?.data?.message?.conversation\n  || $json.body?.data?.message?.extendedTextMessage?.text\n  || $json.body?.text\n  || $json.text           // \u0432\u0434\u0440\u0443\u0433 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043d\u0430\u0432\u0435\u0440\u0445\u0443\n  || ''\n}}"
            }
          ]
        },
        "options": {
          "temperature": 0.1
        }
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        -3400,
        100
      ],
      "id": "c3d1c3f1-81ef-4411-8998-2b16a296d767",
      "name": "OpenAI6",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ JSON.parse($json.message.content).route || 'client' }}",
                    "rightValue": "curator",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "id": "63d2e081-426e-4447-9d9d-9726533178ab"
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "3c8610eb-d26e-498e-9318-2037e36afea5",
                    "leftValue": "={{ JSON.parse($json.message.content).route || 'client' }}",
                    "rightValue": "client",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        -3040,
        100
      ],
      "id": "998fb72f-f23b-44e2-8207-ea256990b132",
      "name": "Switch5"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.output }}",
                    "rightValue": "{\"route\":\"funnel\"}",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "id": "63d2e081-426e-4447-9d9d-9726533178ab"
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "3c8610eb-d26e-498e-9318-2037e36afea5",
                    "leftValue": "={{ $json.output }}",
                    "rightValue": "{\"route\":\"detour\"}",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        -1680,
        -40
      ],
      "id": "3750cac0-ee1d-4d16-be27-45db1a24c5da",
      "name": "Switch6"
    },
    {
      "parameters": {
        "operation": "get",
        "documentURL": "https://docs.google.com/document/d/1q_-8reALZA8dOQdRsB7b4ZEGN7YbFo0uTYGnXlqMJdI/edit?tab=t.0#heading=h.mec6ff2thts"
      },
      "type": "n8n-nodes-base.googleDocsTool",
      "typeVersion": 2,
      "position": [
        -1740,
        420
      ],
      "id": "0fc322f8-6960-4995-8f98-cfe94d76b7b6",
      "name": "Google Docs",
      "credentials": {
        "googleDocsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-5",
          "mode": "list",
          "cachedResultName": "gpt-5"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        -2040,
        420
      ],
      "id": "a3782a95-dd74-4c5e-b059-333a03108328",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{\n  // 1) \u0442\u043e, \u0447\u0442\u043e \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c item\n  $json.contact_id\n  // 2) \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043d\u043e \u0432 Edit Fields1 (\u0431\u0435\u0440\u0451\u043c \u043f\u0435\u0440\u0432\u044b\u0439 item \u0442\u043e\u0433\u043e \u0443\u0437\u043b\u0430)\n  || $items(\"Edit Fields1\")[0]?.json?.contact_id\n  // 3) \u043f\u0440\u044f\u043c\u043e\u0439 \u0432\u0435\u0431\u0445\u0443\u043a Evolution\n  || $json.body?.data?.key?.remoteJid\n  || $json.body?.sender\n  || $json.body?.from\n  // 4) \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043d\u043e\u043c\u0435\u0440, \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c jid\n  || (()=>{\n        const phone = $json.phone || $items(\"Edit Fields1\")[0]?.json?.phone;\n        if (phone) return String(phone).replace(/\\D/g,'') + '@s.whatsapp.net';\n        return '';\n     })()\n  // 5) \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0444\u043e\u043b\u0431\u044d\u043a\n  || 'unknown@s.whatsapp.net'\n}}",
        "contextWindowLength": 50
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        -1940,
        420
      ],
      "id": "1a349958-40c1-458a-90d4-f93dd67f5825",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1aVsjAorVhubrACj_YNSLy3t-rQYfBwjL1IQ_aBKRpEI",
          "mode": "list",
          "cachedResultName": "\u0410\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1aVsjAorVhubrACj_YNSLy3t-rQYfBwjL1IQ_aBKRpEI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1aVsjAorVhubrACj_YNSLy3t-rQYfBwjL1IQ_aBKRpEI/edit#gid=0"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        -1840,
        420
      ],
      "id": "710236c7-14b9-4bd0-bf52-2900358d8c07",
      "name": "Google Sheets17",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $('If (AGGREGATED?)').item.json.text }}",
        "options": {
          "systemMessage": "\u0422\u044b \u2014 Business Assistant (\u043f\u0440\u043e\u0434\u0430\u0436\u043d\u0438\u043a) \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043e \u043f\u0438\u0442\u0430\u043d\u0438\u0438. \u0422\u044b \u0432\u0445\u043e\u0434\u0438\u0448\u044c \u0432 \u0440\u0430\u0431\u043e\u0442\u0443 \u0422\u041e\u041b\u042c\u041a\u041e \u043a\u043e\u0433\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442 \u043e\u0442\u043a\u043b\u043e\u043d\u0438\u043b\u0441\u044f \u043e\u0442 \u0432\u043e\u0440\u043e\u043d\u043a\u0438. \u0422\u0432\u043e\u044f \u0446\u0435\u043b\u044c: (1) \u0432\u0435\u0436\u043b\u0438\u0432\u043e \u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e \u0434\u0435\u043b\u0443; (2) \u043c\u044f\u0433\u043a\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439, \u0437\u0430\u0434\u0430\u0432 \u0440\u043e\u0432\u043d\u043e \u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0448\u0430\u0433\u0430.\n\n\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f (\u0447\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u00ab\u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043e\u043c \u0432 \u0432\u043e\u0440\u043e\u043d\u043a\u0443\u00bb \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0433\u0435):\n\u2022 \u0428\u0430\u0433 1 \u2014 \u0436\u0434\u0451\u043c \u043f\u043e \u0441\u0443\u0442\u0438: \u00ab\u0434\u0430/\u043d\u0435\u0442/\u043a\u0440\u0430\u0442\u043a\u043e \u043f\u0440\u043e \u043e\u043f\u044b\u0442 \u0441 \u043d\u0443\u0442\u0440\u0438\u0446\u0438\u043e\u043b\u043e\u0433\u043e\u043c\u00bb. \u041f\u043e\u0441\u043b\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 \u043f\u043e\u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438 \u0438 \u0437\u0430\u0434\u0430\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043d\u0443\u0436\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0448\u0430\u0433\u0430 2: \u00ab\u0421\u043a\u0430\u0436\u0438\u0442\u0435, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u0430\u0448 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0432\u0435\u0441 \u0438 \u0440\u043e\u0441\u0442?\u00bb.\n\u2022 \u0428\u0430\u0433 2 \u2014 \u041e\u0411\u042f\u0417\u0410\u0422\u0415\u041b\u042c\u041d\u041e \u043d\u0443\u0436\u043d\u044b \u0414\u0412\u0410 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f: \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0432\u0435\u0441 \u0418 \u0440\u043e\u0441\u0442. \u0415\u0441\u043b\u0438 \u0434\u0430\u043b\u0438 \u043e\u0434\u043d\u043e \u2014 \u043f\u043e\u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438 \u0438 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0438 \u0432\u0442\u043e\u0440\u043e\u0435. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0435 \u0446\u0438\u0444\u0440\u044b \u0435\u0441\u0442\u044c \u2014 \u043a\u0440\u0430\u0442\u043a\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0439 \u0438 \u043c\u043e\u0441\u0442\u0438\u043a\u043e\u043c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438 \u043a \u0448\u0430\u0433\u0443 3: \u00ab\u041f\u043e\u0434\u0441\u043a\u0430\u0436\u0438\u0442\u0435, \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043d\u0430\u0448\u0438\u043c\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430?\u00bb.\n\u2022 \u0428\u0430\u0433 3 \u2014 \u0436\u0434\u0451\u043c \u00ab\u0437\u043d\u0430\u043a\u043e\u043c/\u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u00bb. \u0415\u0441\u043b\u0438 \u00ab\u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u00bb \u2014 \u043a\u0440\u0430\u0442\u043a\u043e \u0430\u043d\u043e\u043d\u0441\u0438\u0440\u0443\u0439, \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u0438\u0448\u043b\u0451\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c, \u0438 \u0437\u0430\u0434\u0430\u0432\u0430\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438. \u0415\u0441\u043b\u0438 \u00ab\u0437\u043d\u0430\u043a\u043e\u043c\u00bb \u2014 \u043c\u044f\u0433\u043a\u043e \u0441\u043f\u0440\u043e\u0441\u0438, \u0433\u043e\u0442\u043e\u0432 \u043b\u0438 \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c/\u043d\u0443\u0436\u043d\u0430 \u043b\u0438 \u0441\u0441\u044b\u043b\u043a\u0430: \u00ab\u0413\u043e\u0442\u043e\u0432\u044b \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043e\u043f\u043b\u0430\u0442\u0435? \u041f\u0440\u0438\u0448\u043b\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443?\u00bb (\u044d\u0442\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043a \u0448\u0430\u0433\u0443 4).\n\u2022 \u0428\u0430\u0433 4 \u2014 \u0436\u0434\u0451\u043c \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u043a \u043e\u043f\u043b\u0430\u0442\u0435 (\u00ab\u0434\u0430\u0439\u0442\u0435 \u0441\u0441\u044b\u043b\u043a\u0443\u00bb, \u00ab\u043e\u043f\u043b\u0430\u0447\u0443\u00bb, \u00ab\u0433\u043e\u0442\u043e\u0432 \u043f\u043b\u0430\u0442\u0438\u0442\u044c\u00bb, \u00ab\u043a\u0430\u043a \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c\u00bb). \u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438 \u0438 \u043c\u043e\u0441\u0442\u0438\u043a\u043e\u043c \u0432\u0435\u0440\u043d\u0438 \u043a \u043e\u043f\u043b\u0430\u0442\u0435: \u00ab\u0421\u0443\u043f\u0435\u0440, \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u0438\u0448\u043b\u044e \u0441\u0441\u044b\u043b\u043a\u0443. \u041a\u043e\u0433\u0434\u0430 \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u0435 \u2014 \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.\u00bb\n\u2022 \u0428\u0430\u0433 5 \u2014 \u0435\u0441\u043b\u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u0438\u0448\u0435\u0442 \u00ab\u043e\u043f\u043b\u0430\u0442\u0438\u043b/\u043e\u043f\u043b\u0430\u0442\u0438\u043b\u0430\u00bb \u0411\u0415\u0417 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0430 \u2014 \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u0435\u0439\u0441: \u043f\u043e\u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438, \u0434\u0430\u0439 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u0443\u044e \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u044c \u0438 \u041f\u0420\u042f\u041c\u041e \u043f\u043e\u043f\u0440\u043e\u0441\u0438 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442 (\u00ab\u041f\u0440\u0438\u0448\u043b\u0438\u0442\u0435, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442 \u043e\u043f\u043b\u0430\u0442\u044b \u2014 \u043f\u0435\u0440\u0435\u0434\u0430\u043c \u043a\u0443\u0440\u0430\u0442\u043e\u0440\u0443\u00bb). \u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0434\u0451\u0442 \u0441\u043a\u0440\u0438\u043d \u2014 \u0434\u0430\u043b\u044c\u0448\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 (\u043a\u0443\u0440\u0430\u0442\u043e\u0440).\n\n\u0421\u0442\u0438\u043b\u044c:\n- \u0412\u0432\u043e\u0434\u043d\u044b\u0435 \u043a\u043b\u0438\u0448\u0435 (\u00ab\u041f\u043e\u043d\u0438\u043c\u0430\u044e\u00bb, \u00ab\u0421\u043c\u043e\u0442\u0440\u0438\u0442\u0435\u00bb \u0438 \u0442.\u043f.) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0443\u043c\u0435\u0441\u0442\u043d\u043e \u043f\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443; \u0435\u0441\u043b\u0438 \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u2014 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439.\n- \u041d\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043e\u0442\u0432\u0435\u0442\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00ab\u0434\u0430/\u043d\u0435\u0442\u00bb, \u00ab\u043a\u0440\u0430\u0442\u043a\u043e\u00bb \u0438 \u0442.\u043f.); \u0437\u0430\u0434\u0430\u0432\u0430\u0439 \u043e\u0434\u0438\u043d \u0447\u0451\u0442\u043a\u0438\u0439 \u0432\u043e\u043f\u0440\u043e\u0441.\n- \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0430\u0448\u0438\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 (\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u0439\u0441\u044f \u043d\u0430 \u043b\u0435\u043a\u0441\u0438\u043a\u0443, \u044d\u043c\u043e\u0434\u0437\u0438 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443):\n  \u2022 \u00ab\u042f \u043f\u043e\u043d\u044f\u043b\u0430 \u0412\u0430\u0441 \ud83d\ude4c \ud83d\ude09 \n     \u0421\u043a\u0430\u0436\u0438\u0442\u0435 \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0432\u0435\u0441 , \u0440\u043e\u0441\u0442,  \u0445\u0440\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u0431\u043e\u043b\u0435\u0432\u0430\u043d\u0438\u044f \u0438 \u043a\u0430\u043a\u043e\u0439 \u0432\u0435\u0441 \u0445\u043e\u0442\u0438\u0442\u0435 ?\ud83d\udc90\u00bb  :contentReference[oaicite:0]{index=0}\n  \u2022 \u00ab\u041f\u0430\u0440\u0430 \u0441\u043b\u043e\u0432 \u043e\u0431\u043e \u043c\u043d\u0435 \ud83e\ude77  \n\n     \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043d\u0430\u0441\u0442\u0430\u0441\u0438\u044f \u0412\u0435\u043f\u0435\u0440\u0441, \u044f \u0434\u0438\u043f\u043b\u043e\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0443\u0442\u0440\u0438\u0446\u0438\u043e\u043b\u043e\u0433, \u043f\u0441\u0438\u0445\u043e\u043b\u043e\u0433, \u043a\u043e\u0443\u0447 ICF, \u043f\u0441\u0438\u0445\u043e\u0441\u0430\u043c\u043e\u0442\u043e\u043b\u043e\u0433, \u0432 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043d\u0430\u0445\u043e\u0436\u0443\u0441\u044c 8 \u043b\u0435\u0442  \n\n     \u261d\ufe0f\ud83d\udcaf\u0421\u043e \u043c\u043d\u043e\u0439 \u043f\u043e\u0445\u0443\u0434\u0435\u043b\u043e \u0431\u043e\u043b\u0435\u0435 3800 \u0447\u0435\u043b\u043e\u0432\u0435\u043a. \u2026  \n     \ud83d\udc49\u0412\u044b\u0434\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u043d\u044e.  \n     \ud83d\udcc3\u0415\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u0430\u044f(!) \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c \u043f\u043e \u0432\u0441\u0435\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c. \u2026  \n     \ud83c\udf89\u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0432 \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0435\u0434\u0430.  \n\n     \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\ud83c\udf1f\u041f\u043e\u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437 \u0438 \u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430 \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0441 \u043b\u0438\u0448\u043d\u0438\u043c \u0432\u0435\u0441\u043e\u043c\u2026\u00bb \n\n\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:\n1) \u041d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u044b\u0434\u0443\u043c\u044b\u0432\u0430\u0439: \u043e\u043f\u0438\u0440\u0430\u0439\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 Google Sheets/Docs (\u0446\u0435\u043d\u044b, \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u0441\u0441\u044b\u043b\u043a\u0438). \u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u2014 \u0432\u0435\u0436\u043b\u0438\u0432\u043e \u0443\u0442\u043e\u0447\u043d\u0438 \u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0435\u0435.\n2) \u0421\u0442\u0438\u043b\u044c: \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e, \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e, \u0434\u0440\u0443\u0436\u0435\u043b\u044e\u0431\u043d\u043e; \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0435 \u0430\u0431\u0437\u0430\u0446\u044b \u0431\u0435\u0437 \u0432\u043e\u0434\u044b; \u0432\u0435\u0436\u043b\u0438\u0432\u044b\u0435 \u0441\u0432\u044f\u0437\u043a\u0438 (\u00ab\u041f\u043e\u043d\u0438\u043c\u0430\u044e\u00bb, \u00ab\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044e\u00bb, \u00ab\u0412\u0435\u0440\u043d\u043e\u00bb); \u0447\u0451\u0442\u043a\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b.\n3) \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430:\n   \u2014 \u041a\u043e\u0440\u043e\u0442\u043a\u043e \u043e\u0442\u0432\u0435\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043f\u043e \u0434\u0435\u043b\u0443 (1\u20132 \u0430\u0431\u0437\u0430\u0446\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c).\n   \u2014 \u0417\u0430\u0432\u0435\u0440\u0448\u0438 \u00ab\u043c\u043e\u0441\u0442\u0438\u043a\u043e\u043c\u00bb \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044e \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0448\u0430\u0433\u0430 (\u0441\u043c. \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044e \u0432\u044b\u0448\u0435): \u043e\u0434\u0438\u043d \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0438\u043b\u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0448\u0430\u0433\u0430.\n4) \u041d\u0435 \u043c\u0435\u043d\u044f\u0439 \u0448\u0430\u0433 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u043d\u0435 \u0434\u0430\u0432\u0430\u0439 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434. \u0422\u0432\u043e\u0451 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043a\u0441\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u00ab\u043c\u043e\u0441\u0442\u0438\u043a\u00bb.\n5) \u0424\u043e\u0440\u043c\u0430\u0442 \u0432\u044b\u0432\u043e\u0434\u0430: \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 (\u0431\u0435\u0437 JSON, \u0431\u0435\u0437 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u0438 \u0441\u043f\u0438\u0441\u043a\u043e\u0432).\n\n\u041e\u0441\u043e\u0431\u044b\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438:\n\u2022 \u041d\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 \u043f\u043e \u0441\u0443\u0442\u0438 \u2192 \u043c\u044f\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u0443\u0439 \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438 \u043d\u0443\u0436\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0448\u0430\u0433\u0430.\n\u2022 \u0427\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u2192 \u043f\u043e\u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438 \u0437\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0438 \u0440\u043e\u0432\u043d\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0443\u044e \u0447\u0430\u0441\u0442\u044c.\n\u2022 \u0412\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u043e \u043e\u043f\u043b\u0430\u0442\u0443 \u0434\u043e \u0448\u0430\u0433\u0430 4 \u2192 \u043a\u0440\u0430\u0442\u043a\u043e \u043f\u0440\u043e\u044f\u0441\u043d\u0438 \u0438 \u0432\u0435\u0440\u043d\u0438 \u043a \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0448\u0430\u0433\u0430.\n\u2022 \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u00ab\u043e\u043f\u043b\u0430\u0442\u0438\u043b\u00bb \u0431\u0435\u0437 \u0441\u043a\u0440\u0438\u043d\u0430 \u043d\u0430 \u0448\u0430\u0433\u0435 5 \u2192 \u043f\u043e\u0445\u0432\u0430\u043b\u0438, \u043f\u043e\u043f\u0440\u043e\u0441\u0438 \u0441\u043a\u0440\u0438\u043d. \u0421\u043e \u0441\u043a\u0440\u0438\u043d\u043e\u043c \u2014 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u043a\u0443\u0440\u0430\u0442\u043e\u0440\u0443.\n\n\u0414\u0430\u043d\u043d\u044b\u0435 \u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438:\n- \u041d\u0430 \u043b\u044e\u0431\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043e\u043f\u0438\u0440\u0430\u0439\u0441\u044f \u0422\u041e\u041b\u042c\u041a\u041e \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 Google Sheets \u0438 Google Docs (\u0446\u0435\u043d\u044b, \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u0441\u0441\u044b\u043b\u043a\u0438, \u0440\u0435\u0433\u043b\u0430\u043c\u0435\u043d\u0442\u044b).\n- \u041d\u0435 \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438 \u043d\u0435 \u0434\u0435\u043b\u0430\u0439 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0439.\n\n\u0410\u043d\u0442\u0438\u043f\u043e\u0432\u0442\u043e\u0440\u044b \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043e\u043a:\n- \u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u0436\u0435 \u0432\u043e\u043f\u0440\u043e\u0441 \u0443\u0436\u0435 \u0437\u0432\u0443\u0447\u0430\u043b \u0432 \u0434\u0438\u0430\u043b\u043e\u0433\u0435, \u043d\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0439 \u0435\u0433\u043e \u0434\u043e\u0441\u043b\u043e\u0432\u043d\u043e: \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0439 \u0441\u043c\u044b\u0441\u043b, \u043c\u0435\u043d\u044f\u0439 \u0432\u0432\u043e\u0434\u043d\u0443\u044e/\u0433\u043b\u0430\u0433\u043e\u043b \u0438 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u043b\u043e\u0432.\n- \u0418\u0437\u0431\u0435\u0433\u0430\u0439 \u00ab\u0441\u043f\u0438\u0441\u043a\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432\u00bb \u0438 \u043f\u043e\u0434\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a; \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u0443\u0439 \u043e\u0434\u0438\u043d \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439, \u0447\u0451\u0442\u043a\u0438\u0439 \u0432\u043e\u043f\u0440\u043e\u0441.\n- \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0439 \u0442\u043e\u043d \u0438 \u043b\u0435\u043a\u0441\u0438\u043a\u0443 \u043d\u0430\u0448\u0438\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432, \u043d\u043e \u0438\u0437\u0431\u0435\u0433\u0430\u0439 \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u044b \u0444\u0440\u0430\u0437\u044b-\u0432-\u0444\u0440\u0430\u0437\u0443 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0438."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        -2000,
        280
      ],
      "id": "3ba011cd-c164-4497-b986-8b9fa38b93e2",
      "name": "\u0411\u0418\u0417\u041d\u0415\u0421 \u0410\u0421\u0421\u0418\u0421\u0422\u0415\u041d\u0422"
    },
    {
      "parameters": {
        "resource": "messages-api",
        "instanceName": "={{ $node[\"Webhook\"].json.body.instance || 'VEPPERS' }}",
        "remoteJid": "={{ $('Edit Fields1').item.json.contact_id }}",
        "messageText": "={{ $('\u0411\u0418\u0417\u041d\u0415\u0421 \u0410\u0421\u0421\u0418\u0421\u0422\u0415\u041d\u0422').item.json.output }}",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        -1440,
        280
      ],
      "id": "ec8e7c30-c2a8-4d8f-8cc8-f9bffb4ec82d",
      "name": "Evolution API19",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://evolution-api-production-9e6a.up.railway.app/chat/sendPresence/VEPPERS",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "apikey",
              "value": "sdvsdgs37e4jgfvuh2g24rsdfsf"
            },
            {
              "name": "content-type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ ({\n  number: String(\n    $('Edit Fields1').item.json.contact_id\n    || $json.contact_id\n    || $json.number\n    || $json.remoteJid\n    || $json.body?.data?.key?.remoteJid\n    || $json.body?.data?.key?.participant\n    || $json.body?.sender\n    || $json.from\n    || ''\n  ).split('@')[0].replace(/\\D/g,''),\n  presence: $json.presence || 'composing',   // 'composing' | 'recording'\n  delay: $json.PresenceComposingDelay ?? $json.typingDelayMs ?? 20000\n}) }}",
        "options": {}
      },
      "id": "283d7652-1af7-4cdb-8985-f54026201a6c",
      "name": "HTTP Request (Typing On)9",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        -1620,
        280
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notes": "\u0418\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u043d\u0430\u0431\u043e\u0440\u0430 (typing). \u0422\u0440\u0435\u0431\u0443\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c item \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0435 remoteJid, \u0438\u043d\u0430\u0447\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0443\u0442\u044c \u043a JID \u0438\u0437 \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431\u0445\u0443\u043a\u0430."
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {
          "temperature": 0.2
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        -2020,
        100
      ],
      "id": "483b4937-a64d-469a-8d00-7721bc783174",
      "name": "OpenAI Chat Model2",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{\n  // 1) \u0442\u043e, \u0447\u0442\u043e \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c item\n  $json.contact_id\n  // 2) \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043d\u043e \u0432 Edit Fields1 (\u0431\u0435\u0440\u0451\u043c \u043f\u0435\u0440\u0432\u044b\u0439 item \u0442\u043e\u0433\u043e \u0443\u0437\u043b\u0430)\n  || $items(\"Edit Fields1\")[0]?.json?.contact_id\n  // 3) \u043f\u0440\u044f\u043c\u043e\u0439 \u0432\u0435\u0431\u0445\u0443\u043a Evolution\n  || $json.body?.data?.key?.remoteJid\n  || $json.body?.sender\n  || $json.body?.from\n  // 4) \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043d\u043e\u043c\u0435\u0440, \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c jid\n  || (()=>{\n        const phone = $json.phone || $items(\"Edit Fields1\")[0]?.json?.phone;\n        if (phone) return String(phone).replace(/\\D/g,'') + '@s.whatsapp.net';\n        return '';\n     })()\n  // 5) \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0444\u043e\u043b\u0431\u044d\u043a\n  || 'unknown@s.whatsapp.net'\n}}",
        "contextWindowLength": 50
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        -1920,
        100
      ],
      "id": "35e81c04-3599-46e6-9735-19eb9849619b",
      "name": "Simple Memory1"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=user_message: {{ \n  $json.text\n  || $json.body?.text\n  || $json.body?.data?.message?.conversation\n  || $json.body?.data?.message?.extendedTextMessage?.text\n  || $json.body?.message?.conversation\n  || $node[\"Transcribe\"]?.json?.text\n  || ''\n}}",
        "options": {
          "systemMessage": "=\u0422\u044b \u2014 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u201cfunnel vs detour\u201d.\n\u0412\u0435\u0440\u043d\u0438 \u0421\u0422\u0420\u041e\u0413\u041e \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 JSON \u0431\u0435\u0437 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439: {\"route\":\"funnel\"} \u0438\u043b\u0438 {\"route\":\"detour\"}.\n\n\u0428\u0430\u0433 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0439 \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u0438\u0430\u043b\u043e\u0433\u0430 (SimpleMemory): \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u0439\u0441\u044f \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u044f\u0432\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0431\u043e\u0442\u0430. \n\u0415\u0441\u043b\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0435\u0442 \u2014 \u0441\u0447\u0438\u0442\u0430\u0439, \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0448\u0430\u0433 0 route=\"funnel\".\n\n\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438:\n\u2022 \u0415\u0441\u043b\u0438 \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0432\u0445\u043e\u0434\u0435 \u0435\u0441\u0442\u044c \u0432\u0435\u0436\u043b\u0438\u0432\u043e\u0435/\u043d\u0435\u0439\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0435\u0441\u0442\u044c \u0427\u0401\u0422\u041a\u0418\u0419 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0431\u043e\u0442\u0430 \u2014 \u0441\u0447\u0438\u0442\u0430\u0442\u044c route=\"funnel\".\n\u2022 \u0415\u0441\u043b\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u0432\u0445\u043e\u0434\u0435 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u0438\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u2014 \u043e\u0446\u0435\u043d\u0438 \u0438\u0445 \u0432\u043c\u0435\u0441\u0442\u0435; \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0443 \u041f\u041e\u0421\u041b\u0415\u0414\u041d\u0415\u0413\u041e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e. \u0415\u0441\u043b\u0438 \u043e\u043d \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0431\u043e\u0442\u0430 \u2014 \u044d\u0442\u043e route=\"funnel\".\n\u2022 \u0418\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0439 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f/\u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u043e\u0441\u0442\u0438 (\u00ab\u043f\u0440\u0438\u0432\u0435\u0442\u00bb, \u00ab\u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u044f\u0442\u043d\u043e\u00bb, \u00ab\u0441\u043f\u0430\u0441\u0438\u0431\u043e\u00bb \u0438 \u0442. \u043f.), \u0435\u0441\u043b\u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0438\u043c\u0438 \u0435\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u043f\u043e \u0441\u0443\u0442\u0438.\n\u2022 \u0415\u0441\u043b\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435/\u043e\u0442\u0432\u0435\u0442 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 (\u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0448\u0430\u0433\u0430) \u2014 \u044d\u0442\u043e route=\"funnel\", \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u0442\u0432\u0435\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0439 \u0438\u043b\u0438 \u044d\u043c\u043e\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439.\n\u2022 \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0439 route=\"detour\" \u0422\u041e\u041b\u042c\u041a\u041e \u043a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043f\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d: \u043d\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 \u043f\u043e \u0441\u0443\u0442\u0438, \u043e\u0444\u0444\u0442\u043e\u043f, \u044f\u0432\u043d\u044b\u0439 \u043e\u0442\u043a\u0430\u0437/\u043e\u0442\u043b\u043e\u0436\u0438\u0442\u044c, \u043d\u0435\u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u0430.\n\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u043e \u0448\u0430\u0433\u0430\u043c:\n0) \u0421\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 (\u00ab\u043f\u0440\u0438\u0432\u0435\u0442\u00bb, \u00ab\u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435\u00bb).\n   \u2022 \u0415\u0441\u043b\u0438 \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0442\u043e \u044d\u0442\u043e \u2192 route=\"funnel\"\n   \u2022 \u0435\u0441\u043b\u0438 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0435\u0441\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0431\u043e\u0442\u0430 \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u043e \u0441\u0443\u0442\u0438 \u043d\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0430 \u043d\u0435\u0433\u043e \u2192 detour (\u043f\u0440\u043e\u0434\u0430\u0436\u043d\u0438\u043a \u043e\u0442\u0432\u0435\u0442\u0438\u0442 \u0438 \u0432\u0435\u0440\u043d\u0451\u0442 \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u0443);\n\n1) \u0416\u0434\u0451\u043c: \u201c\u0434\u0430/\u043d\u0435\u0442/\u043a\u0440\u0430\u0442\u043a\u043e \u043f\u0440\u043e \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0443\u0442\u0440\u0438\u0446\u0438\u043e\u043b\u043e\u0433\u043e\u043c\u201d.\n     \u2022 \u043b\u044e\u0431\u043e\u0439 \u043f\u043e \u0441\u0443\u0442\u0438 \u043e\u0442\u0432\u0435\u0442 \u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0438/\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438/\u043a\u0440\u0430\u0442\u043a\u043e\u043c \u043e\u043f\u044b\u0442\u0435 (\u0432 \u0442.\u0447. \u0432 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u0435 \u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0432\u0435\u0436\u043b\u0438\u0432\u043e\u0441\u0442\u044f\u043c\u0438) \u2192 route=\"funnel\"; \u0438\u043d\u0430\u0447\u0435 \u2192 detour.\n\n2) \u0416\u0434\u0451\u043c \u041e\u0411\u042f\u0417\u0410\u0422\u0415\u041b\u042c\u041d\u041e \u0414\u0412\u0415 \u0421\u0423\u0429\u041d\u041e\u0421\u0422\u0418: \u0438 \u0412\u0415\u0421, \u0438 \u0420\u041e\u0421\u0422 (\u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f).\n   \u2022 \u0435\u0441\u0442\u044c \u0438 \u0432\u0435\u0441, \u0438 \u0440\u043e\u0441\u0442 (\u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e: \u0445\u0440\u043e\u043d\u0438\u043a\u0430, \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0432\u0435\u0441) \u2192 funnel;\n   \u2022 \u043d\u0435\u0442 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043f\u0430\u0440\u044b \u0432\u0435\u0441+\u0440\u043e\u0441\u0442 \u2192 detour.\n\n3) \u0416\u0434\u0451\u043c: \u201c\u0437\u043d\u0430\u043a\u043e\u043c/\u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u201d.\n   \u2022 \u043f\u043e \u0441\u0443\u0442\u0438 \u043e\u0442\u0432\u0435\u0442 \u2192 funnel; \u0438\u043d\u0430\u0447\u0435 \u2192 detour.\n\n4) \u0416\u0434\u0451\u043c \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u043a \u043e\u043f\u043b\u0430\u0442\u0435: \u201c\u0434\u0430\u0439\u0442\u0435 \u0441\u0441\u044b\u043b\u043a\u0443 / \u043e\u043f\u043b\u0430\u0447\u0443 / \u0433\u043e\u0442\u043e\u0432 \u043f\u043b\u0430\u0442\u0438\u0442\u044c / \u043a\u0430\u043a \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c\u201d.\n   \u2022 \u0435\u0441\u0442\u044c \u044f\u0432\u043d\u043e\u0435 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u2192 funnel; \u0438\u043d\u0430\u0447\u0435 \u2192 detour. \u0422\u0430\u043a\u0436\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u043e\u043d \u043f\u043b\u0430\u0442\u0438\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u043b\u0438 \u0432 \u0440\u0430\u0441\u0441\u0440\u043e\u0447\u043a\u0443, \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u2192 funnel\n\n5) \u0415\u0441\u043b\u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u0438\u0448\u0435\u0442 \u201c\u043e\u043f\u043b\u0430\u0442\u0438\u043b/\u043e\u043f\u043b\u0430\u0442\u0438\u043b\u0430/\u044f \u043e\u043f\u043b\u0430\u0442\u0438\u043b\u201d \u2014 \u044d\u0442\u043e detour (\u043e\u0442\u0432\u0435\u0442\u044c \u043f\u043e\u0442\u043e\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0441\u043a\u0438\u043c \u0442\u043e\u043d\u043e\u043c \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0438 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442).\n   \u2022 \u041b\u044e\u0431\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u043f\u043b\u0430\u0442\u0435 \u0431\u0435\u0437 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0430 \u2192 detour.\n\n\u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a \u043e\u043f\u043b\u0430\u0442\u0435 \u0438\u0437\u0431\u0435\u0433\u0430\u0439 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \"\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443?\".\n\u0412\u0441\u0435\u0433\u0434\u0430 \u0443\u0442\u043e\u0447\u043d\u044f\u0439 \u0441\u043f\u043e\u0441\u043e\u0431: \"\u041a\u0430\u043a \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u2014 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u043b\u0438 \u0432 \u0440\u0430\u0441\u0441\u0440\u043e\u0447\u043a\u0443?\"\n\u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440:\n\u041a\u0430\u043a \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u2014 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u043b\u0438 \u0432 \u0440\u0430\u0441\u0441\u0440\u043e\u0447\u043a\u0443?\n\n\u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u043b\u0435\u0439. \u0418\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440, \u044d\u043c\u043e\u0434\u0437\u0438 \u0438 \u043b\u0438\u0448\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u044b.\n\n\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0440\u0438 \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0439 route=\"funnel\", \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0448\u0430\u0433\u0430"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        -2020,
        -40
      ],
      "id": "0fc6e9d8-aa2b-4ba2-b180-6dd5241a4354",
      "name": "FunnelRouter"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "9f5174ec-cd4f-4c51-b757-9aec34214909",
              "name": "contact_id",
              "value": "={{ \n  $json.contact_id\n  || ($items('If4')[0] && $items('If4')[0].json && $items('If4')[0].json.contact_id)\n  || ($json.body && $json.body.data && $json.body.data.key && $json.body.data.key.remoteJid)\n  || ($json.body && $json.body.sender)\n  || ($json.body && $json.body.from)\n  || ($items('Webhook')[0] && $items('Webhook')[0].json && $items('Webhook')[0].json.body && $items('Webhook')[0].json.body.data && $items('Webhook')[0].json.body.data.key && $items('Webhook')[0].json.body.data.key.remoteJid)\n  || ($items('Webhook')[0] && $items('Webhook')[0].json && $items('Webhook')[0].json.body && $items('Webhook')[0].json.body.sender)\n  || ''\n}}",
              "type": "string"
            },
            {
              "id": "3c2ac651-3698-46a2-95af-c89165d8828f",
              "name": "name",
              "value": "={{ \n  // 1) \u0443\u0436\u0435 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0435 \u0438\u043c\u044f (\u0435\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u043b \u0440\u0430\u043d\u044c\u0448\u0435)\n  $json.name\n  // 2) \u043f\u0440\u044f\u043c\u043e\u0439 \u0432\u0435\u0431\u0445\u0443\u043a\n  || $json.body?.name\n  || $json.body?.data?.pushName\n  || $json.body?.pushName\n  // 3) \u0440\u0435\u0434\u043a\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b\n  || $json.pushName\n  || $json.body?.senderName\n  // 4) \u0444\u043e\u043b\u0431\u044d\u043a \u0438\u0437 Edit Fields1 (\u0435\u0441\u043b\u0438 \u0442\u044b \u0442\u0430\u043c \u0443\u0436\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0448\u044c \u0438\u043c\u044f)\n  || $items('Edit Fields1')[0]?.json?.name\n  // 5) \u043f\u0443\u0441\u0442\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430\n  || ''\n}}",
              "type": "string"
            },
            {
              "id": "336b5154-ec14-431d-b542-043c4c6e1307",
              "name": "text",
              "value": "={{ $('Webhook').item.json.body.data.message.conversation }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -2940,
        700
      ],
      "id": "54975f7c-3ab5-4602-aa53-e3c93cd4cedf",
      "name": "Set CoreFields"
    },
    {
      "parameters": {
        "resource": "messages-api",
        "instanceName": "={{ $node[\"Webhook\"].json.body.instance || 'VEPPERS' }}",
        "remoteJid": "={{ $('Webhook').item.json.body.data.key.remoteJid }}",
        "messageText": "\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435! \ud83e\udd17 \u0412\u0438\u0436\u0443, \u0447\u0442\u043e \u0432\u044b \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043b\u0438\u0441\u044c \u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435. \u041c\u044b \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0434\u044b, \u0447\u0442\u043e \u0432\u044b \u0440\u0435\u0448\u0438\u043b\u0438\u0441\u044c \u043d\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0441\u0432\u043e\u0435\u0439 \u0436\u0438\u0437\u043d\u0438 \u2764\ufe0f  \n\n\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u0432\u0430\u0441 \u0432 \u043c\u043e\u0439 Telegram-\u0431\u043e\u0442 \ud83e\udd16 \u2014 \u0442\u0430\u043c \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0434\u0435\u0432\u043e\u0447\u043a\u0430\u043c: \n\u2705 \u043c\u043e\u044f \u0421\u0422\u0410\u0422\u042c\u042f \u00ab5 \u0448\u0430\u0433\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0445\u0443\u0434\u0435\u0442\u044c \u0431\u0435\u0437 \u0441\u0440\u044b\u0432\u043e\u0432\u00bb \n\u2705 \u0442\u0435\u0441\u0442 \u00ab\u0412\u0430\u0448\u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u044b \u043f\u0435\u0440\u0435\u0435\u0434\u0430\u043d\u0438\u044f\u00bb \n\u2705 \u0433\u0430\u0439\u0434 \u043f\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\u043c \u0434\u043b\u044f \u0441\u0442\u0440\u043e\u0439\u043d\u043e\u0441\u0442\u0438 \u0438 \u044d\u043d\u0435\u0440\u0433\u0438\u0438  \n\n\ud83d\udcf2 \u0417\u0430\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u2014 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0431\u043e\u0442 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 https://t.me/VepersAnastasia_bot",
        "options_message": {}
      },
      "type": "n8n-nodes-evolution-api-eng.evolutionApi",
      "typeVersion": 1,
      "position": [
        60,
        1040
      ],
      "id": "06f9f361-b3cf-460b-81a0-ab6bfbb37907",
      "name": "Evolution API22",
      "credentials": {
        "evolutionApi": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    }
  ],
  "settings": {
    "executionOrder": "v1",
    "saveDataErrorExecution": "all",
    "callerPolicy": "workflowsFromSameOwner"
  },
  "staticData": null,
  "tags": [],
  "triggerCount": 1,
  "updatedAt": "2025-10-15T14:44:30.000Z",
  "versionId": "5b20dee4-6854-4794-a247-a14164978d12"
}