Skip to main content

Generate and research sales leads with Jina AI & OpenAI email automation via Gmail

Workflow preview

Workflow preview
100%
Generate and research sales leads with Jina AI & OpenAI email automation via Gmail 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’s it for Generate personalized sales leads, ready to send, HTML formatted emails, and send them automatically. This workflow is ideal for sales professionals, marketers, and business developmen...

Best for

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

Tools used

n8n-nodes-base.splitinbatches, n8n-nodes-base.httprequest, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.stickynote, n8n-nodes-base.merge, n8n-nodes-base.wait, n8n-nodes-base.airtable

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Generate and research sales leads with Jina AI & OpenAI email automation via Gmail
Workflow name
Generate and research sales leads with Jina AI & OpenAI email automation via Gmail

Who’s it for

Generate personalized sales leads, ready-to-send, HTML-formatted emails, and send them automatically. This workflow is ideal for sales professionals, marketers, and business development teams aiming to scale their outreach. By automating the tedious tasks of research and email drafting, you can focus on building relationships and closing deals.

How it works

This workflow automates the process of finding sales leads and drafting personalized emails.

  • It starts by pulling a list of unprocessed companies from an Airtable base.
  • For each company, it uses Jina DeepSearch to find key decision-makers, their roles, and email addresses.
  • An AI agent then analyzes the research to identify the best contact and creates a custom, professional cold email.
  • The email's content and subject are evaluated by a second AI agent, which assigns a score from 0-100.
  • If the email scores below 80, it's sent to an Email Re-writer agent for improvement before being evaluated again.
  • Finally, the workflow formats the polished email into an HTML draft in Gmail and updates the Airtable record with the lead information and the outcome.

How to set up

  1. Airtable: Create your Airtable credentials here. Set up an Airtable base with a table that includes the following columns: Company_name, Company_website, Company_e-mail, processed, lead_name, lead_email, email_subject, email_text, email_summary, create_date and a task_result column.
  2. Jina AI: Get an API key from Jina AI and add it to the Jina_API_Key node. You can find more information here.
  3. Gmail: Connect your Gmail account using the Gmail node to allow the workflow to create email drafts. You can find the documentation for the Gmail node here.
  4. OpenAI: This workflow uses the OpenAI nodes (gpt-5-mini model) for the AI agents. You will need to provide your OpenAI API credentials. You can find the API documentation here.
  5. Business Info: Fill in your company's information in the Business_Info node, including your business name, description, key benefits, website URL, target audience, and the desired email language.

Requirements

  • An n8n account
  • Airtable API Key and a base with lead data.
  • Jina AI API Key for the deep search functionality.
  • OpenAI API Key to power the AI agents.
  • A Gmail account connected to n8n.

How to customize the workflow

  • Changing the Score Threshold: The If node is set to a threshold of 80. You can change this to a higher or lower number to control which emails are re-written.
  • Database Integration: Instead of Airtable, you can use a different database like Google Sheets or a CRM by swapping out the Airtable nodes for the corresponding integration nodes.
  • Email Sending: The workflow currently creates drafts in Gmail. You can easily modify the Gmail node to send the emails directly instead of creating drafts, but be cautious with this approach to avoid sending unwanted emails.

Need a Professional and Personalized automation

Contact me

Need Help?

Join the Discord or ask in the Forum!

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 - Loop Over Items

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

Block 2 - Lead Person Research

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

Block 3 - Lead Analyzer

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.6

Block 4 - Structured Output Parser

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

Block 5 - Structured Output Parser3

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

Block 6 - Email Content Creator

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 7 - Sticky Note

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

Block 8 - Merge-Search

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

Block 9 - Wait-5-sec

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

Block 10 - Update record

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

Block 11 - Sticky Note2

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

Block 12 - Wait-8-sec

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

Block 13 - Get input records

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

Block 14 - Merge-loop

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

Block 15 - Sticky Note5

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

Block 16 - Business_Info

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

Block 17 - Jina_API_Key

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

Block 18 - Sticky Note6

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

Block 19 - Sticky Note7

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

Block 20 - Sticky Note8

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

Block 21 - Sticky Note9

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

Block 22 - Sticky Note10

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

Block 23 - If

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

Block 24 - Feedback

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

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

3. Summary Table

Workflow Generate and research sales leads with Jina AI & OpenAI email automation via Gmail
Complexity advanced
Nodes 43
Categories Lead Generation, AI Chatbot
Author FabioInTech
Published 02 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8182/8182.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 Generate and research sales leads with Jina AI & OpenAI email automation via Gmail do?

Who’s it for Generate personalized sales leads, ready to send, HTML formatted emails, and send them automatically. This workflow is ideal for sales professionals, marketers, and business developmen...

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 Chatbot use case.