Skip to main content

Build Gmail contact database with GPT-5 Nano, Brave Search & Google Sheets

Workflow preview

Workflow preview
100%
Build Gmail contact database with GPT-5 Nano, Brave Search & Google Sheets preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Transform your Gmail sent folder into a comprehensive, enriched contact database automatically. This workflow processes hundreds or thousands of sent emails, extracting and enriching contact inform...

Best for

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

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.splitinbatches, n8n-nodes-base.removeduplicates, n8n-nodes-base.noop, n8n-nodes-base.wait, n8n-nodes-base.httprequest, n8n-nodes-base.code, @brave/n8n-nodes-brave-search.bravesearch

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Václav Čikl.

Original n8n.io source

1.1 Workflow description

Title
Build Gmail contact database with GPT-5 Nano, Brave Search & Google Sheets
Workflow name
Build Gmail contact database with GPT-5 Nano, Brave Search & Google Sheets

Overview

Transform your Gmail sent folder into a comprehensive, enriched contact database automatically. This workflow processes hundreds or thousands of sent emails, extracting and enriching contact information using AI and web search – saving days of manual work.

What This Workflow Does

  1. Loads sent Gmail messages and extracts basic contact information
  2. Deduplicates contacts against your existing Google Sheets database
  3. Searches for email conversation history with each contact
  4. AI-powered extraction from email threads (phone, socials, websites)
  5. Fallback web search via Brave API when no email history exists
  6. Saves enriched data to Google Sheets with all discovered contact details

Perfect For

  • Musicians & bands organizing booker/venue contacts
  • Freelancers & agencies building client databases
  • Sales teams enriching prospect lists from outbound campaigns
  • Consultants creating structured contact databases from years of emails

Key Features

Intelligent Two-Path Enrichment

  • Path A (Email History): Analyzes existing email threads to extract contact details from signatures and message content
  • Path B (Web Search): Falls back to Brave API search + HTML scraping when no email history exists

AI-Powered Data Extraction

Uses GPT-5 Nano to intelligently parse:

  • Phone numbers
  • Website URLs
  • LinkedIn profiles
  • Instagram, Twitter, Facebook, Youtube, TikTok, LinkTree, BandCamp...
  • Alternative email addresses

Built-in Deduplication

Prevents duplicate entries by checking existing Google Sheets records before processing.

Free-Tier Friendly

Runs entirely on free tiers:

  • Gmail API (free)
  • OpenAI GPT-5 Nano (cost-effective)
  • Brave Search API (2,000 free searches/month)
  • Google Sheets (free)

Setup Requirements

Required Accounts & Credentials

  1. Gmail Account - OAuth2 credentials for Gmail API access
  2. OpenAI API Key - For GPT-5 Nano model
  3. Brave Search API Key - Free tier (2,000 searches/month)
  4. Google Sheets - OAuth2 credentials

Google Sheets Structure

Create a Google Sheet with these columns (see template link):

Template Sheet: Make a copy here

How to Use

  1. Clone this workflow to your n8n instance
  2. Configure credentials for Gmail, OpenAI, Brave Search, and Google Sheets
  3. Create/connect your Google Sheet using the template structure
  4. Run manually to process all sent emails and build your initial database
  5. Review results in Google Sheets - enriched with discovered contact info

First Run Tips

  • Start with a smaller Gmail query (e.g., last 6 months) to test
  • Check Brave API quota before processing large volumes
  • Manual trigger means you control when processing happens
  • Processing time varies based on email volume (typically 2-5 seconds per contact)

Customization Ideas

Extend the Enrichment

  • Include company information parsing
  • Extract job titles from email signatures

Automate Regular Updates

  • Convert manual trigger to scheduled trigger
  • Process only recent sent emails for incremental updates
  • Add email notification when new contacts are added

Integration Options

  • Push enriched contacts to CRM (HubSpot, Salesforce)
  • Send Slack notifications for high-value contacts
  • Export to Airtable for relational database features

Improve Accuracy

  • Add human-in-the-loop review for uncertain extractions
  • Implement confidence scoring for AI-extracted data
  • Add validation checks for phone numbers and URLs

Use Case Example

Music Promoter Building Venue Database:

  • Processed 1,835 sent emails to bookers and venues
  • AI extracted contact details from 60% via email signatures
  • Brave search found websites for remaining 40%
  • Final database: 1,835 enriched contacts ready for outreach
  • Time saved: ~40 hours of manual data entry

Technical Notes

  • Rate Limiting: Brave API free tier = 2,000 searches/month
  • Duplicates: Handled at workflow start, not during processing
  • Empty Results: Stores email + name even when enrichment fails
  • Model: Uses GPT-5 Nano for cost-effective parsing
  • Gmail Scope: Reads sent emails only (not inbox)

Cost Estimate

For processing 1,000 contacts:

  • Gmail API: Free
  • GPT-5 Nano: ~$0.50-2 (depending on email length)
  • Brave Search: Free (within 2K/month limit)
  • Google Sheets: Free
  • Total: Under $2 for 1,000 enriched contacts

Template Author:

Questions or need help with setup? 📧 Email:[email protected] 💼 LinkedIn:https://www.linkedin.com/in/vaclavcikl/

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 - When clicking ‘Execute workflow’

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

Block 2 - Loop Over Items

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

Block 3 - Remove Duplicates

Type / Role
n8n-nodes-base.removeDuplicates - removeDuplicates
Config choices
Version 2

Block 4 - No Operation, do nothing

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

Block 5 - 3s

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

Block 6 - GetHTML

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

Block 7 - MailParser

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - HTMLParser

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - SearchWebsite

Type / Role
@brave/n8n-nodes-brave-search.braveSearch - braveSearch
Config choices
Version 1

Block 10 - Loop Over Items1

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

Block 11 - No Operation, do nothing1

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

Block 12 - InboxMessages?

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

Block 13 - ValidDomain?

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

Block 14 - GetInboxMessages

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

Block 15 - SelectTo&CC

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

Block 16 - LoadSentMessages

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

Block 17 - WriteToDB

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

Block 18 - SelectImportantFields

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

Block 19 - Information Extractor

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

Block 20 - OpenAI Chat Model

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

Block 21 - Merge

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 22 - HaveClusters

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

Block 23 - ReturnContactFromMailParser

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 24 - GetClusters1

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Showing the first 24 of 32 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Build Gmail contact database with GPT-5 Nano, Brave Search & Google Sheets
Complexity advanced
Nodes 32
Categories Lead Generation, AI Summarization
Author Václav Čikl
Published 12 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10778/10778.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 Build Gmail contact database with GPT-5 Nano, Brave Search & Google Sheets do?

Transform your Gmail sent folder into a comprehensive, enriched contact database automatically. This workflow processes hundreds or thousands of sent emails, extracting and enriching contact inform...

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, AI Summarization use case.