Prospection automatisée de prospects B2B basée sur RapidAPI, Hunter.io, GPT et Gmail

Avancé

Ceci est unLead Generation, Multimodal AIworkflow d'automatisation du domainecontenant 21 nœuds.Utilise principalement des nœuds comme If, Set, Code, Html, Gmail. Prospection automatisée de prospects B2B basée sur RapidAPI, Hunter.io, GPT et Gmail

Prérequis
  • Compte Google et informations d'identification Gmail API
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
  • Clé API OpenAI
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
{
  "meta": {
    "instanceId": "8599d7845a778242eb2b590f9276e0b22e25a242e7728a8fa6887cb7c35c668a"
  },
  "nodes": [
    {
      "id": "5aeaafb8-ecf0-482f-aff8-07cac51b5fef",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1160,
        160
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5-nano-2025-08-07",
          "cachedResultName": "gpt-5-nano-2025-08-07"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "QrtszTAQelTLppHh",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "c6c57e72-d4d3-4421-b915-20369d4be3c5",
      "name": "recherche_entreprise",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -380,
        20
      ],
      "webhookId": "64da8fef-966f-43e5-8ba2-f64b1a8f879a",
      "parameters": {
        "options": {},
        "formTitle": "compagny_search",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Business Sector",
              "placeholder": "[ engineering ]",
              "requiredField": true
            },
            {
              "fieldLabel": "city",
              "placeholder": "[ London ]"
            },
            {
              "fieldLabel": "Number of Leads",
              "placeholder": "[ 20 ]"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "b13ac03b-4bb5-4264-91b3-e0c03765bc94",
      "name": "Rechercher Entreprises Locales",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        60,
        20
      ],
      "parameters": {
        "url": "https://local-business-data.p.rapidapi.com/search",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "query",
              "value": "={{ $json[\"Business Sector\"] }} {{ $json.city }}"
            },
            {
              "name": "limit",
              "value": "={{ $json[\"Number of Leads\"] }}"
            },
            {
              "name": "zoom",
              "value": "13"
            },
            {
              "name": "language",
              "value": "fr"
            },
            {
              "name": "region",
              "value": "fr"
            },
            {
              "name": "extract_emails_and_contacts",
              "value": "false"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "x-rapidapi-host",
              "value": "local-business-data.p.rapidapi.com"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "gXkUK6CJRdlslxOy",
          "name": "local_business_data"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "66a87c7e-b194-4358-8b54-2ed949bd87bd",
      "name": "Séparer les Entreprises",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -140,
        260
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "data"
      },
      "typeVersion": 1
    },
    {
      "id": "d5228b9a-a0ac-4366-83d2-6143f5fcd7dc",
      "name": "Si Site Web Existe",
      "type": "n8n-nodes-base.if",
      "position": [
        80,
        260
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "b86f0175-b755-49c1-becc-e3e6ca4747b4",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.website }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "e2298683-1c78-461d-a6f3-a51ad5760ff9",
      "name": "Extraire Site Web",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        380,
        -180
      ],
      "parameters": {
        "url": "={{ $json.website }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {}
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "d8319ac4-a8bc-4659-93c3-d762b2e60c1e",
      "name": "Si Extraction Réussie",
      "type": "n8n-nodes-base.if",
      "position": [
        420,
        40
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "324f2d98-a187-43bd-be7b-2ce74333d1a9",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ !$json.hasOwnProperty('error') }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ef9347c3-543d-4c80-aa27-ab01989197b1",
      "name": "Extraire Titre et Description",
      "type": "n8n-nodes-base.html",
      "position": [
        620,
        -200
      ],
      "parameters": {
        "options": {},
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "scraped_title",
              "cssSelector": "title"
            },
            {
              "key": "scraped_description",
              "attribute": "content",
              "cssSelector": "meta[name=\"description\"]",
              "returnValue": "attribute"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "485ba79a-899f-45d5-a701-51a1ab8c678a",
      "name": "Trouver Contacts (Hunter)",
      "type": "n8n-nodes-base.hunter",
      "position": [
        620,
        40
      ],
      "parameters": {
        "limit": 10,
        "domain": "={{ $('Split Out Businesses').item.json.tld }}",
        "filters": {}
      },
      "credentials": {
        "hunterApi": {
          "id": "bX3XAndw3GntxnxS",
          "name": "Hunter account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "45d46c83-22a5-45ab-9151-ea5eb48a136e",
      "name": "Séparer les Contacts",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        840,
        -200
      ],
      "parameters": {
        "include": "allOtherFields",
        "options": {},
        "fieldToSplitOut": "value"
      },
      "typeVersion": 1
    },
    {
      "id": "82e9a446-fdf9-44b8-832d-ed0cf4329dbe",
      "name": "Si Contact Est Valide",
      "type": "n8n-nodes-base.if",
      "position": [
        840,
        60
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "7e49f6e9-2024-4bb7-9010-76c14446f6fd",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.first_name }}",
              "rightValue": ""
            },
            {
              "id": "1405a866-f79f-4293-88f1-cde8fa48e0ea",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Find Contacts (Hunter)').item.json.verification.status }}",
              "rightValue": "valid"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "64081640-91a1-4110-a0b7-688f8ed458e4",
      "name": "Générer Corps d'Email (IA)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1160,
        -40
      ],
      "parameters": {
        "text": "=Here is the information about your target :\n\n- Contact firstname : {{ $json.first_name }}\n- Jobtittle : {{ $json.position }}\n- Compagny name: {{ $('If Website Exists').item.json.name }}\n- Website Tittle : \"{{ $('Extract Title & Description').item.json.scraped_title }}\"\n- Website Description : \"{{ $('Extract Title & Description').item.json.scraped_description }}\"\n\n\n",
        "options": {
          "systemMessage": "=You are an expert in B2B sales prospecting, writing impactful outreach emails for the company [ Your_Compagny ] ([YOUR_COMPAGNY_WEBSITE]). \n\nYour mission: Write a short (about 100 words), friendly, and professional email. The goal is to generate interest for a potential project in automation, technical SEO, and customer acquisition campaigns. \nStart with a personalized hook based on their website's title or description. Show you've done your research. \nAddress the person according to their job title. \n\nEnd with a simple, open-ended question to encourage a reply. The output must ONLY be the email body in plain text. Do NOT start with 'Hello [First Name],' and do NOT sign off at the end."
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "c21fff57-d1c0-444a-96b8-42e9d9efcb43",
      "name": "Formater Sortie IA",
      "type": "n8n-nodes-base.code",
      "position": [
        1560,
        -40
      ],
      "parameters": {
        "jsCode": "// On récupère tous les items en entrée sous forme de tableau.\n// Dans votre cas, ce sera un tableau avec un seul item.\nconst items = $items();\n\n// On utilise .map() pour créer un nouveau tableau avec les items modifiés.\n// C'est la méthode la plus propre et la plus sûre.\nconst newItems = items.map(item => {\n  // On récupère les données JSON de l'item en cours\n  const json = item.json;\n  \n  // On récupère le texte brut généré par l'IA, qui est dans le champ 'output'\n  const rawText = json.output;\n\n  // On initialise une variable pour le texte formaté\n  let formattedText = \"\";\n\n  // On vérifie que le texte existe bien avant de le traiter\n  if (rawText && typeof rawText === 'string') {\n    const sentences = rawText.match(/[^.!?]+[.!?]*/g) || [];\n    formattedText = sentences\n      .map(s => s.trim())\n      .filter(s => s.length > 0)\n      .join('\\n\\n');\n  }\n\n  // On retourne un NOUVEL objet item, formaté comme n8n l'attend.\n  // On copie toutes les anciennes données (...json) et on ajoute notre nouveau champ.\n  return {\n    json: {\n      ...json,\n      formatted_text: formattedText\n    }\n  };\n});\n\n// On retourne le nouveau tableau d'items. C'est la sortie attendue par n8n.\nreturn newItems;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "f2541c58-120a-48a1-a8ff-4e2429b0f377",
      "name": "Assembler Email Final",
      "type": "n8n-nodes-base.set",
      "position": [
        1340,
        220
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0d2f01ce-0d10-41c0-99ff-2ac2ba70abef",
              "name": "email_subject",
              "type": "string",
              "value": "=Developing the business of {{ $('If Website Exists').item.json.name }}"
            },
            {
              "id": "fbcfb7dc-53f4-4653-8464-dc26fd190c0f",
              "name": "email_body",
              "type": "string",
              "value": "=Hi {{ $('Split Out Contacts').item.json.first_name }},  \n\n{{ $json.formatted_text }}\n\nDear,\n"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "6d25c563-2351-4f78-96ac-00e750197ffc",
      "name": "Envoyer Email (Gmail)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1580,
        220
      ],
      "webhookId": "878900b6-d826-43bd-ac24-568d70097eab",
      "parameters": {
        "sendTo": "={{ $('Find Contacts (Hunter)').item.json.value }}",
        "message": "={{ $json.email_body }}",
        "options": {},
        "subject": "={{ $json.email_subject }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "d1E1TwOxZdNe1Ttn",
          "name": "Jimmy"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "074804f9-e975-4a2a-90b9-de682d0e68cd",
      "name": "Définir Données Tâche",
      "type": "n8n-nodes-base.set",
      "position": [
        440,
        660
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "15424ccb-ff6d-4aa4-83d6-247a55023ffe",
              "name": "phone_number",
              "type": "string",
              "value": "={{ $json.phone_number }}"
            },
            {
              "id": "7f78f42f-414a-4e2e-b493-3c35ad9586bd",
              "name": "compagny_name",
              "type": "string",
              "value": "={{ $json.name }}"
            },
            {
              "id": "6a561bd7-42c2-4078-99d7-706f41f41636",
              "name": "adress",
              "type": "string",
              "value": "={{ $json.full_address }}"
            },
            {
              "id": "6682a516-030d-40b4-b14a-fd54fa3222a0",
              "name": "type",
              "type": "string",
              "value": "={{ $json.type }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "df43e879-9b1c-4eb1-8ee4-c2e21a6db8a4",
      "name": "Créer Tâche Google pour Suivi",
      "type": "n8n-nodes-base.googleTasks",
      "position": [
        1060,
        660
      ],
      "parameters": {
        "task": "MTI3OTk4MTA0ODg4NDY1ODkwMTc6MDow",
        "title": "=Appeler {{ $json.compagny_name }} au {{ $json.phone_number }} Pour création de site web ! ",
        "additionalFields": {}
      },
      "credentials": {
        "googleTasksOAuth2Api": {
          "id": "TmbvD4TKaMPnNqMQ",
          "name": "Google Tasks account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ef60a1bc-b42f-4e9a-a151-dc61b0b91616",
      "name": "Note Adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -420
      ],
      "parameters": {
        "width": 1560,
        "height": 620,
        "content": "## Quick Start & Required Setup\n\n\n### Welcome! This workflow finds local businesses, identifies contacts, and sends them a personalized email.\n\n**Action Required - Setup Credentials**:\nBefore you start, you must connect your own accounts. This workflow requires:\n\n**RapidAPI**: On the Search Local Businesses node, add a \"Header Auth\" credential with your x-rapidapi-key.\n\n**Hunter.io**: On the Find Contacts (Hunter) node, add your \"Hunter Credential\".\n\n**OpenAI**: On the OpenAI Chat Model node, add your \"OpenAI Credential\".\n\n**Gmail**: On the Send Email (Gmail) node, add your \"Gmail Credential\".\n\n**Google Tasks**: On the Create Google Task for Follow-up node, add your \"Google Tasks Credential\".\n\nOnce set up, fill this form and click \"Test Workflow\" to run it."
      },
      "typeVersion": 1
    },
    {
      "id": "e9eabba1-a027-49c4-8b55-554325be9bea",
      "name": "Note Adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1020,
        -420
      ],
      "parameters": {
        "color": 4,
        "width": 980,
        "height": 960,
        "content": "## Customize Your Outreach\n\n### This is where you personalize your sales pitch.\n\n**Action Required - Customize Content :**\n\nAI Prompt: In this node's options, edit the \"System Message\" to describe your company, your website, and your services. This is crucial for generating relevant emails.\n\nEmail Signature: Go to the Assemble Final Email node and edit the email_body expression to add your professional signature."
      },
      "typeVersion": 1
    },
    {
      "id": "3b6ca027-27ce-4843-9258-d3bd1872b7df",
      "name": "Note Adhésive2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        220
      ],
      "parameters": {
        "color": 5,
        "width": 1560,
        "height": 320,
        "content": "## Workflow Logic Overview\n\n### How this workflow operates:\n\nIt searches for businesses using your criteria.\n\nIf a website exists, it scrapes the title and description for context.\n\nIt then finds valid contacts for that company using Hunter.io.\n\nAn AI generates a personalized email, which is then sent.\n\nIf no website is found, a task is created in Google Tasks for manual follow-up."
      },
      "typeVersion": 1
    },
    {
      "id": "355635c9-3ed0-49a8-aec4-731111c3dae5",
      "name": "Note Adhésive3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        560
      ],
      "parameters": {
        "width": 2560,
        "height": 320,
        "content": "## Configure Manual Follow-up\n\n### This node handles leads that require manual action (e.g., no website found).\n\n**Action Required :**\n\nEnsure your Google account is connected.\n\nImportant: You must select your own \"Task List\" from the dropdown menu for this node to work correctly."
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "074804f9-e975-4a2a-90b9-de682d0e68cd": {
      "main": [
        [
          {
            "node": "df43e879-9b1c-4eb1-8ee4-c2e21a6db8a4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e2298683-1c78-461d-a6f3-a51ad5760ff9": {
      "main": [
        [
          {
            "node": "d8319ac4-a8bc-4659-93c3-d762b2e60c1e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c6c57e72-d4d3-4421-b915-20369d4be3c5": {
      "main": [
        [
          {
            "node": "b13ac03b-4bb5-4264-91b3-e0c03765bc94",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c21fff57-d1c0-444a-96b8-42e9d9efcb43": {
      "main": [
        [
          {
            "node": "f2541c58-120a-48a1-a8ff-4e2429b0f377",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d5228b9a-a0ac-4366-83d2-6143f5fcd7dc": {
      "main": [
        [
          {
            "node": "e2298683-1c78-461d-a6f3-a51ad5760ff9",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "074804f9-e975-4a2a-90b9-de682d0e68cd",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5aeaafb8-ecf0-482f-aff8-07cac51b5fef": {
      "ai_languageModel": [
        [
          {
            "node": "64081640-91a1-4110-a0b7-688f8ed458e4",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "45d46c83-22a5-45ab-9151-ea5eb48a136e": {
      "main": [
        [
          {
            "node": "82e9a446-fdf9-44b8-832d-ed0cf4329dbe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "82e9a446-fdf9-44b8-832d-ed0cf4329dbe": {
      "main": [
        [
          {
            "node": "64081640-91a1-4110-a0b7-688f8ed458e4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f2541c58-120a-48a1-a8ff-4e2429b0f377": {
      "main": [
        [
          {
            "node": "6d25c563-2351-4f78-96ac-00e750197ffc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "66a87c7e-b194-4358-8b54-2ed949bd87bd": {
      "main": [
        [
          {
            "node": "d5228b9a-a0ac-4366-83d2-6143f5fcd7dc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d8319ac4-a8bc-4659-93c3-d762b2e60c1e": {
      "main": [
        [
          {
            "node": "ef9347c3-543d-4c80-aa27-ab01989197b1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "485ba79a-899f-45d5-a701-51a1ab8c678a": {
      "main": [
        [
          {
            "node": "45d46c83-22a5-45ab-9151-ea5eb48a136e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b13ac03b-4bb5-4264-91b3-e0c03765bc94": {
      "main": [
        [
          {
            "node": "66a87c7e-b194-4358-8b54-2ed949bd87bd",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "64081640-91a1-4110-a0b7-688f8ed458e4": {
      "main": [
        [
          {
            "node": "c21fff57-d1c0-444a-96b8-42e9d9efcb43",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ef9347c3-543d-4c80-aa27-ab01989197b1": {
      "main": [
        [
          {
            "node": "485ba79a-899f-45d5-a701-51a1ab8c678a",
            "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é ?

Avancé - 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.

Informations sur le workflow
Niveau de difficulté
Avancé
Nombre de nœuds21
Catégorie2
Types de nœuds13
Description de la difficulté

Adapté aux utilisateurs avancés, avec des workflows complexes contenant 16+ nœuds

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34