Skip to main content

Lead generation agent

Workflow preview

Workflow preview
100%
Lead generation agent preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Who this is for This workflow is for digital marketing agencies or sales teams who want to automatically find business leads based on industry & location, gather their contact details, and send per...

Best for

  • Lead Generation automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.formtrigger, n8n-nodes-base.httprequest, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.informationextractor, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.filter, n8n-nodes-base.googlesheets, n8n-nodes-base.if

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Rakin Jakaria.

Original n8n.io source

1.1 Workflow description

Title
Lead generation agent
Workflow name
Lead generation agent

Who this is for

This workflow is for digital marketing agencies or sales teams who want to automatically find business leads based on industry & location, gather their contact details, and send personalized cold emails — all from one form submission.


What this workflow does

This workflow starts every time someone submits the Lead Machine Form. It then:

  • Scrapes business data (company name, website, phone, address, category) using Apify based on business type & location.
  • Extracts the best email address from each business website using Google Gemini AI.
  • Stores valid leads in Google Sheets.
  • Generates cold email content (subject + body) with AI based on your preferred tone (Friendly, Professional, Simple).
  • Sends the cold email via Gmail.
  • Updates the sheet with send status & timestamp.

Setup

To set this workflow up:

  1. Form Trigger – Customize the “Lead Machine” form fields if needed (Business Type, Location, Lead Number, Email Style).
  2. Apify API – Add your Apify Actor Endpoint URL in the HTTP Request node.
  3. Google Gemini – Add credentials for extracting email addresses.
  4. Google Sheets – Connect your sheet for storing leads & email status.
  5. OpenAI – Add your credentials for cold email generation.
  6. Gmail – Connect your Gmail account for sending cold emails.

How to customize this workflow to your needs

  • Change the AI email prompt to reflect your brand’s voice and offer.
  • Add filters to only target leads that meet specific criteria (e.g., website must exist, email must be verified).
  • Modify the Google Sheets structure to track extra info like “Follow-up Date” or “Lead Source”.
  • Switch Gmail to another email provider if preferred.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - On form submission

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.2

Block 2 - HTTP Request

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 3 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Information Extractor

Type / Role
@n8n/n8n-nodes-langchain.informationExtractor - informationExtractor
Config choices
Version 1.2

Block 5 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 6 - Filter

Type / Role
n8n-nodes-base.filter - filter
Config choices
Version 2.2

Block 7 - Append row in sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 8 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 9 - No Operation, do nothing

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 10 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Send a message

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 12 - Information Extractor1

Type / Role
@n8n/n8n-nodes-langchain.informationExtractor - informationExtractor
Config choices
Version 1.2

Block 13 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 14 - Append or update row in sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 15 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Edit Fields1

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 17 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 18 - Wait

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 19 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Lead generation agent
Complexity advanced
Nodes 20
Categories Lead Generation, Multimodal AI
Author Rakin Jakaria
Published 15 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7423/7423.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Lead generation agent do?

Who this is for This workflow is for digital marketing agencies or sales teams who want to automatically find business leads based on industry & location, gather their contact details, and send per...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Generation, Multimodal AI use case.