AutomationFlowsAI & RAG › Build a Prospecting List with Leadiq and Save It to Airtable CRM

Build a Prospecting List with Leadiq and Save It to Airtable CRM

ByGrowSpire Agency @growspire on n8n.io

B2B companies, including: Founders Marketing and sales professionals Recruiters involved in people search and B2B outreach

Chat trigger trigger★★★★★ complexityAI-powered31 nodesOutput Parser StructuredAirtableAgentChat TriggerLm Chat Mistral CloudChain Llm@Tavily/N8N Nodes TavilyHTTP Request
AI & RAG Trigger: Chat trigger Nodes: 31 Complexity: ★★★★★ AI nodes: yes Added:

This workflow corresponds to n8n.io template #12562 — we link there as the canonical source.

This workflow follows the Agent → Airtable 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
{
  "id": "8ZqAFntn23ETVLCR",
  "name": "Build a Prospecting List with LeadIQ and Save It to Airtable CRM",
  "tags": [],
  "nodes": [
    {
      "id": "37b124c9-8716-4eaa-aed1-dec4863a1e98",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        816,
        -400
      ],
      "parameters": {
        "autoFix": true,
        "jsonSchemaExample": "{\n  \"contactFilter\": {\n    \"jobTitles\": [\"CTO\", \"Founder\"]\n  },\n  \"companyFilter\": {\n    \"industries\": [\"Software Development\"],\n    \"employeeCountRange\": {\n      \"min\": 10,\n      \"max\": 50\n    },\n    \"locations\": [\"United States\"],\n    \"revenueRanges\": [\n      {\n        \"start\": 10000000,\n        \"end\": 25000000\n      }\n    ],\n    \"technologyCategories\": [\"Customer Relationship Management\"],\n    \"technologies\": [\"HubSpot\"],\n    \"fundingInfoFilters\": [\n      {\n        \"lastFundingDateRange\": {\n          \"start\": 1735304190350,\n          \"end\": 1766840190350\n        },\n        \"lastFundingRange\": null\n      }\n    ],\n    \"descriptionKeywords\": [\"b2b saas\", \"cloud platform\"]\n  }\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "5d629316-407b-45eb-9932-e1d66adb555f",
      "name": "Airtable: Create Account",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -112,
        272
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "<Name of your Base>"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "Accounts"
        },
        "columns": {
          "value": {
            "id": "={{ $('LeadIQ Database (Find People)').item.json.data.flatAdvancedSearch.people[0].id }}",
            "Name": "={{ $('LeadIQ Database (Find People)').item.json.data.flatAdvancedSearch.people[0].company.name }}",
            "Size": "={{ $('LeadIQ Database (Find People)').item.json.data.flatAdvancedSearch.people[0].company.employeeCount }}",
            "Industry": "={{ $('LeadIQ Database (Find People)').item.json.data.flatAdvancedSearch.people[0].company.industry }}",
            "HQ address": "={{ $json.items[0].json.company_hq_address }}",
            "Description": "={{ $json.items[0].json.company_description }}",
            "Company website": "={{ $('LeadIQ Database (Find People)').item.json.data.flatAdvancedSearch.people[0].company.domain }}",
            "Company LinkedIn": "={{ $json.items[0].json.company_linkedin_url }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Description",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company website",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Company website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Industry",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Industry",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Size",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Size",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company LinkedIn",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Company LinkedIn",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Contacts",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Contacts",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Opportunities",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Opportunities",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "HQ address",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "HQ address",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Map cache",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Map cache",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "upsert"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "08862fe8-dccf-46fa-9475-4a8fc675d88f",
      "name": "Web Enrichment Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "onError": "continueErrorOutput",
      "position": [
        368,
        -176
      ],
      "parameters": {
        "text": "=YOUR GOAL\nEnrich company with additional details:\n1) Company LinkedIn URL\n2) Company description (i.e. what they do);\n3) Company HQ Address;\n\nYOUR INPUT:\nGet the following company details, received from LeadIQ databaase:\nCompany name: {{ $('LeadIQ Database (Find People)').item.json.data.flatAdvancedSearch.people[0].company.name }}\nCompany website URL: {{ $('LeadIQ Database (Find People)').item.json.data.flatAdvancedSearch.people[0].company.domain }}\nIndustry: {{ $('LeadIQ Database (Find People)').item.json.data.flatAdvancedSearch.people[0].company.industry }}\nEmpoyee count:  {{ $('LeadIQ Database (Find People)').item.json.data.flatAdvancedSearch.people[0].company.employeeCount }}\n\nYOUR PROCESS:\nUse Tavily tool to access internet and find additional details:\n1) Company LinkedIn URL\n2) Prepare a compact company description;\n3) Prepare a corporte HQ address (Example: 454-1 Ajax Way, Pinelands, Cape Town, 7405, South Africa);\n\nYOUR OUTPUT FORMAT (MANDATORY):\n\nReturn a single valid JSON object with exactly these keys:\n\n{\n  \"company_linkedin_url\": string | null,\n  \"company_description\": string | null,\n  \"company_hq_address\": string | null\n}\n\nRules:\n- You must output ONLY a valid JSON object.\n- Do NOT include explanations, comments, markdown, or extra text.\n- Do NOT wrap the output in ``` or quotes.\n- The output must EXACTLY match the JSON schema.\n- If a value is unknown, use null.\n- If you violate the format, the workflow will fail.",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3
    },
    {
      "id": "46738e70-6d9c-4035-9598-a3745bfa7f32",
      "name": "Add Contact",
      "type": "n8n-nodes-base.airtable",
      "position": [
        560,
        272
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "<Name of your Base>"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "Contacts"
        },
        "columns": {
          "value": {
            "id": "={{ $('Airtable: Create Account').item.json.id }}",
            "VIP": false,
            "Name": "={{ $('LeadIQ Database (Find People)').item.json.data.flatAdvancedSearch.people[0].firstName }} {{ $('LeadIQ Database (Find People)').item.json.data.flatAdvancedSearch.people[0].lastName }}",
            "Title": "={{ $('LeadIQ Database (Find People)').item.json.data.flatAdvancedSearch.people[0].title }}",
            "Account": "={{ $json.account_link}}",
            "LinkedIn": "={{ $('LeadIQ Database (Find People)').item.json.data.flatAdvancedSearch.people[0].linkedinUrl }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "Name & organization",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Name & organization",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Account",
              "type": "array",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Account",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "VIP",
              "type": "boolean",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "VIP",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Phone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Title",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Department",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "Marketing",
                  "value": "Marketing"
                },
                {
                  "name": "EMEA operations",
                  "value": "EMEA operations"
                },
                {
                  "name": "Design",
                  "value": "Design"
                },
                {
                  "name": "Customer success",
                  "value": "Customer success"
                },
                {
                  "name": "Human resources",
                  "value": "Human resources"
                }
              ],
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Department",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LinkedIn",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "LinkedIn",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Interactions",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Interactions",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Opportunities",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Opportunities",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "upsert"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "4594921c-be00-41d0-a886-d416c51d7bc1",
      "name": "Return an Array for Account",
      "type": "n8n-nodes-base.code",
      "position": [
        352,
        272
      ],
      "parameters": {
        "jsCode": "return [\n  {\n    json: {\n      account_link: [$input.first().json.id]\n    }\n  }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "6f709c44-c565-4be8-b934-0083d1d56070",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -352,
        -256
      ],
      "parameters": {
        "color": 7,
        "width": 224,
        "height": 224,
        "content": "## Manage Number of Leads \nSet the number of LeadIQ credits you want to spend per single run:\n**Change the code line**:  <input.limit = 1>\n(enter your number instead)"
      },
      "typeVersion": 1
    },
    {
      "id": "466dceb4-d403-48f7-8bf2-9d8b265f3002",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -208,
        -608
      ],
      "parameters": {
        "public": true,
        "options": {
          "title": "LeadIQ Lead Search Agent",
          "inputPlaceholder": "CMOs at IT companies, based in New York, 11-50 people staff, using HubSpot"
        },
        "initialMessages": "Hi there! \ud83d\udc4b\nI'm your LeadIQ Lead building Agent, what people are we searching today?"
      },
      "typeVersion": 1.4
    },
    {
      "id": "67a6bda4-23da-4d0a-8e69-0401c97e13cc",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -384,
        -800
      ],
      "parameters": {
        "color": 4,
        "width": 1552,
        "height": 1296,
        "content": "## Step #1: Lead Research & List Building\n**Use this workflow** to build a list of leads with **LeadIQ**\nand save them to **Airtable**. Brown notes explain specific nodes and nuances."
      },
      "typeVersion": 1
    },
    {
      "id": "23eea7e7-1456-43ec-b89d-f3596c146d14",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1184,
        -800
      ],
      "parameters": {
        "color": 6,
        "width": 608,
        "height": 1296,
        "content": "## Step #2: Enrichment: Additionally Search for Email\n**Use this workflow** to enrich leads with web search and **LeadIQ email** (if available)."
      },
      "typeVersion": 1
    },
    {
      "id": "f68a46eb-cc3d-4014-b503-be6d3d4f1511",
      "name": "Open Mistral 7B",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        912,
        -256
      ],
      "parameters": {
        "model": "open-mistral-7b",
        "options": {}
      },
      "credentials": {
        "mistralCloudApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2a521434-6cc1-41bd-8625-39632dbbf30c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        832,
        -736
      ],
      "parameters": {
        "color": 7,
        "width": 304,
        "height": 128,
        "content": "## Search Filters Summary\nThis agent combines filters from the contact and company data agents to build a GraphQL query.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "6f0f60ea-3abd-4c0a-9bac-66d33bb0768f",
      "name": "Company-level data preparation",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "onError": "continueErrorOutput",
      "position": [
        336,
        -608
      ],
      "parameters": {
        "text": "=ROLE\n\nYour task is to convert vague or precise user input into a valid LeadIQ-compatible companyFilter object.\nYou must not invent fields.\nYou must not include fields unless they are explicitly triggered by user input.\nYou must always follow allowed values exactly.\nYour output must be JSON only, with no explanations or additional text.\n\nINPUT\nThe user provides natural language company-level criteria, such as company size, industry, revenue, funding, location, keywords, or technologies. It is here: {{ $('When chat message received').item.json.chatInput }}\n\nOUTPUT\nOutput a partial LeadIQ companyFilter JSON object that can be merged into:\n\n{\n\"input\": {\n\"companyFilter\": { ... }\n}\n}\n\nOnly include fields you are confident apply based on user input.\n\nFIELD RULES\n\nemployeeCountRange (optional)\nOnly include this field if the user mentions company size, number of employees, SMB, mid-market, enterprise, or similar terms.\n\nOutput format:\n\"employeeCountRange\": {\n\"min\": NUMBER,\n\"max\": NUMBER or \"No Max\"\n}\n\nAllowed min values (choose exactly one):\n1, 10, 50, 200, 500, 1000, 3000, 5000, 10000\n\nAllowed max values (choose exactly one):\n10, 50, 200, 500, 1000, 3000, 5000, 10000, \"No Max\"\n\nMapping guidance:\n\"small startup\" \u2192 min 1, max 10\n\"SMB\" \u2192 min 10, max 200\n\"mid-market\" \u2192 min 200, max 1000\n\"enterprise\" \u2192 min 1000, max \"No Max\"\n\nindustries (optional)\nOnly include this field if the user explicitly mentions an industry, sector, or niche.\nYou must use only values from the predefined industry list (Allowed predefined list of industries)\nChoose 1 to 3 closest matches.\nNever invent industry names.\n\nAllowed predefined list of industries:\nAbrasives and Nonmetallic Minerals Manufacturing\nAccessible Architecture and Design\nAccessible Hardware Manufacturing\nAccounting\nAdministration of Justice\nAdministrative and Support Services\nAdvertising Services\nAgricultural Chemical Manufacturing\nAgriculture, Construction, Mining Machinery Manufacturing\nAir, Water, and Waste Program Management\nAirlines and Aviation\nAlternative Dispute Resolution\nAlternative Fuel Vehicle Manufacturing\nAlternative Medicine\nAmbulance Services\nAmusement Parks and Arcades\nAnimal Feed Manufacturing\nAnimation and Post-production\nApparel & Fashion\nApparel Manufacturing\nAppliances, Electrical, and Electronics Manufacturing\nArchitectual and Structural Metal Manufacturing\nArchitecture and Planning\nArmed Forces\nArtificial Rubber and Synthetic Fiber Manufacturing\nArtists and Writers\nAudio and Video Equipment Manufacturing\nAutomation Machinery Manufacturing\nAviation and Aerospace Component Manufacturing\nBaked Goods Manufacturing\nBanking\nBars, Taverns, and Nightclubs\nBed-and-Breakfast, Hotels, Homestays\nBeverage Manufacturing\nBiomass Electric Power Generation\nBiotechnology Research\nBlockchain Services\nBlogs\nBoilers, Tanks, and Shipping Container Manufacturing\nBook and Periodical Publishing\nBook Publishing\nBreweries\nBroadcast Media Production and Distribution\nBuilding Construction\nBuilding Equipment Contractors\nBuilding Finishing Contractors\nBuilding Structure and Exterior Contractors\nBusiness Consulting and Services\nBusiness Content\nBusiness Intelligence Platforms\nCable and Satellite Programming\nCapital Markets\nCaterers\nChemical Manufacturing\nChemical Raw Materials Manufacturing\nChild Day Care Services\nChiropractors\nCircuses and Magic Shows\nCivic and Social Organizations\nCivil Engineering\nClaims Adjusting, Actuarial Services\nClay and Refractory Products Manufacturing\nClimate Data and Analytics\nClimate Technology Product Manufacturing\nCoal Mining\nCollection Agencies\nCommercial and Industrial Equipment Rentals\nCommercial and Industrial Machinery Maintanance\nCommercial and Service Industry Machinery\nCommmunications Equipment Manufacturing\nCommunity Development and Urban Planning\nCommunity Services\nComputer and Networking Security\nComputer Games\nComputer Hardware Manufacturing\nComputer Networking Products\nComputers and Electronics Manufacturing\nConservation Programs\nConstruction\nComsumer Services\nData Infrastructure and Analytics\nData Security Software Products\nDesign Services\nDesktop Computers and Software Products\nE-Learning Providers\nEducation\nElectrical Equipment Manufacturing\nEvents Services\nExecutive Offices\nExecutive Search Providers\nFarming\nFinancial Services\nFood and Beverage Manufacturing\nFood and Beverage Retail\nFood and Beverage Services\nFootwear Manufacturing\nFreight and Package Transportation\nFundraising\nGraphic Design\nHospitality\nSospitals and Health Care\nHotels and Motels\nHousehold Appliance Manufacturing\nHuman Resources Services\nHVAC and Refrigeration Equipment Manufacturing\nInformation Services\nInsurance\nInternational Trade and Development\nInternet Marketplace Platforms\nInvestment Management\nIT Servies and IT Consulting\nIT System Custom Software Development\nIT System Data Services\nIT System Design Services\nMachinery Manufacturing\nManufacturing\nMaritime Transportaion\nMarket Research\nMedia Production\nNon-protif Organizations\nOil and Gas\nOnline Audio and Video Media\nOperations Consulting\nOutsourcing and Offshoring Consulting\nPerforming Arts\nPerforming Arts and Spectator Sports\nProfessional Services\nProfessional Training and Coaching\nReal Estate\nReal Estate Agents and Brokers\nReal Estate and Equipment Rental Services\nResearch Services\nRestaurants\nRetail\nRetail Apparel and Fashion\nRetail Art Dealers\nRetail Art Suppliers\nRetail Office Supplies and Gifts\nRobotics Engienering\nSocial Networking Platforms\nSoftware Development\nStaffing and Recruiting\nTechnology, Information and Internet\nTechnology, Information and Media\nTelecommunications\nTranslation and Localization\nTransportation, Logistics, Supply Chain and Storage\nTruck Transportation\nVenture Capital and Private Equity Principals\nWarehousing and Storage\nWholesale\nWholesale Alcoholic Beverages\nWholesale Apparel and Sewing Supplies\nWholesale Building Materials\nWholesale Food and Beverage\nWholesale Footwear\nWholesale Import and Export\n\nOutput format:\n\"industries\": [\"Exact Industry Name\"]\n\nrevenueRanges (optional)\nOnly include this field if the user mentions revenue, ARR, turnover, or company size by money.\n\nOutput format:\n\"revenueRanges\": [\n{ \"start\": NUMBER, \"end\": NUMBER }\n]\n\nAllowed predefined ranges:\n0\u20131M\n1M\u201310M\n10M\u201325M\n25M\u201350M\n50M\u2013100M\n100M\u2013250M\n250M\u2013500M\n500M\u20131B\n1B\u201310B\n10B+\n\nAlways choose the closest enclosing range.\nExample: if user says \u201c50\u201360M revenue\u201d, choose 50M\u2013100M.\n\nfundingInfoFilters (optional)\nOnly include this field if the user explicitly mentions funding, VC, rounds, investors, or capital raised.\n\nOutput format:\n\"fundingInfoFilters\": [\n{\n\"lastFundingDateRange\": {\n\"start\": TIMESTAMP,\n\"end\": TIMESTAMP\n},\n\"lastFundingRange\": null\n}\n]\n\nMapping rules:\n\"just funded\" \u2192 All time\n\"funded recently\" \u2192 Last 1 month\n\"funded this year\" \u2192 Last 1 year\n\"funded in last 6 months\" \u2192 Last 6 month\n\"funded few years ago\" \u2192 Last 5 years\n\nUse the current timestamp as the end value.\nUse 0 as the start value for All time.\nIf the user does not mention funding, do not include this field.\n\nlocations (optional)\nOnly include this field if the user mentions company location.\nIgnore locations that clearly apply to contacts or people.\n\nOutput format:\n\"locations\": [\"City, Country\"]\n\nRules:\nUse only city and country.\nDo not include state, region, or continent.\n\nExamples:\n\"New York, United States\"\n\"Berlin, Germany\"\n\ndescriptionKeywords (optional)\nInclude this field if the user describes what companies do or mentions descriptive keywords such as \u201cB2B SaaS\u201d, \u201cfintech\u201d, or \u201cAI platform\u201d.\n\nOutput format:\n\"descriptionKeywords\": [\"keyword1\", \"keyword2\"]\n\nUse short, meaningful phrases.\nLowercase-friendly wording is preferred.\n\ntechnologies (optional)\nOnly include this field if the user explicitly mentions specific technologies, tools, or software.\n\nOutput format:\n\"technologies\": [\"HubSpot\", \"Salesforce\"]\n\nUse exact product or platform names.\nDo not guess or infer technologies.\n\ntechnologyCategories (optional)\nOnly include this field if the user mentions technology in abstract terms such as \u201cCRM\u201d, \u201cemail marketing tools\u201d, \u201canalytics platforms\u201d, or \u201cAI tools\u201d.\n\nOutput format:\n\"technologyCategories\": [\"Customer Relationship Management\"]\n\nYou must choose values only from the predefined TechnologyCategories list provided separately.\nChoose 1 to 3 closest semantic matches.\nNever invent category names.\n\nSTRICT PROHIBITIONS\nDo not include explanations or comments.\nDo not include wrapping text.\nDo not include GraphQL.\nDo not include contactFilter.\nDo not include default or empty fields.\nDo not guess missing information.\n\nFINAL OUTPUT EXAMPLE\n\n{\n\"employeeCountRange\": { \"min\": 200, \"max\": 1000 },\n\"industries\": [\"IT Servies and IT Consulting\"],\n\"revenueRanges\": [{ \"start\": 50000000, \"end\": 100000000 }],\n\"locations\": [\"Berlin, Germany\"]\n}",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "You are a strict JSON generator for LeadIQ companyFilter."
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "96bd25b9-7830-4252-af7c-e2d2412775c6",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        -272
      ],
      "parameters": {
        "color": 7,
        "width": 224,
        "height": 128,
        "content": "## Web Search\nThis agent finds missing company data on the internet.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "13904fd2-fe5b-423e-abdd-ec31a6a87223",
      "name": "Tavily Tool",
      "type": "@tavily/n8n-nodes-tavily.tavilyTool",
      "position": [
        496,
        48
      ],
      "parameters": {
        "query": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Query', ``, 'string') }}",
        "options": {}
      },
      "credentials": {
        "tavilyApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "4c777abb-58ee-4190-832d-763e89047550",
      "name": "Mistral Medium Latest",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        368,
        48
      ],
      "parameters": {
        "model": "mistral-medium-latest",
        "options": {}
      },
      "credentials": {
        "mistralCloudApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "21023249-3ef8-4d1c-a84a-01a760202fdb",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -928,
        -800
      ],
      "parameters": {
        "width": 528,
        "height": 1296,
        "content": "\n\ud83c\udfa5 [Video Trailer \u2013 How It Works](https://vimeo.com/1151100805)\n\n\n## How it Works\n\n1. Start from \"On Chat Message\" Trigger Node. Use a simple prompt to get leads, example: \u00abFounder at software engineering firm, 11-50 people size, based in New York, using AI technologies\u00bb. The workflow has two AI agents that will transform your input into closest existing fiters, so you can make the prompt in your own words;\n\n2. After using Step #1 workflows and creating the contact, search for an email by using Step #2. \n\n\n## Steps Description\n\n###Step #1\n\n1. Pay no attention to the Structured Output Parser error \u2014 it still works. The reason for the error is the GraphQL schema used by the provider.\n\n2. FlatAdvancedSearch (FlatSearchInput) are GraphQL methods used to find a list of people in LeadIQ.\n\n###Step #2\n\n4. Make a separate column in the \u201ccontacts\u201d table of your Airtable CRM and name it \u201ccampaign\u201d \u2014 you need this to identify which contacts in your table to enrich.\n\n5. In the Airtable \u201cSearch records\u2026\u201d node, use the following search by formula: {Campaign} = \"<your campaign name here>\"\n\n6. SearchPeople (SearchPeopleInput) are GraphQL methods used to find emails. This action triggers spending GraphQL credits.\n\n\n## Setup Steps\n\n1. Sign up for Airtable, find a \"Sales CRM\" template (left panel \u2192 templates and apps \u2192 marketing \u2192 \u00absales CRM\u00bb)\n\n2. Set the correct base/sheet in all Airtable nodes; \n\n3. Sign up for LeadIQ (https://leadiq.com), get API string called \u00abSecret Base64 API key\u00bb\n\n4. Set it into all HTTP nodes, make a POST request to URL:  \nhttps://api.leadiq.com/graphql. \nTurn on \u00abSend Headers\u00bb and place the following headers:\n     - Authorization : Basis <your API string here>\n     - Content-Type : application/json;\n\n5. Place the Mistral model according to each MistralAI node\u2019s name. Experimenting with AI models outside of Mistral may break the output of the current agentic prompts.\n\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "cbcf7b3d-336c-4b04-93a6-846e550cfacb",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        160
      ],
      "parameters": {
        "color": 7,
        "width": 384,
        "height": 128,
        "content": "## Airtable Note\nAccount should be an array, even if it's a single record. To add a contact you have to obtaine ID of it's account in array format\n"
      },
      "typeVersion": 1
    },
    {
      "id": "f24f65cf-c484-4867-986e-b634f1dbcc7e",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        -704
      ],
      "parameters": {
        "color": 7,
        "width": 288,
        "height": 144,
        "content": "## Start Here\nStart the workflow by entering a prompt into the chat - describe which leads you want to find.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "2ad66748-8aff-4c7d-8117-4065bc314004",
      "name": "LeadIQ Database (Find People)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        112,
        -176
      ],
      "parameters": {
        "url": "https://api.leadiq.com/graphql",
        "method": "POST",
        "options": {},
        "jsonBody": "={{$json}}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Basic <your API here>"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "bd7e8455-d95f-4161-9475-bec9cab676a4",
      "name": "LeadIQ Database (Find Email)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1280,
        -336
      ],
      "parameters": {
        "url": "https://api.leadiq.com/graphql",
        "method": "POST",
        "options": {},
        "jsonBody": "={{$json}}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Basic <your API here>"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.3
    },
    {
      "id": "8b981a46-72d2-4770-b07d-508d3d8465cc",
      "name": "Mistral Small Latest #1",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        16,
        -432
      ],
      "parameters": {
        "model": "mistral-small-latest",
        "options": {}
      },
      "credentials": {
        "mistralCloudApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "0bf32cf1-318a-40e1-9f51-a1be17cc69d4",
      "name": "Mistral Small Latest #2",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        320,
        -432
      ],
      "parameters": {
        "model": "mistral-small-latest",
        "options": {}
      },
      "credentials": {
        "mistralCloudApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "0ed451ad-fb71-4ce4-8ba3-f7de0b91ca77",
      "name": "Mistral Small Latest #3",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        688,
        -400
      ],
      "parameters": {
        "model": "mistral-small-latest",
        "options": {}
      },
      "credentials": {
        "mistralCloudApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "35c558f2-978b-4f15-b64d-7798b4bf6a44",
      "name": "GraphQL Query #2",
      "type": "n8n-nodes-base.code",
      "position": [
        1504,
        -624
      ],
      "parameters": {
        "jsCode": "const DEFAULT_LIMIT = 1;\n\nreturn $input.all().map(item => {\n  const rawUrl = item.json.LinkedIn || '';\n  const linkedinUrl = encodeURI(rawUrl);\n\n  return {\n    json: {\n      query: `\n        query SearchPeople($input: SearchPeopleInput!) {\n          searchPeople(input: $input) {\n            totalResults\n            hasMore\n            results {\n              _id\n              name {\n                first\n                last\n                fullName\n              }\n              linkedin {\n                linkedinUrl\n              }\n              personalEmails {\n                value\n              }\n              personalPhones {\n                value\n              }\n              currentPositions {\n                title\n                companyId\n              }\n              confidence\n            }\n          }\n        }\n      `,\n      variables: {\n        input: {\n          linkedinUrl,  // correct direct filter\n          limit: DEFAULT_LIMIT\n        }\n      }\n    }\n  };\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "0d356efb-38b4-480d-910c-3a5d6e8f416a",
      "name": "GraphQL Query #1",
      "type": "n8n-nodes-base.code",
      "position": [
        -112,
        -176
      ],
      "parameters": {
        "jsCode": "// Pull AI agent output\nconst agentOutput = $('Filters Summary Agent').first().json.output;\nconst { contactFilter, companyFilter } = agentOutput;\n\n// Country name mapping\nconst countryMapping = {\n  'USA': 'United States',\n  'US': 'United States',\n  'U.S.': 'United States',\n  'U.S.A.': 'United States',\n  'UK': 'United Kingdom',\n  'U.K.': 'United Kingdom',\n};\n\n// Helper function to parse location strings\nfunction parseLocation(locationString) {\n  const parts = locationString.split(',').map(s => s.trim());\n  \n  const locationObj = {};\n  \n  if (parts.length >= 2) {\n    let country = parts[parts.length - 1];\n    country = countryMapping[country] || country;\n    locationObj.country = country;\n    \n    if (parts[0]) {\n      locationObj.city = parts[0];\n    }\n    \n    if (parts.length === 3 && parts[1]) {\n      locationObj.areaLevel1 = parts[1];\n    }\n  }\n  \n  return locationObj;\n}\n\n// Build input\nconst input = {};\n\n// ===== CONTACT FILTER =====\nif (contactFilter) {\n  input.contactFilter = {};\n  \n  if (contactFilter.jobTitles?.length) {\n    input.contactFilter.titles = contactFilter.jobTitles;\n  }\n  \n  if (contactFilter.role?.length) {\n    input.contactFilter.roles = contactFilter.role;\n  }\n  \n  if (contactFilter.seniority?.length) {\n    input.contactFilter.seniorities = contactFilter.seniority;\n  }\n}\n\n// ===== COMPANY FILTER =====\nif (companyFilter) {\n  input.companyFilter = {};\n  \n  // Industries - Software Development exists in LeadIQ\n  if (companyFilter.industries?.length) {\n    input.companyFilter.industries = companyFilter.industries;\n  }\n  \n  // Company locations\n  if (companyFilter.locations?.length) {\n    input.companyFilter.locations = companyFilter.locations.map(parseLocation);\n  }\n  \n  // Employee count range\n  if (companyFilter.employeeCountRange?.min || companyFilter.employeeCountRange?.max) {\n    input.companyFilter.sizes = [{\n      min: companyFilter.employeeCountRange.min,\n      max: companyFilter.employeeCountRange.max,\n    }];\n  }\n  \n  // SKIP technology filters - they don't work correctly in LeadIQ\n  // Instead, use descriptionKeywords for AI-related filtering\n  \n  // Description keywords - use this for \"AI\" filtering\n  if (companyFilter.descriptionKeywords?.length) {\n    input.companyFilter.descriptionKeywords = companyFilter.descriptionKeywords;\n  }\n  \n  // Revenue ranges\n  if (companyFilter.revenueRanges?.length) {\n    input.companyFilter.revenueRanges = companyFilter.revenueRanges;\n  }\n  \n  // Funding info\n  if (companyFilter.fundingInfoFilters?.length) {\n    input.companyFilter.fundingInfoFilters = companyFilter.fundingInfoFilters;\n  }\n}\n\ninput.limit = 1;\ninput.skip = 0;\n\nreturn [{\n  json: {\n    query: `\n      query FlatAdvancedSearch($input: FlatSearchInput!) {\n        flatAdvancedSearch(input: $input) {\n          totalPeople\n          people {\n            id\n            firstName\n            lastName\n            title\n            linkedinUrl\n            workEmails\n            verifiedWorkEmails\n            company {\n              name\n              industry\n              employeeCount\n              domain\n            }\n          }\n        }\n      }\n    `,\n    variables: { input }\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "eddaefec-8d54-4161-854b-05dbd6b2e759",
      "name": "Output Divider (Three Parts)",
      "type": "n8n-nodes-base.code",
      "position": [
        688,
        -176
      ],
      "parameters": {
        "jsCode": "const raw = $input.first().json.text \n  || $input.first().json.output \n  || $input.first().json;\n\nlet content = String(raw);\n\ncontent = content\n  .replace(/```json/g, \"\")\n  .replace(/```/g, \"\")\n  .trim();\n\nconst parsed = JSON.parse(content);\n\nreturn {\n  items: [\n    {\n      json: parsed\n    }\n  ]\n};\n"
      },
      "typeVersion": 2
    },
    {
      "id": "f05fe412-b055-4f8c-adec-0e89111546af",
      "name": "Contact-Level Search Criteria",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "onError": "continueErrorOutput",
      "position": [
        16,
        -608
      ],
      "parameters": {
        "text": "=SYSTEM / INSTRUCTION PROMPT\nYou are a data extraction agent for a B2B lead search system.\nYour task is to analyze a free-text user query describing people they want to find and convert it into a structured contact filter compatible with LeadIQ (LeadIQ.com) GraphQL search.\nThe output will be consumed programmatically.\nAccuracy and schema compliance are more important than completeness.\n\nUSER INPUT\nAnalyze the following user query:{{ $json.chatInput }}\n\nTARGET SCHEMA (CONTACT FILTERS ONLY)\nYou must extract and return only the fields below.\n1. JobTitles\nType: string[]\nMeaning: Explicit job titles mentioned by the user\nExamples: \"CMO\", \"Founder\", \"Chief Marketing Officer\"\nDo not infer titles that are not explicitly mentioned\n\n2. Role\nType: string[]\nMust contain only values from this allowed list\nPick one or more if clearly implied\n\nAllowed values:\nAccounting\nAdministrative\nAnalytics\nArts & Design\nBanking, Biotechnology\nBranding\nBusiness\nBusiness Development\nCivil Engineering & Construction\nCommunity & Social Services\nConsultant\nCustomer Success\nEducation\nEngineering\nEntertainment\nEntrepreneurship\nEnvironmental Services\nFilm & Video\nFinance\nHealthcare Services\nHuman Resources\nInformation Security\nInformation Technology\nLegal\nManufacturing\nMarketing\nMedia & Communications\nMilitary & Protective Services\nMusic\nOperations\nOther\nPharmaceuticals\nProduct Management\nProgram & Project Management\nPurchasing\nQuality Assurance\nReal Estate\nRecruiting\nResearch\nRetail\nSales\nSolutions Engineering\nSupply Chain\nSupport\nTravel\n\nMapping rules:\n\u201cCMO\u201d, \u201cmarketing leader\u201d \u2192 Marketing\n\u201cFounder\u201d, \u201cCo-founder\u201d \u2192 Entrepreneurship\n\u201cCTO\u201d, \u201cEngineer\u201d \u2192 Engineering\nIf multiple roles apply, return all relevant ones\nIf unclear, omit the field\n\n\n3. Seniority\nType: string[]\nMust contain only values from this list\n\nAllowed values:\nExecutive\nVP\nDirector\nManager\nSenior Individual Contributor\nOther\n\nMapping rules:\nFounder, C-level \u2192 Executive\nVP \u2192 VP\nHead of / Director \u2192 Director\nManager \u2192 Manager\nSenior IC, Lead \u2192 Senior Individual Contributor\n\n4. Location\nType: string[]\nFormat: \"City, Country\"\nExample: \"New York, United States\"\nExtract only if explicitly mentioned\nDo not guess or expand regions (e.g. \u201cUS\u201d, \u201cEurope\u201d \u2192 ignore)\n\n\nSTRICT RULES\n\u274c Do not invent data\n\u274c Do not include values outside the allowed lists\n\u274c Do not include comments, explanations, metadata, or formatting text\n\u274c Do not return nulls or empty strings\n\u2705 Omit fields entirely if no valid value is found\n\u2705 Output must be valid JSON only\n\nOUTPUT FORMAT (EXACT)\n\n{\n  \"jobTitles\": [],\n  \"role\": [],\n  \"seniority\": [],\n  \"locations\": []\n}\n\nInclude only fields that have at least one value.\n",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "You are a user inquiry analysing assistant"
            }
          ]
        },
        "promptType": "define"
      },
      "retryOnFail": false,
      "typeVersion": 1.7
    },
    {
      "id": "38c445e5-e18b-4e84-83fa-0f65dea226b8",
      "name": "Filters Summary Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "onError": "continueErrorOutput",
      "position": [
        672,
        -608
      ],
      "parameters": {
        "text": "=User provided search preferences via chat input that is analyzed by AI agents responsible for contact and company data preparation.\nYour task is to convert them into structured LeadIQ filters.\n\nContact-level input:\n{{ $('Contact-Level Search Criteria').item.json.text }}\nCompany-level input:\n{{ $json.text }}\n\nAvailable filters:\n\nContact filters:\n- jobTitles: string[]\n- functions: string[]\n- locations: string[]\n- seniority: string[]\n\nCompany filters:\n- employeeCountRange: { min: number, max: number }\n- industries: string[]\n- locations: string[]\n- descriptionKeywords: string[]\n- revenueRanges: {\"start\": number, \"end\": number}\n- fundingInfoFilters: [\n  {\n    \"lastFundingDateRange\": {\n      \"start\": TIMESTAMP,\n      \"end\": TIMESTAMP\n    },\n    \"lastFundingRange\": null\n  }\n]\n- technologies: string[]\n- technologyCategories: string[]\n\nRules:\n- Use ONLY the fields listed above\n- Do NOT invent new fields\n- Do NOT include empty or null fields\n- Output valid JSON only\n- Match data types exactly\n\nOutput format:\n{\n  \"contactFilters\": {},\n  \"companyFilters\": {}\n}",
        "options": {
          "systemMessage": "You are a LeadIQ search filter builder."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3
    },
    {
      "id": "845a8bf3-c1f3-42e4-9da0-bbf55a477ea0",
      "name": "Search and Filter Records by Campaign ",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1280,
        -624
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "<Name of your Base>"
        },
        "sort": {
          "property": [
            {
              "field": "Opportunities"
            }
          ]
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "Contacts"
        },
        "options": {},
        "operation": "search",
        "filterByFormula": "{Campaign} = \"your campaign column data\""
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "c5049218-0d4d-412b-93c9-49dcae473269",
      "name": "Update Record",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1504,
        -336
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "<Name of your Base>"
        },
        "table": {
          "__rl": true,
          "mode": "id",
          "value": "Contacts"
        },
        "columns": {
          "value": {
            "id": "={{ $('Search and Filter Records by Campaign ').item.json.id }}",
            "VIP": false,
            "Email": "=",
            "Phone": "={{ $json.data.searchPeople.results[0].personalPhones[0].value }}",
            "Title": "={{ $json.data.searchPeople.results[0].currentPositions[4].title }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "Name & organization",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Name & organization",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Account",
              "type": "array",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Account",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "VIP",
              "type": "boolean",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "VIP",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Phone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Title",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Department",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "Marketing",
                  "value": "Marketing"
                },
                {
                  "name": "EMEA operations",
                  "value": "EMEA operations"
                },
                {
                  "name": "Design",
                  "value": "Design"
                },
                {
                  "name": "Customer success",
                  "value": "Customer success"
                },
                {
                  "name": "Human resources",
                  "value": "Human resources"
                }
              ],
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Department",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LinkedIn",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "LinkedIn",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Interactions",
              "type": "array",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Interactions",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Opportunities",
              "type": "array",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Opportunities",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Campaign",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Campaign",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "19e887c1-58b0-41a4-bfb4-e5494cb970ce",
      "name": "Get Record",
      "type": "n8n-nodes-base.airtable",
      "position": [
        112,
        272
      ],
      "parameters": {
        "id": "={{ $json.id }}",
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "<Name of your Base>"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "Accounts"
        },
        "options": {}
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "224c67b1-1406-48f5-9a0d-645e6e24c817",
  "connections": {
    "Get Record": {
      "main": [
        [
          {
            "node": "Return an Array for Account",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tavily Tool": {
      "ai_tool": [
        [
          {
            "node": "Web Enrichment Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Open Mistral 7B": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "GraphQL Query #1": {
      "main": [
        [
          {
            "node": "LeadIQ Database (Find People)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GraphQL Query #2": {
      "main": [
        [
          {
            "node": "LeadIQ Database (Find Email)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Web Enrichment Agent": {
      "main": [
        [
          {
            "node": "Output Divider (Three Parts)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filters Summary Agent": {
      "main": [
        [
          {
            "node": "GraphQL Query #1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Medium Latest": {
      "ai_languageModel": [
        [
          {
            "node": "Web Enrichment Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Small Latest #1": {
      "ai_languageModel": [
        [
          {
            "node": "Contact-Level Search Criteria",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Small Latest #2": {
      "ai_languageModel": [
        [
          {
            "node": "Company-level data preparation",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Small Latest #3": {
      "ai_languageModel": [
        [
          {
            "node": "Filters Summary Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Airtable: Create Account": {
      "main": [
        [
          {
            "node": "Get Record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Filters Summary Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Contact-Level Search Criteria",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Return an Array for Account": {
      "main": [
        [
          {
            "node": "Add Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LeadIQ Database (Find Email)": {
      "main": [
        [
          {
            "node": "Update Record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Output Divider (Three Parts)": {
      "main": [
        [
          {
            "node": "Airtable: Create Account",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Contact-Level Search Criteria": {
      "main": [
        [
          {
            "node": "Company-level data preparation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LeadIQ Database (Find People)": {
      "main": [
        [
          {
            "node": "Web Enrichment Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Company-level data preparation": {
      "main": [
        [
          {
            "node": "Filters Summary Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search and Filter Records by Campaign ": {
      "main": [
        [
          {
            "node": "GraphQL Query #2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

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

B2B companies, including: Founders Marketing and sales professionals Recruiters involved in people search and B2B outreach

Source: https://n8n.io/workflows/12562/ — 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 comprehensive workflow automates the complete financial document processing pipeline using AI. Upload invoices via chat, drop expense receipts into a folder, or add bank statements - the system a

Chat Trigger, HTTP Request, Google Sheets +8
AI & RAG

This template attempts to create an AI-powered content assistant for WordPress sites using Mistral AI, enabling article recommendations, content summarization, and contextual Q&A capabilities.

Chat Trigger, Output Parser Structured, Agent +10
AI & RAG

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

Google Gemini Chat, HTTP Request Tool, Chat Trigger +8
AI & RAG

This Chatbot automates the process of discovering job openings and generating tailored job application emails.

Chat Trigger, OpenAI Chat, Mcp Client Tool +12
AI & RAG

This workflow creates an AI-powered chatbot that generates custom songs through an interactive conversation, then uploads the results to Google Drive.

Chat Trigger, Google Gemini Chat, Memory Buffer Window +7