{
  "id": "lEahCCYb0SYbOHZw",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Data enrichment from business company email",
  "tags": [],
  "nodes": [
    {
      "id": "82ba0b3a-1553-49c2-a4ac-1287e76d5a70",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5712,
        1648
      ],
      "parameters": {
        "width": 576,
        "height": 496,
        "content": "## Data enrichment from business company email\n\nThis workflow automates data enrichment for business leads starting from a list of company emails stored in Google Sheets. It extracts the company domain from each email, crawls the corresponding website, and uses Google Gemini AI to extract structured business information (e.g., VAT number, address, social media URLs). Finally, it updates the original Google Sheet with the enriched data, processing leads in batches with delays to avoid rate limits.\n\n### How it works\n\nThe provided workflow contains no nodes, so there is no executable automation to analyze or group. No triggers, processing steps, or outputs are defined on the canvas.\n\n### Setup steps\n\n- Add at least one trigger node to start the workflow.\n- Add processing and output nodes as needed, then reconnect them into a complete flow.\n- Configure any required credentials after the relevant service nodes are added.\n\n### Customization\n\nOnce nodes are added, groups can be organized around the trigger, processing, integrations, and output/error-handling clusters."
      },
      "typeVersion": 1
    },
    {
      "id": "547abe2d-ad99-47c5-b023-40e9c6c4de48",
      "name": "Post Crawling Request",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueErrorOutput",
      "position": [
        -3952,
        2384
      ],
      "parameters": {
        "url": "http://xx.xx.xx.xx:11235/crawl",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"urls\": [\n    \"{{ $json.url }}\"\n  ],\n  \"crawler_config\": {\n    \"type\": \"CrawlerRunConfig\",\n    \"params\": {\n      \"scraping_strategy\": {\n        \"type\": \"LXMLWebScrapingStrategy\",\n        \"params\": {}\n      },\n      \"markdown_generator\": {\n        \"type\": \"DefaultMarkdownGenerator\",\n        \"params\": {}\n      },\n      \"stream\": false\n    }\n  }\n}",
        "sendBody": true,
        "specifyBody": "json"
      },
      "typeVersion": 4.2
    },
    {
      "id": "206a9b8c-ee84-494a-8104-44ebfec35bb4",
      "name": "Manual Execution Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -5232,
        2288
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "88816e8c-bc3b-4e95-a881-1ce28cabc075",
      "name": "Extract Information",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        -3296,
        2016
      ],
      "parameters": {
        "text": "={{ $json.results[0].cleaned_html }}",
        "options": {},
        "attributes": {
          "attributes": [
            {
              "name": "company",
              "required": true,
              "description": "Company name"
            },
            {
              "name": "vat_number",
              "required": true,
              "description": "VAT Number"
            },
            {
              "name": "address",
              "required": true,
              "description": "Full physical address of the company"
            },
            {
              "name": "city",
              "required": true,
              "description": "City of the company"
            },
            {
              "name": "phone",
              "required": true,
              "description": "Company phone number with international prefix (without the + character)"
            },
            {
              "name": "facebook",
              "required": true,
              "description": "Facebook URL"
            },
            {
              "name": "instagram",
              "required": true,
              "description": "Instagram URL"
            },
            {
              "name": "linkedin",
              "required": true,
              "description": "LinkedIn URL"
            },
            {
              "name": "youtube",
              "required": true,
              "description": "YouTube URL"
            },
            {
              "name": "state",
              "required": true,
              "description": "State/province code (2 letters)"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "2ea5e491-2ef5-4ca6-a91b-364b6d9d2dca",
      "name": "Use Google Gemini Chat",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -3344,
        2144
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "f3a0a3f0-44a2-4545-b1ec-f25e24c8d728",
      "name": "Parse Structured Output",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -3184,
        2608
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"categoria\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"descrizione\": {\n\t\t\t\"type\": \"string\"\n\t\t}\n\t}\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "e1092a0d-afb8-47b9-8b81-57a1856e60c2",
      "name": "Google Gemini Interaction",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -3424,
        2608
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.5-flash"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "cf07c359-172e-4a6b-8345-eacd7ceb7f09",
      "name": "Process in Batches of 10",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -4608,
        2288
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "7aee7236-43d8-4b9c-b728-5844b16ee713",
      "name": "Wait 60 Seconds",
      "type": "n8n-nodes-base.wait",
      "position": [
        -1488,
        2416
      ],
      "parameters": {
        "amount": 60
      },
      "typeVersion": 1.1
    },
    {
      "id": "fc4fd310-3ae4-41cc-ace3-2a1a0ce97fbc",
      "name": "Merge Combined Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        -2304,
        2208
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineAll"
      },
      "typeVersion": 3.2
    },
    {
      "id": "ecd8a887-861c-4206-ad9b-2271057408b5",
      "name": "Update Row in Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -3760,
        2592
      ],
      "parameters": {
        "columns": {
          "value": {
            "Enrichment": "x",
            "row_number": "={{ $('Process in Batches of 10').item.json.row_number }}"
          },
          "schema": [
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Tag",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Tag",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Sector",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Sector",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Description",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Company",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "VAT Number",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "VAT Number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Address",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Address",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "City",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "City",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "State",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "State",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Phone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Linkedin",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Linkedin",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Facebook",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Facebook",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Instagram",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Instagram",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Youtube",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Youtube",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Enrichment",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Enrichment",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1p6yky4upD0zK96pG-ycjHCRwjTiuttJpAJ5MVeIB2Rs/edit#gid=0",
          "cachedResultName": "Foglio1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1J-fP0oiryKG7bSejLLyvJhNQ3iHztDmVc-0fFd0CZZI",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1J-fP0oiryKG7bSejLLyvJhNQ3iHztDmVc-0fFd0CZZI/edit?usp=drivesdk",
          "cachedResultName": "Data enrichment from website"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "d246053d-6279-4881-96b2-74fce41546ac",
      "name": "Structured Output HTML",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -2736,
        2864
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"categoria\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"descrizione\": {\n\t\t\t\"type\": \"string\"\n\t\t}\n\t}\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "8326ff68-5fd2-4d53-a78c-6f950edfbe6d",
      "name": "Gemini Chat HTML",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -2960,
        2864
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.5-flash"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "85fc3c93-307b-496f-863a-5755d4edf0e8",
      "name": "Set Email Field",
      "type": "n8n-nodes-base.set",
      "position": [
        -4368,
        2288
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0cde3900-a12b-4e94-8296-089e20facada",
              "name": "email",
              "type": "string",
              "value": "={{ $json.Email }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "76567771-5a82-4aa5-99b1-5cb783755c08",
      "name": "Set Company URL",
      "type": "n8n-nodes-base.set",
      "position": [
        -4192,
        2288
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "66b97a9a-8c73-4027-b79d-570d559d0f44",
              "name": "url",
              "type": "string",
              "value": "=https://{{ $json.email.split('@')[1] }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "aef521d3-10ec-4db5-b2fa-fd64f9e6c16e",
      "name": "Set Markdown Field",
      "type": "n8n-nodes-base.set",
      "position": [
        -3632,
        2368
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "bb9e7a90-4a52-42f3-9bf8-e67a5407d081",
              "name": "md",
              "type": "string",
              "value": "={{ $json.results[0].markdown.markdown_with_citations }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "2676fbe4-8473-4956-b6e1-db8e422e7520",
      "name": "Analyze HTML Content",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "onError": "continueErrorOutput",
      "position": [
        -2912,
        2608
      ],
      "parameters": {
        "text": "={{ $('Post Crawling Request').item.json.results[0].html }}",
        "options": {
          "systemMessage": "ou are a business analyst specialized in company classification.\n\nYou will receive the markdown content of a company's homepage.\n\nYour task is to analyze the content and return a JSON object with exactly these two fields:\n\n* \"category\": the most appropriate category from this exact list:\n  \"Industry & Manufacturing\", \"Construction & Furniture\", \"Fashion & Luxury\", \"Food & Beverage\", \"Healthcare & Medical\", \"Retail & Ecommerce\", \"Technology & Software\", \"Professional Services\", \"Logistics & Transportation\", \"Energy & Environment\", \"Tourism & Hospitality\", \"Real Estate\", \"Finance & Insurance\", \"Education & Training\", \"Agriculture & Agribusiness\", \"Media & Entertainment\", \"Public Administration\", \"Telecommunications\", \"Nonprofit & Associations\", \"Automotive & Mobility\"\n\n* \"description\": a concise description (max 2 sentences) of what the company does, written in Italian, using a neutral and professional tone.\n\nRules:\n\n* Return ONLY valid JSON, no markdown, no backticks, no extra text.\n* If the content is ambiguous, choose the closest category.\n* If the content is insufficient to determine the category, use \"Professional Services\" as the fallback category.\n\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "a87a7097-4d87-44ab-94ce-f819064964fb",
      "name": "Update Lead in Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1984,
        2208
      ],
      "parameters": {
        "columns": {
          "value": {
            "City": "={{ $json.output.city }}",
            "Phone": "={{ $json.output.phone }}",
            "State": "={{ $json.output.state }}",
            "Sector": "={{ $json.output.sector }}",
            "Address": "={{ $json.output.address }}",
            "Company": "={{ $json.output.company }}",
            "Website": "={{ $('Set Company URL').item.json.url }}",
            "Youtube": "={{ $json.output.youtube }}",
            "Facebook": "={{ $json.output.facebook }}",
            "Linkedin": "={{ $json.output.linkedin }}",
            "Instagram": "={{ $json.output.instagram }}",
            "Enrichment": "x",
            "VAT Number": "={{ $json.output.vat_number }}",
            "row_number": "={{ $('Process in Batches of 10').item.json.row_number }}",
            "Description": "={{ $json.output.description }}"
          },
          "schema": [
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Tag",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Tag",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Sector",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Sector",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Description",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Company",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "VAT Number",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "VAT Number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Address",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Address",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "City",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "City",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "State",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "State",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Phone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Linkedin",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Linkedin",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Facebook",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Facebook",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Instagram",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Instagram",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Youtube",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Youtube",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Enrichment",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Enrichment",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1p6yky4upD0zK96pG-ycjHCRwjTiuttJpAJ5MVeIB2Rs/edit#gid=0",
          "cachedResultName": "Foglio1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1J-fP0oiryKG7bSejLLyvJhNQ3iHztDmVc-0fFd0CZZI",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1J-fP0oiryKG7bSejLLyvJhNQ3iHztDmVc-0fFd0CZZI/edit?usp=drivesdk",
          "cachedResultName": "Data enrichment from website"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "0e2c14a1-6049-4d1f-ac50-c71657db8f40",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5088,
        2192
      ],
      "parameters": {
        "color": 7,
        "width": 448,
        "height": 304,
        "content": "First [Clone this Sheet](https://docs.google.com/spreadsheets/d/1J-fP0oiryKG7bSejLLyvJhNQ3iHztDmVc-0fFd0CZZI/edit?usp=sharing). A manual trigger starts the workflow, reading rows from a Google Sheet that contains at least an email column and a marker for enrichment status.\n\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "cce4c872-9c4f-4de1-ad3a-900e8448ebc4",
      "name": "Read Leads from Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -4944,
        2288
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "Enrichment"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1J-fP0oiryKG7bSejLLyvJhNQ3iHztDmVc-0fFd0CZZI/edit#gid=0",
          "cachedResultName": "Foglio1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1J-fP0oiryKG7bSejLLyvJhNQ3iHztDmVc-0fFd0CZZI",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1J-fP0oiryKG7bSejLLyvJhNQ3iHztDmVc-0fFd0CZZI/edit?usp=drivesdk",
          "cachedResultName": "Data enrichment from website"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "9bbe2dd6-3c70-4940-b831-06245db097ca",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4048,
        2288
      ],
      "parameters": {
        "color": 7,
        "width": 336,
        "height": 272,
        "content": "An HTTP Request node sends a POST request to a crawling service  to fetch and clean the website HTML and markdown."
      },
      "typeVersion": 1
    },
    {
      "id": "82f9c093-05ea-4b67-97ef-211f12ad8c6f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3408,
        1904
      ],
      "parameters": {
        "color": 7,
        "width": 496,
        "height": 256,
        "content": "The cleaned HTML is passed to a Google Gemini model via an informationExtractor node, which extracts structured fields (company name, VAT number, address, city, phone, social media links, state)."
      },
      "typeVersion": 1
    },
    {
      "id": "cd9f38ca-bdfa-45ac-b4cb-dffafe6cee88",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3408,
        2320
      ],
      "parameters": {
        "color": 7,
        "width": 480,
        "height": 224,
        "content": "Markdown content is sent to another Gemini agent to classify the company into a predefined sector "
      },
      "typeVersion": 1
    },
    {
      "id": "5994dc66-c461-487f-b8dd-564b0a409436",
      "name": "Analyze Markdown Content",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "onError": "continueErrorOutput",
      "position": [
        -3328,
        2400
      ],
      "parameters": {
        "text": "={{ $json.md }}",
        "options": {
          "systemMessage": "You are a business analyst specialized in company classification.\n\nYou will receive the markdown content of a company's homepage.\n\nYour task is to analyze the content and return a JSON object with exactly these two fields:\n\n* \"category\": the most appropriate category from this exact list:\n  \"Industry & Manufacturing\", \"Construction & Furniture\", \"Fashion & Luxury\", \"Food & Beverage\", \"Healthcare & Medical\", \"Retail & Ecommerce\", \"Technology & Software\", \"Professional Services\", \"Logistics & Transportation\", \"Energy & Environment\", \"Tourism & Hospitality\", \"Real Estate\", \"Finance & Insurance\", \"Education & Training\", \"Agriculture & Agribusiness\", \"Media & Entertainment\", \"Public Administration\", \"Telecommunications\", \"Nonprofit & Associations\", \"Automotive & Mobility\"\n\n* \"description\": a concise description (max 2 sentences) of what the company does, written in Italian, using a neutral and professional tone.\n\nRules:\n\n* Return ONLY valid JSON, no markdown, no backticks, no extra text.\n* If the content is ambiguous, choose the closest category.\n* If the content is insufficient to determine the category, use \"Professional Services\" as the fallback category.\n\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "441b2a7c-7b71-4a19-9fb8-26aced779b66",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2400,
        2096
      ],
      "parameters": {
        "color": 7,
        "width": 592,
        "height": 304,
        "content": "A final Google Sheets node updates the original row with all enriched fields (company, VAT number, address, sector, description, social URLs, etc.) and sets the Enrichment column to \u201cx\u201d to mark completion."
      },
      "typeVersion": 1
    },
    {
      "id": "804b9325-d3eb-4f3a-b529-aacc481e7d9b",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5104,
        1408
      ],
      "parameters": {
        "color": 7,
        "width": 736,
        "height": 736,
        "content": "## MY NEW YOUTUBE CHANNEL\n\ud83d\udc49 [Subscribe to my new **YouTube channel**](https://youtube.com/@n3witalia). Here I\u2019ll share videos and Shorts with practical tutorials and **FREE templates for n8n**.\n\n[![image](https://n3wstorage.b-cdn.net/n3witalia/youtube-n8n-cover.jpg)](https://youtube.com/@n3witalia)"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "4e1ff303-3cd2-43e1-a556-4cfe3e507ed3",
  "connections": {
    "Set Company URL": {
      "main": [
        [
          {
            "node": "Post Crawling Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Email Field": {
      "main": [
        [
          {
            "node": "Set Company URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 60 Seconds": {
      "main": [
        [
          {
            "node": "Process in Batches of 10",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini Chat HTML": {
      "ai_languageModel": [
        [
          {
            "node": "Analyze HTML Content",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Set Markdown Field": {
      "main": [
        [
          {
            "node": "Analyze Markdown Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Information": {
      "main": [
        [
          {
            "node": "Merge Combined Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Combined Data": {
      "main": [
        [
          {
            "node": "Update Lead in Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Row in Sheet": {
      "main": [
        [
          {
            "node": "Process in Batches of 10",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze HTML Content": {
      "main": [
        [
          {
            "node": "Merge Combined Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Post Crawling Request": {
      "main": [
        [
          {
            "node": "Extract Information",
            "type": "main",
            "index": 0
          },
          {
            "node": "Set Markdown Field",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Row in Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Lead in Sheets": {
      "main": [
        [
          {
            "node": "Wait 60 Seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Leads from Sheets": {
      "main": [
        [
          {
            "node": "Process in Batches of 10",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output HTML": {
      "ai_outputParser": [
        [
          {
            "node": "Analyze HTML Content",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Use Google Gemini Chat": {
      "ai_languageModel": [
        [
          {
            "node": "Extract Information",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Parse Structured Output": {
      "ai_outputParser": [
        [
          {
            "node": "Analyze Markdown Content",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Markdown Content": {
      "main": [
        [
          {
            "node": "Merge Combined Data",
            "type": "main",
            "index": 1
          }
        ],
        [
          {
            "node": "Analyze HTML Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Execution Trigger": {
      "main": [
        [
          {
            "node": "Read Leads from Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process in Batches of 10": {
      "main": [
        [],
        [
          {
            "node": "Set Email Field",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Interaction": {
      "ai_languageModel": [
        [
          {
            "node": "Analyze Markdown Content",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}