An end-to-end n8n automation for discovering technology and SaaS companies, extracting decision-maker information using AI, enriching contact details, storing leads in Google Sheets, and sending personalized outreach emails through Gmail.
The workflow combines Firecrawl + Google Gemini + Google Sheets + Gmail + n8n to automate the lead-generation and outreach pipeline.
This repository contains the workflow structure only.
You must connect your own API keys, OAuth credentials, Google Sheet, and Gmail account.
The automation performs the following pipeline:
Daily Trigger
|
v
Search Technology / SaaS Leads
|
v
Split Search Results
|
v
Scrape Company Website
|
v
Extract Company & Contact Information
|
v
Check for Email
|
v
Search for Contact Page
|
v
Scrape Contact Page
|
v
Extract Contact Information
|
v
Save Lead to Google Sheets
|
v
Send Outreach Email
|
v
Mark Lead as Done
The goal is to reduce repetitive manual work involved in:
- Finding potential technology/SaaS companies
- Scraping company websites
- Finding founders, CTOs and technology decision makers
- Extracting emails and phone numbers
- Maintaining a lead database
- Sending outreach emails
- Automated web lead discovery
- Website scraping using Firecrawl -? AI-powered information extraction using Google Gemini
- Contact Founder / CTO / technology decision-maker extraction
- Email Email extraction
- Phone Phone number extraction
- Links LinkedIn URL extraction
- Company Company and industry extraction
- Update Contact-page recovery when the first scrape does not provide a contact
- Sheets Automatic Google Sheets lead storage
- Email Gmail outreach automation
- Schedule Scheduled daily execution
- Docker Docker-based local n8n deployment
- Security Credentials remain with the user instead of being stored in this repository
Daily Trigger
|
v
Firecrawl Search
|
v
Split Results
|
v
Scrape Website
|
v
Gemini Extraction
|
v
Check for Email
|
v
Contact Search
|
v
Contact Scraping
|
v
Gemini Contact Extraction
|
v
Google Sheets
|
v
Gmail Outreach
|
v
Mark Lead Done
| Technology | Purpose |
|---|---|
| n8n | Workflow automation |
| Docker | Local deployment |
| Firecrawl | Web search and website scraping |
| Google Gemini | AI-based information extraction |
| Google Sheets | Lead database |
| Gmail | Email outreach |
| GitHub | Workflow distribution |
Before starting, install:
- Docker Desktop
- Git
- A Google account
- Firecrawl account
- Google Cloud project
You do not need to install Python or Node.js to run the workflow.
Clone the repository:
git clone https://github.com/maddycode5/n8n-lead_outreach_agent.git
cd n8n-lead_outreach_agentStart n8n:
docker compose up -dCheck that the container is running:
docker psYou should see an n8n container running.
Open n8n:
http://localhost:5678
docker compose downdocker compose restartThe included Docker Compose configuration uses a persistent Docker volume so that your n8n data survives container restarts.
This workflow uses the Firecrawl community node.
Inside n8n:
Settings
v
Community Nodes
v
Install
Install:
@mendable/n8n-nodes-firecrawl
After installation, restart n8n if required.
Create an account on Firecrawl and generate an API key.
Inside n8n:
Credentials
v
Create Credential
v
Firecrawl
Configure your Firecrawl credential using your own API key.
The workflow uses Firecrawl for:
- Web search
- Company website scraping
- Contact page discovery
- Contact page scraping
Never place your Firecrawl API key directly inside the workflow JSON or commit it to GitHub.
The workflow uses Google Gemini for extracting structured information from scraped webpages.
Create a Gemini / Google AI credential in n8n and connect it to the Gemini Chat Model nodes.
The workflow contains two extraction stages:
Extracts information such as:
company_name
website
founder_owner
cto_technology_decision_maker
job_title
email
phone
linkedin_url
location
industry
The second extraction stage attempts to recover:
contact_name
job_title
email
phone
linkedin_url
from the company's contact page.
Create a Google Sheet that will store your leads.
Recommended columns:
company_name
website
contact_name
job_title
email
phone
linkedin_url
location
industry
Create a Google Sheets credential in n8n and authenticate using your Google account.
Then open:
Save Lead to Sheet
and select your own:
- Google account
- Spreadsheet
- Sheet
The workflow will write extracted lead information into the sheet.
Create a Gmail credential in n8n and authenticate your Gmail account.
Open:
Email Tech Lead
and connect your Gmail credential.
The workflow sends outreach emails using the email address extracted from the lead.
Before enabling automatic outreach, test the workflow using an email address that you control.
This allows you to verify:
- Email formatting
- Subject
- Recipient
- Extracted lead information
- Gmail authentication
If you are running n8n locally and configuring Google OAuth manually, your redirect URL will generally be:
http://localhost:5678/rest/oauth2-credential/callback
Add this URL to your Google OAuth application's authorized redirect URIs.
For a local development setup, make sure the Google OAuth application and test users are configured correctly.
The workflow is located at:
workflows/lead-outreach.json
Inside n8n:
Workflows
v
Import from File
v
Select workflows/lead-outreach.json
After importing, open the workflow and configure the credentials.
After importing the workflow, check every node that uses an external service.
You will need to connect your own credentials for:
Firecrawl
Google Gemini
Google Sheets
Gmail
The workflow logic and expressions are already configured.
You should not need to rebuild the workflow from scratch.
Before activating the workflow, test the nodes individually.
Recommended testing order:
1. Search Tech Leads
2. Split Results
3. Scrape Lead Page
4. Gemini Lead Extraction
5. Contact Search
6. Contact Page Scraping
7. Gemini Contact Extraction
8. Google Sheets
9. Gmail
Verify that the extracted data contains:
Company
Website
Contact
Job Title
Email
Phone
LinkedIn
Location
Industry
Then perform a complete end-to-end test.
The included workflow uses a daily schedule.
Default configuration:
Trigger Interval: Days
Days Between Triggers: 1
Trigger Hour: Midnight
Trigger Minute: 0
Therefore, the workflow is configured to run once every day.
For automatic execution:
- Keep Docker running.
- Keep the n8n container running.
- Activate the workflow in n8n.
You can change the schedule according to your requirements.
The Firecrawl search node contains the search query used for discovering leads.
You can modify the query according to your target market.
For example:
Indian SaaS startups
or:
Indian AI startups founders CTO
or:
B2B SaaS companies technology decision makers
You can customize:
- Geography
- Industry
- Company size
- Technology
- Target customer
- Decision-maker type
n8n-lead_outreach_agent/
|
|-- workflows/
| `-- lead-outreach.json
|
|-- docker-compose.yml
|-- .gitignore
`-- README.md
The exported n8n workflow.
Docker configuration for running n8n locally.
Prevents common credentials, secrets, local files and generated files from being committed.
Project documentation and setup instructions.
Never commit credentials to GitHub.
Do not commit:
.env
API keys
OAuth client secrets
Access tokens
Refresh tokens
Private keys
Credential JSON files
Passwords
Credentials should be configured inside your own n8n instance.
This repository is designed so that users can download/import the workflow while keeping their own credentials private.
If you accidentally expose an API key:
- Revoke the exposed key immediately.
- Generate a new key.
- Remove the secret from the repository/history if necessary.
- Update your n8n credential.
This workflow is intended for legitimate lead-generation and business outreach.
When using automated scraping and email outreach:
- Respect website terms of service.
- Respect robots.txt and applicable scraping restrictions.
- Follow applicable privacy and data-protection laws.
- Do not collect unnecessary personal information.
- Do not send spam.
- Respect unsubscribe requests.
- Use appropriate email-sending limits.
- Verify that your outreach complies with applicable regulations.
You are responsible for how you configure and use this workflow.
Check Docker:
docker psIf the container is stopped:
docker compose up -dCheck logs:
docker compose logs -f n8nCheck which process is using port 5678.
Alternatively, change the port mapping in:
docker-compose.yml
For example:
ports:
- "5679:5678"Then access:
http://localhost:5679
Check:
- Firecrawl API key
- Firecrawl credential
- Internet connection
- Firecrawl account/API limits
Make sure the credential is connected to the Firecrawl nodes.
Check:
- Google/Gemini API credentials
- API access
- Selected Gemini model
- Credential connected to the Gemini Chat Model
Check:
- Google Cloud project
- Required APIs
- OAuth consent configuration
- Test users
- Authorized redirect URI
For local n8n, the callback is:
http://localhost:5678/rest/oauth2-credential/callback
Check:
- Google Sheets credential
- Spreadsheet ID
- Sheet name
- Column names
- Node execution data
Test the Google Sheets node independently before running the complete workflow.
If you modify the workflow locally:
git statusAdd changes:
git add .Commit:
git commit -m "Update lead outreach workflow"Push:
git pushContributions are welcome.
You can:
- Improve the workflow
- Add new lead sources
- Improve extraction logic
- Add additional enrichment
- Improve documentation
- Report bugs
- Suggest new features
Fork the repository, make your changes, and open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
If this project is useful, consider giving the repository a Star on GitHub.
n8n + Firecrawl + Google Gemini + Google Sheets + Gmail + Docker
- Workflow: Tech Lead Outreach Agent
- Workflow ID: dS8IJWOMaHszEDQr
- Node count: 25
- Connection count: 27
- Generated: 2026-10-13 14:12:46
- Daily Scrape
- Daily Scrape - scheduleTrigger
- Search Tech Leads - @mendable/n8n-nodes-firecrawl.firecrawl
- Split Results - splitOut
- Scrape Lead Page - @mendable/n8n-nodes-firecrawl.firecrawl
- Scrape Succeeded - if
- Has Email - if
- Prepare Lead Data - set
- Save Lead to Sheet - googleSheets
- Email Tech Lead - gmail
- Mark Lead Done - googleSheets
- Prepare Contact Search - set
- Find Contact Page - @mendable/n8n-nodes-firecrawl.firecrawl
- Contact URL Found? - if
- Scrape Contact Page - @mendable/n8n-nodes-firecrawl.firecrawl
- Contact Scrape Succeeded - if
- Has Contact Email - if
- Prepare Recovered Lead Data - set
- Google Gemini Chat Model - @n8n/n8n-nodes-langchain.lmChatGoogleGemini
- Information Extractor - @n8n/n8n-nodes-langchain.informationExtractor
- Google Gemini Chat Model1 - @n8n/n8n-nodes-langchain.lmChatGoogleGemini
- Information Extractor2 - @n8n/n8n-nodes-langchain.informationExtractor
- Prepare Duplicate Check - set
- Read Existing Lead - googleSheets
- Code in JavaScript - code
- Merge - merge