Génération de prospects

Intermédiaire

Ceci est unLead Generation, Multimodal AIworkflow d'automatisation du domainecontenant 9 nœuds.Utilise principalement des nœuds comme Set, Code, HttpRequest, GoogleSheets, ManualTrigger. Extraire les informations de contact commerciales de Google Maps vers Google Sheets avec des expressions régulières

Prérequis
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
  • Informations d'identification Google Sheets API
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "k0SRvELJY6Ec1q75",
  "meta": {
    "instanceId": "c6fffa5bc1b2dcfd92357a5ec64832af921376f0ee8e89f229233d1ed315a8c1",
    "templateCredsSetupCompleted": true
  },
  "name": "Lead Generation",
  "tags": [],
  "nodes": [
    {
      "id": "ee70b334-c29f-41f3-9427-367c20c43fda",
      "name": "Lors du clic sur 'Tester le workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1104,
        1584
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "bef87be5-29b5-483e-a684-326f0aaa278e",
      "name": "Définir les champs du formulaire",
      "type": "n8n-nodes-base.set",
      "position": [
        -896,
        1584
      ],
      "parameters": {
        "values": {
          "number": [
            {
              "name": "max_results",
              "value": 10
            }
          ],
          "string": [
            {
              "name": "lead_type",
              "value": "Call centers"
            },
            {
              "name": "location",
              "value": "New York"
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "28aab0fc-50e5-4513-a799-6953836e0a30",
      "name": "Construire l'URL de recherche",
      "type": "n8n-nodes-base.code",
      "position": [
        -688,
        1584
      ],
      "parameters": {
        "jsCode": "const lead = $json.lead_type.replace(/\\s+/g, '+');\nconst loc = $json.location.replace(/\\s+/g, '+');\nreturn {\n  json: {\n    search_url: `https://www.google.com/maps/search/${lead}+in+${loc}`,\n    max_results: $json.max_results\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "5131e56e-f828-45cb-bc57-89564a385a71",
      "name": "Extraire les informations de l'entreprise",
      "type": "n8n-nodes-base.code",
      "position": [
        -288,
        1584
      ],
      "parameters": {
        "jsCode": "const html = $input.first().json.data;\nconst results = [];\nconst businessRegex = /<div[^>]*aria-label=\"([^\"]+)\"/g;\nconst phoneRegex = /(\\+?\\d[\\d\\s\\-]{7,}\\d)/g;\nconst addressRegex = /<div class=\"[^\"]*\">([^<]*, [^<]*)<\\/div>/g;\nconst websiteRegex = /https?:\\/\\/[^\\/\\s\"'>]+/g;\nconst emailRegex = /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.(?!jpeg|jpg|png|gif|webp|svg)[a-zA-Z]{2,}/g;\n\nconst names = [...html.matchAll(businessRegex)].map(m => m[1]);\nconst phones = [...html.matchAll(phoneRegex)].map(m => m[1]);\nconst addresses = [...html.matchAll(addressRegex)].map(m => m[1]);\nconst websites = [...html.matchAll(websiteRegex)];\nconst emails = [...html.matchAll(emailRegex)].map(m => m[0]);\n\nfor (let i = 0; i < names.length; i++) {\n  results.push({\n    json: {\n      name: names[i] || 'N/A',\n      phone: phones[i] || 'N/A',\n      address: addresses[i] || 'N/A',\n      website: websites[i] ? websites[i][0] : 'N/A',\n      email: emails[i] || 'N/A'\n    }\n  });\n}\nreturn results;"
      },
      "typeVersion": 2
    },
    {
      "id": "2b677452-ba15-4d41-8e6c-c4124319b2af",
      "name": "Enregistrer dans Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -80,
        1584
      ],
      "parameters": {
        "columns": {
          "value": {
            "Email": "={{ $json.email }}",
            "Phone": "={{ $json.phone }}",
            "Address": "={{ $json.address }}",
            "Website": "={{ $json.website }}",
            "Business Name": "={{ $json.name }}"
          },
          "mappingMode": "defineBelow"
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "your_google_sheet_id_here"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "p8TFiJI7j90cCF0X",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "56ec4bb5-5b95-41df-9592-f1af7fa2f871",
      "name": "Scraper Google Maps1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -496,
        1584
      ],
      "parameters": {
        "url": "={{ $json.search_url }}",
        "options": {
          "response": {
            "response": {
              "fullResponse": true
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "e3443da1-9709-4c8c-9c26-6e8a904a385b",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1168,
        1216
      ],
      "parameters": {
        "width": 350,
        "height": 324,
        "content": "## 🗺️ STEP 1: Google Maps Data Extraction\n\nThis workflow starts by scraping Google Maps for business listings:\n\n**Process:** Uses HTTP requests to search Google Maps with queries like \"Calgary dentists\"\n**Output:** Raw HTML containing business listings and website URLs\n**Key:** No APIs required - direct HTML scraping\n\n**Note:** Replace search URL with your target location and business type in the set Field"
      },
      "typeVersion": 1
    },
    {
      "id": "dd0fc02d-c6ac-4fde-9464-6c7bb7cafdbc",
      "name": "Note adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -768,
        1216
      ],
      "parameters": {
        "width": 380,
        "height": 312,
        "content": "## 🔗 STEP 2: Website URL Processing\n\nExtracts and cleans business website URLs:\n\n1. **Extract URLs:** JavaScript regex finds all website URLs in Google Maps data\n2. **Filter Google URLs:** Removes irrelevant domains (google.com, gstatic, etc.)\n\n**Result:** Clean list of actual business websites ready for email extraction"
      },
      "typeVersion": 1
    },
    {
      "id": "26270815-b976-456b-b642-a74f90e077fd",
      "name": "Note adhésive2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -336,
        1200
      ],
      "parameters": {
        "width": 400,
        "height": 348,
        "content": "## 📧 STEP 3: Email Extraction & Export\n\nFinal processing pipeline:\n\n1. **Extract Emails:** JavaScript regex finds all email addresses in website HTML\n2. **Filter Out Empties:** Removes websites with no emails found\n3. **Split Out:** Converts email arrays into individual items\n4. **Add to Sheet:** Exports clean email list to Google Sheets\n\n**Result:** Organized database of business emails ready for outreach"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "54a9c9a4-501b-4277-a939-a4b35edde3aa",
  "connections": {
    "bef87be5-29b5-483e-a684-326f0aaa278e": {
      "main": [
        [
          {
            "node": "28aab0fc-50e5-4513-a799-6953836e0a30",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "28aab0fc-50e5-4513-a799-6953836e0a30": {
      "main": [
        [
          {
            "node": "56ec4bb5-5b95-41df-9592-f1af7fa2f871",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "56ec4bb5-5b95-41df-9592-f1af7fa2f871": {
      "main": [
        [
          {
            "node": "5131e56e-f828-45cb-bc57-89564a385a71",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5131e56e-f828-45cb-bc57-89564a385a71": {
      "main": [
        [
          {
            "node": "2b677452-ba15-4d41-8e6c-c4124319b2af",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ee70b334-c29f-41f3-9427-367c20c43fda": {
      "main": [
        [
          {
            "node": "bef87be5-29b5-483e-a684-326f0aaa278e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Intermédiaire - Génération de leads, IA Multimodale

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Workflows recommandés

Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds9
Catégorie2
Types de nœuds6
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Auteur
Yar Malik (Asfandyar)

Yar Malik (Asfandyar)

@yar

AI Automation Expert | AI Call Center with Voho

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34