{
  "name": "Scrape & enrich Google Maps leads with Decodo API and Gemini 3 Flash",
  "nodes": [
    {
      "id": "c54c9e66-ed51-41b3-9be0-c83fafd13965",
      "name": "Parse & Normalize Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -2160,
        368
      ]
    },
    {
      "id": "ef0b0073-f13a-4125-ba73-ba00218a82c3",
      "name": "Split Into Batches",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -1840,
        368
      ]
    },
    {
      "id": "915d6026-d339-491f-a5c7-a0a680c9db30",
      "name": "Save to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1024,
        256
      ]
    },
    {
      "id": "f480c7b4-1c3b-46ed-af0d-c34a00e7bbf8",
      "name": "Filter Hot Leads",
      "type": "n8n-nodes-base.if",
      "position": [
        -800,
        320
      ]
    },
    {
      "id": "e4efe4ba-94d7-4596-85d0-ef04972884a0",
      "name": "Error Handler",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        -3024,
        672
      ]
    },
    {
      "id": "a148649b-de2f-4709-a9ed-b586aa71d595",
      "name": "Result Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -1440,
        384
      ]
    },
    {
      "id": "2974dcdf-0ff7-42d3-b5cb-3ce094f6b45b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2496,
        224
      ],
      "parameters": {
        "width": 528,
        "height": 304,
        "content": "## Data Collection\n\nScrapes Google Maps via Decodo Maps Scrapper API, then parses HTML into structured data including business details, contact info, and coordinates."
      }
    },
    {
      "id": "83a319fe-e5ab-4c1b-9744-60faf5ae357f",
      "name": "2.5 Flash",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -1600,
        384
      ]
    },
    {
      "id": "be7d26d0-b124-486e-bb16-02cd8537ea6d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3072,
        560
      ],
      "parameters": {
        "width": 688,
        "height": 288,
        "content": "## Error Handling\n\nCatches workflow failures, formats error details, sends Telegram alerts to admin."
      }
    },
    {
      "id": "39612ec8-37a8-489a-ba6a-983a95aece58",
      "name": "Lead Enrichment",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -1600,
        256
      ]
    },
    {
      "id": "a2406796-1658-428a-aeec-f88320a6fe3c",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1056,
        112
      ],
      "parameters": {
        "width": 848,
        "height": 432,
        "content": "## Hot Leads Processing\n\nSaves all enriched leads to Sheets. Filters high-quality prospects (score ≥7 with contact info), generates personalized email templates, updates status as \"HOT\"."
      }
    },
    {
      "id": "a292f2b0-da79-40dc-8049-3be70559b52f",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1936,
        112
      ],
      "parameters": {
        "width": 848,
        "height": 432,
        "content": "## AI Enrichment Loop\n\nProcesses leads in batches. Gemini 2.5 Flash analyzes each business to generate value propositions, identify pain points, create outreach hooks, and assign quality scores (1-10)"
      }
    },
    {
      "id": "a814d273-c43d-46b5-92f0-387f68b8240f",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2352,
        560
      ],
      "parameters": {
        "width": 528,
        "height": 288,
        "content": "## Create Decodo Credentials\nService: Decodo Maps Scrapper\nNode: HTTP Request\nURL: https://scraper-api.decodo.com/v2/scrape\nCredential Type: HTTP Header Auth\nHeader Name: Authorization\nHeader Value: B"
      }
    },
    {
      "id": "40f012cf-ffcb-4ab8-b375-1c58a8bac292",
      "name": "Decodo Maps Scraper",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2400,
        368
      ]
    },
    {
      "id": "7b927ca8-69f0-4565-bc1b-631e52b0f0f3",
      "name": "Merge Enrichment Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -1248,
        256
      ]
    },
    {
      "id": "da4b3434-5fba-4c5d-b239-4770286acdbd",
      "name": "Prepare Outreach Message",
      "type": "n8n-nodes-base.set",
      "position": [
        -592,
        336
      ]
    },
    {
      "id": "919d9446-e033-42b6-a2fe-8eb7f0180b11",
      "name": "Save Outreach To Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -400,
        336
      ]
    },
    {
      "id": "8e072a72-0042-4fef-912f-fe2a4ac1fc90",
      "name": "Format Error Message",
      "type": "n8n-nodes-base.code",
      "position": [
        -2800,
        672
      ]
    },
    {
      "id": "2ea4e411-5e49-4d4f-8cf4-ba6dd4868912",
      "name": "Send Error Notification",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -2576,
        672
      ]
    },
    {
      "id": "1dc9988f-ff99-46b7-9558-c94e41be740a",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3072,
        -368
      ],
      "parameters": {
        "width": 1104,
        "height": 544,
        "content": "# Workflow Overview\n## How it works\n\nScrapes Google Maps via Decodo API, enriches each business with AI Agent, scores lead quality (1-10), and generates personalized outreach emails. Hot leads (score "
      }
    },
    {
      "id": "052457f2-99d4-4291-9122-584615f68992",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -2992,
        368
      ]
    },
    {
      "id": "b108d3b9-4224-452d-a89a-ce007761cc40",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2832,
        224
      ],
      "parameters": {
        "width": 304,
        "height": 304,
        "content": "## Input Configuration\n\nSet search query, target country, language, and results limit. Adjust these parameters for different markets or niches."
      }
    },
    {
      "id": "9095d650-d056-4406-a787-a78187e842a9",
      "name": "Set Search Parameters",
      "type": "n8n-nodes-base.set",
      "position": [
        -2736,
        368
      ]
    }
  ],
  "connections": {
    "2.5 Flash": {
      "ai_languageModel": [
        [
          {
            "node": "Lead Enrichment",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Error Handler": {
      "main": [
        [
          {
            "node": "Format Error Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Result Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Lead Enrichment",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Set Search Parameters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lead Enrichment": {
      "main": [
        [
          {
            "node": "Merge Enrichment Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Hot Leads": {
      "main": [
        [
          {
            "node": "Prepare Outreach Message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Split Into Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Into Batches": {
      "main": [
        [],
        [
          {
            "node": "Lead Enrichment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Decodo Maps Scraper": {
      "main": [
        [
          {
            "node": "Parse & Normalize Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Error Message": {
      "main": [
        [
          {
            "node": "Send Error Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Enrichment Data": {
      "main": [
        [
          {
            "node": "Save to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save to Google Sheets": {
      "main": [
        [
          {
            "node": "Filter Hot Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Search Parameters": {
      "main": [
        [
          {
            "node": "Decodo Maps Scraper",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse & Normalize Data": {
      "main": [
        [
          {
            "node": "Split Into Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Outreach To Sheets": {
      "main": [
        [
          {
            "node": "Split Into Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Outreach Message": {
      "main": [
        [
          {
            "node": "Save Outreach To Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}