{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "e180e9bb-30ed-447e-b89b-1089850392e6",
      "name": "Create URL",
      "type": "n8n-nodes-base.code",
      "position": [
        -1344,
        -208
      ],
      "parameters": {
        "jsCode": "/************************************************************\n * Build Apollo People-search URL from parser output\n * Handles both shapes:\n *   { query: [ { \u2026 } ] }      \u2190 array\n *   { query: { \u2026 } }          \u2190 object\n ************************************************************/\n\n// 1. Obtener el JSON que llega del nodo anterior\nconst inputData = $json;\n\n// 2. Normalizar para que paramsData siempre sea un objeto\nlet paramsData;\n\nif (Array.isArray(inputData.query)) {\n  // Caso antiguo: query es un array\n  paramsData = inputData.query[0];\n} else if (inputData.query) {\n  // Caso nuevo: query es un objeto\n  paramsData = inputData.query;\n} else {\n  throw new Error('Falta la propiedad \"query\" en el input');\n}\n\n// 3. URL base de Apollo (interfaz web)\n//    Para llamar a la API REST cambia a https://api.apollo.io/v1/mixed_people/search\nconst baseURL = 'https://app.apollo.io/#/people';\n\n// 4. Construir los par\u00e1metros din\u00e1micos\nconst queryParts = [\n  'sortByField=recommendations_score',\n  'sortAscending=false',\n  'page=1',\n];\n\n// Helper para arrays \u2192 personTitles[]=ceo\nconst addArrayParams = (paramName, values) => {\n  values.forEach((val) => {\n    const decoded = val.replace(/\\+/g, ' ');          // \u201cbarcelona+spain\u201d \u21d2 \u201cbarcelona spain\u201d\n    queryParts.push(`${paramName}[]=${encodeURIComponent(decoded)}`);\n  });\n};\n\n// job_title \u2192 personTitles[]\nif (Array.isArray(paramsData.job_title)) {\n  addArrayParams('personTitles', paramsData.job_title);\n}\n\n// location \u2192 personLocations[]\nif (Array.isArray(paramsData.location)) {\n  addArrayParams('personLocations', paramsData.location);\n}\n\n// business \u2192 qOrganizationKeywordTags[]\nif (Array.isArray(paramsData.business)) {\n  addArrayParams('qOrganizationKeywordTags', paramsData.business);\n}\n\n// campos est\u00e1ticos\nqueryParts.push('includedOrganizationKeywordFields[]=tags');\nqueryParts.push('includedOrganizationKeywordFields[]=name');\n\n// 5. Montar la URL final\nconst finalURL = `${baseURL}?${queryParts.join('&')}`;\n\n// 6. Devolver resultado\nreturn [{ json: { finalURL } }];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "03a4bd71-1c8b-4f5b-9c91-739715d9364b",
      "name": "Extract Info",
      "type": "n8n-nodes-base.set",
      "position": [
        -896,
        -208
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "336074e3-b3b9-4dde-92d7-fb5af51b8ffa",
              "name": "firstName",
              "type": "string",
              "value": "={{ $json.first_name }}"
            },
            {
              "id": "da8362c5-75a5-4431-847d-fd4e02112bcc",
              "name": "emailAddress",
              "type": "string",
              "value": "={{ $json.email }}"
            },
            {
              "id": "3c99e0e0-4184-4e85-baa0-8bb85e4e227b",
              "name": "linkedInURL",
              "type": "string",
              "value": "={{ $json.linkedin_url }}"
            },
            {
              "id": "a45af1ff-7026-47a0-a42c-bdb3b27c8e3d",
              "name": "seniority ",
              "type": "string",
              "value": "={{ $json.seniority }}"
            },
            {
              "id": "fa551406-a981-4fbb-babc-aa78ab10010d",
              "name": "jobTitle",
              "type": "string",
              "value": "={{ $json.employment_history[0].title }}"
            },
            {
              "id": "2e8d8d61-bd02-4f24-91f1-707152d99806",
              "name": "companyName",
              "type": "string",
              "value": "={{ $json.employment_history[0].organization_name }}"
            },
            {
              "id": "1295a702-636a-48bd-8bcd-df92162237fb",
              "name": "location",
              "type": "string",
              "value": "={{ $json.city }}, {{ $json.state }}"
            },
            {
              "id": "0072b657-0296-4858-b190-621831943816",
              "name": "country",
              "type": "string",
              "value": "={{ $json.country }}"
            },
            {
              "id": "22ce107c-30ef-4abe-9fab-8d49482da87c",
              "name": "Number",
              "type": "string",
              "value": "={{ $json.organization.primary_phone && $json.organization.primary_phone.sanitized_number && $json.organization.primary_phone.sanitized_number ? $json.organization.primary_phone.sanitized_number : null }}"
            },
            {
              "id": "302b9529-e16b-49ce-bbb6-ae2de90fed93",
              "name": "websiteURL",
              "type": "string",
              "value": "={{ $json.organization_website_url }}"
            },
            {
              "id": "13026de1-0927-44f7-8388-4d525f44974d",
              "name": "businessIndustry",
              "type": "string",
              "value": "={{ $json.industry }}"
            },
            {
              "id": "1a8ae803-f0bd-48d5-bf85-89b91c2e9c64",
              "name": "lastName",
              "type": "string",
              "value": "={{ $json.last_name }}"
            },
            {
              "id": "03cb9c0d-4c05-4d00-88a4-de33e34e7c16",
              "name": "emailStatus",
              "type": "string",
              "value": "={{ $json.email_status }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "11c65a93-97d9-439f-803a-a25322842976",
      "name": "Only Keep Verified Emails ",
      "type": "n8n-nodes-base.filter",
      "position": [
        -688,
        -208
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c49e7377-db5e-4458-bea5-9e297e19f620",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.emailStatus }}",
              "rightValue": "verified"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "0917fa22-1695-403a-9cb4-530a111295f2",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        240,
        -128
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "78c35016-b023-41e0-8e22-21bed4ca62d2",
      "name": "Download File1",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -2416,
        -384
      ],
      "parameters": {
        "fileId": "={{ $json.message.voice.file_id }}",
        "resource": "file"
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5f6b4e2e-9ae5-49ae-9bc3-049179d29ca6",
      "name": "Transcribe1",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -2208,
        -384
      ],
      "parameters": {
        "options": {},
        "resource": "audio",
        "operation": "transcribe"
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.6
    },
    {
      "id": "8966e2c9-09da-4aba-8f8b-7e005b05595e",
      "name": "Text1",
      "type": "n8n-nodes-base.set",
      "position": [
        -2304,
        -128
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "fe7ecc99-e1e8-4a5e-bdd6-6fce9757b234",
              "name": "text",
              "type": "string",
              "value": "={{ $json.message.text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "ee032f59-9dcb-4136-953d-a4e73fbb1b21",
      "name": "Voice or Text1",
      "type": "n8n-nodes-base.switch",
      "position": [
        -2640,
        -288
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Voice",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.message.voice.file_id }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Text",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "8c844924-b2ed-48b0-935c-c66a8fd0c778",
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.message.text }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "0555b1fe-c6d3-4fcf-9949-087bda07b5f4",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1984,
        -64
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-nano",
          "cachedResultName": "gpt-4.1-nano"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "cca9f664-e7fd-489f-ab76-357e69ee8521",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -1856,
        -64
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "e7ae31f1-d91f-4df2-b98c-3405a62d3e8f",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -1744,
        -64
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"location\": [\"barcelona+spain\"],\n  \"business\": [\"ecommerce\"],\n  \"job_title\": [\"ceo\"]\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "549bb2c5-f726-43e1-b997-4b0921a00223",
      "name": "Select already scraped mails",
      "type": "n8n-nodes-base.postgres",
      "position": [
        -1136,
        -480
      ],
      "parameters": {
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "Leads_n-mail",
          "cachedResultName": "Leads_n-mail"
        },
        "schema": {
          "__rl": true,
          "mode": "list",
          "value": "public"
        },
        "options": {
          "outputColumns": [
            "emailAddress"
          ]
        },
        "operation": "select",
        "returnAll": true
      },
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.6
    },
    {
      "id": "1c082972-95d9-4218-8d55-398a5f8bc006",
      "name": "Keep only the new leads",
      "type": "n8n-nodes-base.compareDatasets",
      "position": [
        -448,
        -240
      ],
      "parameters": {
        "options": {},
        "mergeByFields": {
          "values": [
            {}
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "76f9769d-7c61-43c7-8bea-5006d965df16",
      "name": "Already scraped",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -96,
        -336
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7b7c68cd-0b3f-4b7e-ac52-a527743f359a",
      "name": "Create rows with new leads",
      "type": "n8n-nodes-base.supabase",
      "position": [
        -160,
        -128
      ],
      "parameters": {
        "tableId": "Leads_n-mail",
        "fieldsUi": {
          "fieldValues": [
            {
              "fieldId": "firstName",
              "fieldValue": "={{ $json.firstName }}"
            },
            {
              "fieldId": "emailAddress"
            },
            {
              "fieldId": "linkedInURL"
            },
            {
              "fieldId": "jobTitle",
              "fieldValue": "={{ $json.jobTitle }}"
            },
            {
              "fieldId": "companyName",
              "fieldValue": "={{ $json.companyName }}"
            },
            {
              "fieldId": "location",
              "fieldValue": "={{ $json.location }}"
            },
            {
              "fieldId": "country",
              "fieldValue": "={{ $json.country }}"
            },
            {
              "fieldId": "websiteURL",
              "fieldValue": "={{ $json.websiteURL }}"
            },
            {
              "fieldId": "businessIndustry",
              "fieldValue": "={{ $json.businessIndustry }}{{ $('Apollo Scraper').item.json.organization.industry }}"
            },
            {
              "fieldId": "lastName",
              "fieldValue": "={{ $json.lastName }}"
            }
          ]
        }
      },
      "credentials": {},
      "typeVersion": 1
    },
    {
      "id": "46d24870-39b3-41ad-b8d5-e0c8f7d3dc13",
      "name": "Set Telegram message",
      "type": "n8n-nodes-base.set",
      "position": [
        48,
        -128
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "feb577bf-b3fb-40da-b37b-41d82345c627",
              "name": "output",
              "type": "string",
              "value": "={{ $input.all().length }} new contacts have been added to the Google Sheet!"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "44f85035-a144-470d-9e9e-f518664ae8f0",
      "name": "Confirmation message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        464,
        -128
      ],
      "parameters": {
        "text": "={{ $input.all().length }} new contacts have been added to the Google Sheet!",
        "chatId": "123456789",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "6b01d34b-a969-4da6-82b0-74b88ba1b45b",
      "name": "User message",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -2864,
        -288
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "94c7143e-4b6a-48a5-bfa8-1533f99ed78e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2880,
        -528
      ],
      "parameters": {
        "color": 3,
        "width": 860,
        "height": 600,
        "content": "# First step: recieve the message via audio or text"
      },
      "typeVersion": 1
    },
    {
      "id": "e6f0b89f-c519-4d5a-9c0a-c226636f7144",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2000,
        -528
      ],
      "parameters": {
        "width": 580,
        "height": 600,
        "content": "# Create the json for the url"
      },
      "typeVersion": 1
    },
    {
      "id": "34f4f9e6-570a-4379-b2a7-740b420d66ac",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2864,
        112
      ],
      "parameters": {
        "color": 6,
        "width": 1400,
        "height": 800,
        "content": "## Who\u2019s it for\nGrowth hackers, SDR teams, and founders who collect lead requests via Telegram (voice or text) and want those leads scraped, verified, de-duplicated, and stored in a single Supabase table\u2014hands-free.\n\n## How it works\n1. **Telegram trigger** captures a user\u2019s text or voice note.  \n2. **OpenAI Whisper + GPT agent** parse the message and build a structured search query.  \n3. A **Code node** crafts a people-search URL, then an **HTTP request** calls the Apify Apollo-io Scraper to pull up to 500 contacts.  \n4. **Filters** keep only \u201cverified\u201d emails and compare them to a Postgres list of already-scraped addresses to avoid duplicates.  \n5. Fresh contacts are inserted into the Supabase table **Leads_n-mail**, and the bot replies with a count of new rows added. :contentReference[oaicite:0]{index=0}\n\n## How to set up\n1. Replace the hard-coded Apify token in **Apollo Scraper** with an environment variable.  \n2. Add OpenAI credentials for Whisper & GPT nodes.  \n3. Point the Postgres \u201cdedupe\u201d node at your existing email table (or skip it).  \n4. Update the Supabase connection and table name, then test with a sample voice note.\n\n### Supabase column headers  \n`firstName | lastName | emailAddress | linkedInURL | jobTitle | companyName | location | country | websiteURL | businessIndustry | seniority | number`\n\n## Requirements\n- Telegram Bot token  \n- OpenAI API key  \n- Apify account with Apollo-io Scraper actor  \n- Supabase project credentials (or swap for Airtable/Sheets)  \n- n8n v0.231+ self-hosted or Cloud\n\n## How to customize the workflow\n- **Change the prompt** to capture extra fields (e.g., funding stage).  \n- **Adjust totalRecords** in the HTTP node to pull more or fewer leads.  \n- **Swap storage**\u2014write to Airtable, HubSpot, or Sheets instead of Supabase.  \n- **Add enrichment**\u2014insert Clearbit or Hunter steps before the insert.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "d07f9e36-b9ff-4531-b78b-df2c6c554caa",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1376,
        -288
      ],
      "parameters": {
        "color": 5,
        "width": 880,
        "height": 280,
        "content": "## Scrape the leads from apify actor"
      },
      "typeVersion": 1
    },
    {
      "id": "e712997f-35f4-45b3-a07b-1b4f38967292",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -208,
        48
      ],
      "parameters": {
        "height": 240,
        "content": "## Insert the new leads to your database\n\n*can be airtable/sheets/supabase"
      },
      "typeVersion": 1
    },
    {
      "id": "06f13dd9-ba24-47d5-b3be-7f5c3ab95b47",
      "name": "Generate query payload",
      "type": "n8n-nodes-base.set",
      "position": [
        -1536,
        -176
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "={\n  \"query\": {{ $json.output }}\n}\n\n"
      },
      "typeVersion": 3.4
    },
    {
      "id": "20b67f44-e172-4e68-ba98-d26aad440cc9",
      "name": "Scraper agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1936,
        -288
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "options": {
          "systemMessage": "=# Role\nYou are LeadChat. Your single job is to return a **JSON array of one object** that tells the sub-workflow what to scrape.\n\n# Required JSON schema\n```json\n[\n  {\n    \"location\": [\"city+country\"],      // lowercase, spaces\u2192+\n    \"business\": [\"industry\"],          // lowercase, words\u2192+\n    \"job_title\": [\"role\"]              // lowercase, words\u2192+\n  }\n]\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.9
    },
    {
      "id": "e71f90ea-9a6e-4617-b321-4eb3f54b3613",
      "name": "Run an Actor",
      "type": "@apify/n8n-nodes-apify.apify",
      "position": [
        -1120,
        -208
      ],
      "parameters": {
        "build": "latest",
        "actorId": {
          "__rl": true,
          "mode": "list",
          "value": "jljBwyyQakqrL1wae",
          "cachedResultUrl": "https://console.apify.com/actors/jljBwyyQakqrL1wae/input",
          "cachedResultName": "\ud83d\udd25Apollo Scraper - Scrape upto 50k Leads"
        },
        "timeout": 10000,
        "operation": "Run actor",
        "customBody": "{\n    \"getPersonalEmails\": true,\n    \"getWorkEmails\": true,\n    \"totalRecords\": 500,\n    \"url\": \"{{ $json.finalURL }}\"\n}",
        "waitForFinish": 60
      },
      "credentials": {
        "apifyApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c1ab0bf6-8224-4de5-a002-3e20b9aeada5",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1296,
        64
      ],
      "parameters": {
        "color": 3,
        "width": 576,
        "height": 560,
        "content": "## Need a tailor-made workflow? Tell me about your business and get a free proposal:\n\n**[Start here \u2192 Custom Automation Form](https://taskmorphr.com/contact)**\n\n---\n## \ud83d\udcc8 Cost-Savings Snapshot  \nCurious what automation could save you?  \nRun the 60-second calculator:\n\n**[ROI / Cost Comparison](https://taskmorphr.com/cost-comparison)**\n\n---\n### \u2709\ufe0f Reach me directly  \n`paul@taskmorphr.com`"
      },
      "typeVersion": 1
    },
    {
      "id": "ca635bbf-bcc3-4d82-8e14-5e88bf511269",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -976,
        464
      ],
      "parameters": {
        "color": 3,
        "width": 224,
        "height": 128,
        "content": "### \ud83d\udee0\ufe0f Build it yourself  \nBrowse every ready-made workflow:  \n[Full Template Pack \u2014 coming soon](https://n8n.io/creators/diagopl/)\n"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Limit": {
      "main": [
        [
          {
            "node": "Confirmation message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Text1": {
      "main": [
        [
          {
            "node": "Scraper agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create URL": {
      "main": [
        [
          {
            "node": "Run an Actor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transcribe1": {
      "main": [
        [
          {
            "node": "Scraper agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Info": {
      "main": [
        [
          {
            "node": "Only Keep Verified Emails ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run an Actor": {
      "main": [
        [
          {
            "node": "Extract Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "User message": {
      "main": [
        [
          {
            "node": "Voice or Text1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scraper agent": {
      "main": [
        [
          {
            "node": "Generate query payload",
            "type": "main",
            "index": 0
          },
          {
            "node": "Select already scraped mails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Scraper agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Download File1": {
      "main": [
        [
          {
            "node": "Transcribe1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Voice or Text1": {
      "main": [
        [
          {
            "node": "Download File1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Text1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Scraper agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Set Telegram message": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate query payload": {
      "main": [
        [
          {
            "node": "Create URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Keep only the new leads": {
      "main": [
        [
          {
            "node": "Already scraped",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Already scraped",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Already scraped",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create rows with new leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Scraper agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Create rows with new leads": {
      "main": [
        [
          {
            "node": "Set Telegram message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Only Keep Verified Emails ": {
      "main": [
        [
          {
            "node": "Keep only the new leads",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Select already scraped mails": {
      "main": [
        [
          {
            "node": "Keep only the new leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}