AutomationFlowsAI & RAG › Agent Lead Mail Generate

Agent Lead Mail Generate

Agent lead mail generate. Uses executeWorkflowTrigger, agent, lmChatOpenRouter, googleSheets. Event-driven trigger; 13 nodes.

Event trigger★★★★☆ complexityAI-powered13 nodesExecute Workflow TriggerAgentOpenRouter ChatGoogle Sheets
AI & RAG Trigger: Event Nodes: 13 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the Agent → Execute Workflow Trigger 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
{
  "name": "Agent lead mail generate",
  "nodes": [
    {
      "parameters": {
        "inputSource": "passthrough"
      },
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1.1,
      "position": [
        -180,
        -40
      ],
      "id": "68ec410d-08fc-47d8-baac-f92d89f5a7b2",
      "name": "When Executed by Another Workflow"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f: {{ $json[\"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\"] }}\n\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438: {{ $json[\"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438\"] }}\n\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0435\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438: {{ $json[\"\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438\"] }}\n\u0420\u0430\u0431\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438: {{ $json[\"\u0420\u0430\u0431\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438\"] }}",
        "options": {
          "systemMessage": "=\u0422\u042b \u2014 \u042d\u041a\u0421\u041f\u0415\u0420\u0422 \u041f\u041e \u041f\u0420\u041e\u0414\u0410\u0416\u0410\u041c \u0418 \u041a\u041e\u041c\u041c\u0415\u0420\u0427\u0415\u0421\u041a\u0418\u041c \u041f\u0420\u0415\u0414\u041b\u041e\u0416\u0415\u041d\u0418\u042f\u041c, \u041e\u0411\u041b\u0410\u0414\u0410\u042e\u0429\u0418\u0419 \u0413\u041b\u0423\u0411\u041e\u041a\u0418\u041c\u0418 \u0417\u041d\u0410\u041d\u0418\u042f\u041c\u0418 \u0412 \u041e\u0411\u041b\u0410\u0421\u0422\u0418 \u0418\u041d\u0422\u0415\u0413\u0420\u0410\u0426\u0418\u0418 \u0418\u0418 \u0412 \u0411\u0418\u0417\u041d\u0415\u0421-\u041f\u0420\u041e\u0426\u0415\u0421\u0421\u042b. \u0422\u0412\u041e\u042f \u0417\u0410\u0414\u0410\u0427\u0410 \u2014 \u0421\u041e\u0421\u0422\u0410\u0412\u0418\u0422\u042c \u0427\u0415\u0420\u041d\u041e\u0412\u0418\u041a \u041f\u0418\u0421\u042c\u041c\u0410 \u0414\u041b\u042f \u041a\u041e\u041c\u041c\u0415\u0420\u0427\u0415\u0421\u041a\u041e\u0413\u041e \u041f\u0420\u0415\u0414\u041b\u041e\u0416\u0415\u041d\u0418\u042f \u0412 HTML-\u0424\u041e\u0420\u041c\u0410\u0422\u0415, \u041a\u041e\u0422\u041e\u0420\u041e\u0415:\n\n\u041f\u0420\u0415\u0414\u0421\u0422\u0410\u0412\u0418\u0422 \u0423\u0421\u041b\u0423\u0413\u0418 \u041a\u041e\u041c\u041f\u0410\u041d\u0418\u0418 \u0412 \u041d\u0415\u0424\u041e\u0420\u041c\u0410\u041b\u042c\u041d\u041e\u0419, \u0414\u0420\u0423\u0416\u0415\u0421\u041a\u041e\u0419 \u041c\u0410\u041d\u0415\u0420\u0415.\n\n\u041d\u0415 \u0411\u0423\u0414\u0415\u0422 \u0421\u041e\u0414\u0415\u0420\u0416\u0410\u0422\u042c \u0426\u0415\u041d, \u0410 \u0421\u041a\u041e\u041d\u0426\u0415\u041d\u0422\u0420\u0418\u0420\u0423\u0415\u0422\u0421\u042f \u041d\u0410 \u0426\u0415\u041d\u041d\u041e\u0421\u0422\u0418 \u0414\u041b\u042f \u041a\u041b\u0418\u0415\u041d\u0422\u0410.\n\n\u0411\u0423\u0414\u0415\u0422 \u0421\u0422\u0420\u0423\u041a\u0422\u0423\u0420\u0418\u0420\u041e\u0412\u0410\u041d\u041e \u0422\u0410\u041a, \u0427\u0422\u041e\u0411\u042b \u041b\u0415\u0413\u041a\u041e \u0427\u0418\u0422\u0410\u041b\u041e\u0421\u042c \u0418 \u0412\u042b\u0417\u042b\u0412\u0410\u041b\u041e \u0416\u0415\u041b\u0410\u041d\u0418\u0415 \u041f\u0420\u041e\u0414\u041e\u041b\u0416\u0418\u0422\u042c \u0414\u0418\u0410\u041b\u041e\u0413.\n\n\u041d\u0415\u041d\u0410\u0412\u042f\u0417\u0427\u0418\u0412\u041e \u041f\u0420\u0418\u0412\u0415\u0414\u0415\u0422 \u041a\u041b\u0418\u0415\u041d\u0422\u0410 \u041a \u0412\u0421\u0422\u0420\u0415\u0427\u0415, \u0413\u0414\u0415 \u041c\u042b \u041c\u041e\u0416\u0415\u041c \u0414\u0415\u0422\u0410\u041b\u042c\u041d\u041e \u041e\u0411\u0421\u0423\u0414\u0418\u0422\u042c \u0420\u0415\u0428\u0415\u041d\u0418\u042f.\n\n\u041e\u0420\u0418\u0415\u041d\u0422\u0418\u0420\u0423\u0415\u0422\u0421\u042f \u041d\u0410 \u041f\u0415\u0420\u0415\u0427\u0415\u041d\u042c \u0423\u0421\u041b\u0423\u0413, \u0410 \u0422\u0410\u041a\u0416\u0415 \u0423\u0427\u0418\u0422\u042b\u0412\u0410\u0415\u0422 \u041f\u0420\u0418\u0428\u0415\u0414\u0428\u0415\u0415 \u041f\u0420\u0415\u0414\u041b\u041e\u0416\u0415\u041d\u0418\u0415 \u041f\u041e \u0410\u0412\u0422\u041e\u041c\u0410\u0422\u0418\u0417\u0410\u0426\u0418\u0418 \u0418 \u0415\u0413\u041e \u0410\u041d\u0410\u041b\u0418\u0417.\n\n\u041e\u0421\u041d\u041e\u0412\u041d\u042b\u0415 \u0423\u0421\u041b\u0423\u0413\u0418\n\n\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0418\u0418-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043e\u0432 \u0432 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b (\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0443\u0442\u0438\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0418\u0418, \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 CRM, ERP, \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440\u0430\u043c\u0438 \u0438 \u0441\u0430\u0439\u0442\u0430\u043c\u0438).\n\n\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0418\u0418-\u043a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0430\u043d\u0442\u043e\u0432 \u0438 \u0447\u0430\u0442-\u0431\u043e\u0442\u043e\u0432 (\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0447\u0430\u0442-\u0431\u043e\u0442\u043e\u0432, \u0441\u0430\u043c\u043e\u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0435 \u0431\u043e\u0442\u044b, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0438 \u043f\u0440\u043e\u0434\u0430\u0436\u0438).\n\n\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u0430 \u043f\u0440\u043e\u0434\u0430\u0436 (\u0418\u0418-\u043f\u0440\u043e\u0434\u0430\u0432\u0446\u044b, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0437\u0430\u044f\u0432\u043e\u043a, \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043b\u0438\u0434\u043e\u0432, \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 CRM-\u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438).\n\n\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0418\u0418 (\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 24/7).\n\n\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0438 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044f \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0418\u0418 (\u0418\u0418-\u0442\u0440\u0435\u043d\u0435\u0440\u044b, \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u044f \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432).\n\n\u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 (\u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0434\u0430\u0436, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0442\u0447\u0435\u0442\u043d\u043e\u0441\u0442\u0438).\n\n\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0418\u0418-\u0440\u0435\u0448\u0435\u043d\u0438\u0439 (\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u043e\u0434 \u0437\u0430\u0434\u0430\u0447\u0438 \u0431\u0438\u0437\u043d\u0435\u0441\u0430, \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435).\n\n\u0427\u0415\u0420\u041d\u041e\u0412\u0418\u041a \u041f\u0418\u0421\u042c\u041c\u0410 \u0412 HTML\n\n<!DOCTYPE html>\n<html>\n<head>\n    <meta charset=\"UTF-8\">\n    <title>\u041a\u0430\u043a \u0418\u0418 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u0448\u0435\u043c\u0443 \u0431\u0438\u0437\u043d\u0435\u0441\u0443?</title>\n</head>\n<body style=\"font-family: Arial, sans-serif; line-height: 1.6;\">\n    <p>\u041f\u0440\u0438\u0432\u0435\u0442, {\u0418\u043c\u044f}!</p>\n    <p>\u041c\u043d\u043e\u0433\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0418\u0418 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0438 \u0440\u043e\u0441\u0442\u0430 \u043f\u0440\u0438\u0431\u044b\u043b\u0438. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0431\u0441\u0443\u0434\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0432\u0430\u043c.</p>\n    <p>\u041c\u044b \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0432\u0430\u0448\u0443 \u0440\u0430\u0431\u043e\u0442\u0443 \u0438 \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c.</p>\n    <p>\u0413\u043e\u0442\u043e\u0432(\u0430) \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u043a\u0435\u0439\u0441\u043e\u0432. \u041a\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u0443\u0434\u043e\u0431\u043d\u043e \u0441\u043e\u0437\u0432\u043e\u043d\u0438\u0442\u044c\u0441\u044f?</p>\n    <p>\u0421 \u0443\u0432\u0430\u0436\u0435\u043d\u0438\u0435\u043c,<br>{\u0412\u0430\u0448\u0435 \u0418\u043c\u044f}<br>{\u0412\u0430\u0448\u0430 \u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f}</p>\n</body>\n</html>\n\n\u0427\u0415\u0413\u041e \u041d\u0415 \u0414\u0415\u041b\u0410\u0422\u042c\n\n\u041d\u0415 \u041f\u0418\u0421\u0410\u0422\u042c \u041d\u0418 \u0427\u0415\u0413\u041e \u041a\u0420\u041e\u041c\u0415 \u041f\u0418\u0421\u041c\u0410 \u0412 HTML \u0424\u041e\u0420\u041c\u0410\u0422\u0415\n\n\u041d\u0418 \u041a\u0410\u041a\u0418\u0425 \u041f\u0420\u0418\u0412\u0415\u0422\u0421\u0422\u0412\u0418\u0419 \u0418 \u0414\u041e\u041f\u041e\u041b\u041d\u0418\u0422\u0415\u041b\u042c\u041d\u041e\u0413\u041e \u0422\u0415\u041a\u0421\u0422\u0410\n\n\u041d\u0415 \u041f\u0418\u0421\u0410\u0422\u042c \u0412 \u0421\u0422\u0418\u041b\u0415 \u041a\u041e\u0420\u041f\u041e\u0420\u0410\u0422\u0418\u0412\u041d\u041e\u0413\u041e \u0411\u042e\u0420\u041e\u041a\u0420\u0410\u0422\u0418\u0427\u0415\u0421\u041a\u041e\u0413\u041e \u041f\u0418\u0421\u042c\u041c\u0410.\n\n\u041d\u0415 \u0423\u041a\u0410\u0417\u042b\u0412\u0410\u0422\u042c \u0421\u0422\u041e\u0418\u041c\u041e\u0421\u0422\u042c \u0423\u0421\u041b\u0423\u0413 \u0412 \u041f\u0418\u0421\u042c\u041c\u0415.\n\n\u041d\u0415 \u0414\u0415\u041b\u0410\u0422\u042c \u041f\u0420\u0415\u0414\u041b\u041e\u0416\u0415\u041d\u0418\u0415 \u0421\u041b\u0418\u0428\u041a\u041e\u041c \u0414\u041b\u0418\u041d\u041d\u042b\u041c.\n\n\u041d\u0415 \u041d\u0410\u0412\u042f\u0417\u042b\u0412\u0410\u0422\u042c \u041f\u0420\u041e\u0414\u0423\u041a\u0422, \u0410 \u0421\u041e\u0417\u0414\u0410\u0412\u0410\u0422\u042c \u0418\u041d\u0422\u0415\u0420\u0415\u0421.\n\n\u041d\u0415 \u0418\u0421\u041f\u041e\u041b\u042c\u0417\u041e\u0412\u0410\u0422\u042c \u041e\u0411\u0429\u0418\u0415 \u0424\u0420\u0410\u0417\u042b \u0411\u0415\u0417 \u041f\u0420\u0418\u041c\u0415\u0420\u041e\u0412."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        460,
        260
      ],
      "id": "6f4c3205-f2d1-4ffa-b5c0-f3c8e0f74d37",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": "anthropic/claude-3.7-sonnet",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "typeVersion": 1,
      "position": [
        480,
        400
      ],
      "id": "6b143d51-db19-4e19-ad45-5c7d0dea11c2",
      "name": "OpenRouter Chat Model",
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1c5uhlu79eVVGc_YWR1Af4a67w2JyrEVwSYzkGXG4nGA",
          "mode": "list",
          "cachedResultName": "\u041b\u0438\u0434\u044b \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1c5uhlu79eVVGc_YWR1Af4a67w2JyrEVwSYzkGXG4nGA/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u0438",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1c5uhlu79eVVGc_YWR1Af4a67w2JyrEVwSYzkGXG4nGA/edit#gid=0"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "\u0427\u0435\u0440\u043d\u043e\u0432\u0438\u043a \u043f\u0438\u0441\u044c\u043c\u0430",
              "lookupValue": "0"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        60,
        -40
      ],
      "id": "a1072ce1-72c5-43b2-a57d-cf79796a4b5c",
      "name": "Google Sheets",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "maxItems": 20
      },
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        260,
        -40
      ],
      "id": "f7dbf430-f76a-4134-8e7a-b62cae96d979",
      "name": "Limit"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1c5uhlu79eVVGc_YWR1Af4a67w2JyrEVwSYzkGXG4nGA",
          "mode": "list",
          "cachedResultName": "\u041b\u0438\u0434\u044b \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1c5uhlu79eVVGc_YWR1Af4a67w2JyrEVwSYzkGXG4nGA/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u0438",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1c5uhlu79eVVGc_YWR1Af4a67w2JyrEVwSYzkGXG4nGA/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "\u0427\u0435\u0440\u043d\u043e\u0432\u0438\u043a \u043f\u0438\u0441\u044c\u043c\u0430": "={{ $json.output }}",
            "\u0421\u0430\u0439\u0442": "={{ $('Loop Over Items').item.json[\"\u0421\u0430\u0439\u0442\"] }}"
          },
          "matchingColumns": [
            "\u0421\u0430\u0439\u0442"
          ],
          "schema": [
            {
              "id": "\u0421\u0430\u0439\u0442",
              "displayName": "\u0421\u0430\u0439\u0442",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f",
              "displayName": "\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u041f\u043e\u0447\u0442\u0430",
              "displayName": "\u041f\u043e\u0447\u0442\u0430",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0422\u0435\u043b\u0435\u0444\u043e\u043d",
              "displayName": "\u0422\u0435\u043b\u0435\u0444\u043e\u043d",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438",
              "displayName": "\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438",
              "displayName": "\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0420\u0430\u0431\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438",
              "displayName": "\u0420\u0430\u0431\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0427\u0435\u0440\u043d\u043e\u0432\u0438\u043a \u043f\u0438\u0441\u044c\u043c\u0430",
              "displayName": "\u0427\u0435\u0440\u043d\u043e\u0432\u0438\u043a \u043f\u0438\u0441\u044c\u043c\u0430",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0421\u0442\u0430\u0442\u0443\u0441 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u0438\u0441\u044c\u043c\u0430",
              "displayName": "\u0421\u0442\u0430\u0442\u0443\u0441 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u0438\u0441\u044c\u043c\u0430",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0421\u0442\u0430\u0442\u0443\u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445",
              "displayName": "\u0421\u0442\u0430\u0442\u0443\u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        820,
        260
      ],
      "id": "546b2b55-d04e-4b17-a128-6a4d0d602cf2",
      "name": "Google Sheets1",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "8667e254-1dbc-4fad-99ec-4e9a246e2522",
              "leftValue": "={{ $json[\"\u041f\u043e\u0447\u0442\u0430\"] }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        40,
        260
      ],
      "id": "808a13e2-c083-43ee-b9d5-64298ed58e10",
      "name": "If"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        -160,
        260
      ],
      "id": "7b58f1bf-e082-4c42-97f6-97fc6bfdbbf5",
      "name": "Loop Over Items"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "ad085049-c134-4dbe-a14b-ca66ef3d33a8",
              "name": "true",
              "value": "\u041f\u0438\u0441\u044c\u043c\u0430 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439 \u0441\u043e\u0437\u0434\u0430\u043d\u044b. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 https://docs.google.com/spreadsheets/d/1c5uhlu79eVVGc_YWR1Af4a67w2JyrEVwSYzkGXG4nGA/edit?gid=0#gid=0",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -160,
        660
      ],
      "id": "4ddeae11-54f6-4c28-b4dc-97d56c57cd47",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "content": "## \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0430\u0439\u0442\u043e\u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443",
        "height": 240,
        "width": 640,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -200,
        -100
      ],
      "id": "9c5febdd-4736-4b73-8109-c01ff5e3463c",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "## \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430",
        "height": 220,
        "width": 300,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -200,
        600
      ],
      "id": "63d29cc0-87c6-42a0-924f-d6d2368a6e9d",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## \u0426\u0438\u043a\u043b \u043f\u0440\u043e\u0445\u043e\u0434\u0430 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438",
        "height": 340,
        "width": 1180,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -200,
        200
      ],
      "id": "375d2028-b46f-447f-8910-bba10ea4e341",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1c5uhlu79eVVGc_YWR1Af4a67w2JyrEVwSYzkGXG4nGA",
          "mode": "list",
          "cachedResultName": "\u041b\u0438\u0434\u044b \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1c5uhlu79eVVGc_YWR1Af4a67w2JyrEVwSYzkGXG4nGA/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u0438",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1c5uhlu79eVVGc_YWR1Af4a67w2JyrEVwSYzkGXG4nGA/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "\u0421\u0430\u0439\u0442": "={{ $json[\"\u0421\u0430\u0439\u0442\"] }}",
            "\u0427\u0435\u0440\u043d\u043e\u0432\u0438\u043a \u043f\u0438\u0441\u044c\u043c\u0430": "\u041d\u0435\u0442 \u043f\u043e\u0447\u0442\u044b"
          },
          "matchingColumns": [
            "\u0421\u0430\u0439\u0442"
          ],
          "schema": [
            {
              "id": "\u0421\u0430\u0439\u0442",
              "displayName": "\u0421\u0430\u0439\u0442",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f",
              "displayName": "\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u041f\u043e\u0447\u0442\u0430",
              "displayName": "\u041f\u043e\u0447\u0442\u0430",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0422\u0435\u043b\u0435\u0444\u043e\u043d",
              "displayName": "\u0422\u0435\u043b\u0435\u0444\u043e\u043d",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438",
              "displayName": "\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438",
              "displayName": "\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0420\u0430\u0431\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438",
              "displayName": "\u0420\u0430\u0431\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0427\u0435\u0440\u043d\u043e\u0432\u0438\u043a \u043f\u0438\u0441\u044c\u043c\u0430",
              "displayName": "\u0427\u0435\u0440\u043d\u043e\u0432\u0438\u043a \u043f\u0438\u0441\u044c\u043c\u0430",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0421\u0442\u0430\u0442\u0443\u0441 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u0438\u0441\u044c\u043c\u0430",
              "displayName": "\u0421\u0442\u0430\u0442\u0443\u0441 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u0438\u0441\u044c\u043c\u0430",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u0421\u0442\u0430\u0442\u0443\u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445",
              "displayName": "\u0421\u0442\u0430\u0442\u0443\u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        260,
        280
      ],
      "id": "a1547786-6fd7-4b65-8b01-ca6f84d91241",
      "name": "Google Sheets2",
      "retryOnFail": true,
      "waitBetweenTries": 3000,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Google Sheets1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Sheets2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets1": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets2": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "120a3f5e-b1de-4026-9313-36de29a8801f",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "yiTucUfF0GQc2rze",
  "tags": [
    {
      "createdAt": "2025-02-07T14:41:19.902Z",
      "updatedAt": "2025-02-07T14:41:19.902Z",
      "id": "8cCaxKA7JGSfSTNY",
      "name": "MASK"
    },
    {
      "createdAt": "2025-02-24T12:32:02.569Z",
      "updatedAt": "2025-02-24T12:32:02.569Z",
      "id": "2KX16trsWEyCq7lN",
      "name": "scraper"
    }
  ]
}

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

Agent lead mail generate. Uses executeWorkflowTrigger, agent, lmChatOpenRouter, googleSheets. Event-driven trigger; 13 nodes.

Source: https://github.com/senkiin/Workflows/blob/6bbf4b7bc5921661465d538eabe01c41ac7047d0/Get_Leads/Agent_lead_mail_generate.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

This workflow is designed for marketers, content creators, agencies, and solo founders who want to publish long‑form posts with visuals on autopilot using n8n and AI agents. ​

Tool Http Request, Agent, HTTP Request +27
AI & RAG

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Output Parser Structured, Telegram, N8N Nodes Tesseractjs +14
AI & RAG

Faceless Video. Uses httpRequest, agent, googleDrive, stickyNote. Event-driven trigger; 29 nodes.

HTTP Request, Agent, Google Drive +6
AI & RAG

This workflow automates the discovery, extraction, enrichment, and storage of business information from Google Maps search queries using AI tools, scrapers, and Google Sheets.

HTTP Request, Execute Workflow Trigger, Agent +2
AI & RAG

Blog Post. Uses toolHttpRequest, lmChatOpenRouter, agent, httpRequest. Event-driven trigger; 20 nodes.

Tool Http Request, OpenRouter Chat, Agent +6