AutomationFlowsAI & RAG › Vep Wapp

Vep Wapp

VEP WAPP. Uses openAi, lmChatOpenAi, toolCalculator, agent. Webhook trigger; 100 nodes.

Webhook trigger★★★★★ complexityAI-powered100 nodesOpenAIOpenAI ChatTool CalculatorAgentHTTP RequestN8N Nodes Evolution Api EngGoogle SheetsMemory Buffer Window
AI & RAG Trigger: Webhook Nodes: 100 Complexity: ★★★★★ AI nodes: yes Added:

This workflow follows the Agent → Googledocstool recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "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

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

VEP WAPP. Uses openAi, lmChatOpenAi, toolCalculator, agent. Webhook trigger; 100 nodes.

Source: https://github.com/bfirrst/n8nbackup/blob/91b4e4c4c718d4009e49b8eb3322fc3ab13dbad0/workflows/ABuCeLJ89s54yUKS.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Aura-bot. Uses postgres, lmChatOpenAi, memoryBufferWindow, httpRequest. Webhook trigger; 82 nodes.

Postgres, OpenAI Chat, Memory Buffer Window +6
AI & RAG

Flux. Uses lmChatOpenAi, agent, googleGemini, httpRequest. Webhook trigger; 67 nodes.

OpenAI Chat, Agent, Google Gemini +8
AI & RAG

🧠 Gwen – The AI Voice Marketing Agent Gwen is your intelligent voice-powered marketing assistant built in n8n. She combines the power of OpenAI, ElevenLabs, and automation workflows to handle content

Tool Workflow, Memory Buffer Window, Agent +10
AI & RAG

This suite automates distinct aspects of real estate operations: incoming web lead qualification, scheduled/manual data research and content generation, and automated voice call outreach with lead qua

Agent, HTTP Request, OpenAI Chat +6
AI & RAG

This workflow transforms WhatsApp into a powerful personal AI using n8n + Green-API. Send text or voice messages — the assistant understands intent and handles daily tasks automatically. 💰 Expense & i

Tool Calculator, Google Sheets Tool, OpenAI Chat +10