Back to Catalog

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

FabioInTechFabioInTech
45 views
2/3/2026
Official Page

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!

n8n Workflow: Generate and Research Sales Leads with Jina AI, OpenAI, and Email Automation

This n8n workflow automates the process of generating sales leads, enriching them with research, and initiating personalized email outreach. It leverages AI for lead generation and research, and integrates with Airtable for lead management and Gmail for email communication.

What it does

This workflow streamlines the sales lead process through the following steps:

  1. Manual Trigger / Scheduled Execution: The workflow can be initiated manually or set to run on a schedule, fetching new leads from Airtable.
  2. Fetch New Leads from Airtable: It queries an Airtable base for new leads that are marked for processing.
  3. Loop Over Each Lead: It processes each retrieved lead individually.
  4. AI Agent for Research:
    • An AI Agent (powered by LangChain and OpenAI Chat Model) is used to perform research on the lead.
    • It utilizes a Simple Memory to maintain context during the research process.
    • A Structured Output Parser ensures the AI's output is formatted correctly for subsequent steps.
    • An HTTP Request node likely interacts with an external service (e.g., Jina AI for web scraping or search) to gather information.
  5. Conditional Logic for Research Success: An If node checks if the AI research was successful.
    • If successful:
      • An Edit Fields (Set) node processes the AI's research output.
      • Another Edit Fields (Set) node prepares the data for updating Airtable.
      • The lead's record in Airtable is updated with the research findings.
    • If unsuccessful:
      • The lead's record in Airtable is updated to reflect the failed research.
  6. Merge Research Results: A Merge node combines the successful and unsuccessful research paths back into a single flow.
  7. Generate Personalized Email Draft (AI Agent):
    • A second AI Agent generates a personalized email draft based on the lead's information and research findings.
    • It also uses an OpenAI Chat Model and Simple Memory.
    • A Structured Output Parser formats the email draft.
  8. Conditional Logic for Email Generation Success: An If node checks if the email draft generation was successful.
    • If successful:
      • An Edit Fields (Set) node processes the generated email.
      • The lead's record in Airtable is updated with the email draft.
      • A Wait node introduces a delay before sending the email.
      • Gmail sends the personalized email to the lead.
      • The lead's record in Airtable is updated to mark the email as sent.
    • If unsuccessful:
      • The lead's record in Airtable is updated to indicate the email generation failed.
  9. Merge Email Generation Results: A Merge node combines the successful and unsuccessful email generation paths.
  10. Final Airtable Update: The lead's record in Airtable is updated with the final status of the email outreach.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running n8n instance.
  • Airtable Account: With a base and table set up to store your sales leads.
  • OpenAI API Key: For the AI Agent and OpenAI Chat Model nodes.
  • Jina AI API Key (or similar web scraping/search service): For the HTTP Request node used in the research phase.
  • Gmail Account: Configured as a credential in n8n for sending emails.
  • Airtable Credential: Configured in n8n to connect to your Airtable base.

Setup/Usage

  1. Import the workflow: Download the provided JSON and import it into your n8n instance.
  2. Configure Credentials:
    • Set up your Airtable credential (API Key or OAuth).
    • Set up your OpenAI credential (API Key).
    • Set up your Gmail credential (OAuth 2.0 recommended).
    • Ensure any custom API keys for services like Jina AI are configured within the respective HTTP Request nodes.
  3. Customize Airtable Nodes:
    • Update the "Airtable" nodes to point to your specific Airtable Base ID and Table Name.
    • Adjust the field names in the "Edit Fields (Set)" nodes to match your Airtable schema (e.g., for lead status, research results, email draft, etc.).
  4. Review AI Agent Prompts:
    • Inspect the "AI Agent" nodes and their connected "OpenAI Chat Model" nodes to ensure the prompts align with your desired lead research and email generation strategies.
    • Adjust the "Structured Output Parser" schema if your AI output structure changes.
  5. Activate the workflow: Once configured, activate the workflow. You can then trigger it manually or let it run on its schedule.

Related Templates

Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax

Spark your creativity instantly in any chatβ€”turn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. πŸ“‹ What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing πŸ”§ Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation πŸ”‘ Required Credentials OpenAI API Setup Go to platform.openai.com β†’ API keys (sidebar) Click "Create new secret key" β†’ Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai β†’ Dashboard β†’ API Keys Generate a new API key β†’ Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) βš™οΈ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflowβ€”chat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" 🎯 Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration ⚠️ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions

Daniel NkenchoBy Daniel Nkencho
601

Automate Dutch Public Procurement Data Collection with TenderNed

TenderNed Public Procurement What This Workflow Does This workflow automates the collection of public procurement data from TenderNed (the official Dutch tender platform). It: Fetches the latest tender publications from the TenderNed API Retrieves detailed information in both XML and JSON formats for each tender Parses and extracts key information like organization names, titles, descriptions, and reference numbers Filters results based on your custom criteria Stores the data in a database for easy querying and analysis Setup Instructions This template comes with sticky notes providing step-by-step instructions in Dutch and various query options you can customize. Prerequisites TenderNed API Access - Register at TenderNed for API credentials Configuration Steps Set up TenderNed credentials: Add HTTP Basic Auth credentials with your TenderNed API username and password Apply these credentials to the three HTTP Request nodes: "Tenderned Publicaties" "Haal XML Details" "Haal JSON Details" Customize filters: Modify the "Filter op ..." node to match your specific requirements Examples: specific organizations, contract values, regions, etc. How It Works Step 1: Trigger The workflow can be triggered either manually for testing or automatically on a daily schedule. Step 2: Fetch Publications Makes an API call to TenderNed to retrieve a list of recent publications (up to 100 per request). Step 3: Process & Split Extracts the tender array from the response and splits it into individual items for processing. Step 4: Fetch Details For each tender, the workflow makes two parallel API calls: XML endpoint - Retrieves the complete tender documentation in XML format JSON endpoint - Fetches metadata including reference numbers and keywords Step 5: Parse & Merge Parses the XML data and merges it with the JSON metadata and batch information into a single data structure. Step 6: Extract Fields Maps the raw API data to clean, structured fields including: Publication ID and date Organization name Tender title and description Reference numbers (kenmerk, TED number) Step 7: Filter Applies your custom filter criteria to focus on relevant tenders only. Step 8: Store Inserts the processed data into your database for storage and future analysis. Customization Tips Modify API Parameters In the "Tenderned Publicaties" node, you can adjust: offset: Starting position for pagination size: Number of results per request (max 100) Add query parameters for date ranges, status filters, etc. Add More Fields Extend the "Splits Alle Velden" node to extract additional fields from the XML/JSON data, such as: Contract value estimates Deadline dates CPV codes (procurement classification) Contact information Integrate Notifications Add a Slack, Email, or Discord node after the filter to get notified about new matching tenders. Incremental Updates Modify the workflow to only fetch new tenders by: Storing the last execution timestamp Adding date filters to the API query Only processing publications newer than the last run Troubleshooting No data returned? Verify your TenderNed API credentials are correct Check that you have setup youre filter proper Need help setting this up or interested in a complete tender analysis solution? Get in touch πŸ”— LinkedIn – Wessel Bulte

Wessel BulteBy Wessel Bulte
247

AI multi-agent executive team for entrepreneurs with Gemini, Perplexity and WhatsApp

This workflow is an AI-powered multi-agent system built for startup founders and small business owners who want to automate decision-making, accountability, research, and communication, all through WhatsApp. The β€œvirtual executive team,” is designed to help small teams to work smarter. This workflow sends you market analysis, market and sales tips, It can also monitor what your competitors are doing using perplexity (Research agent) and help you stay a head, or make better decisions. And when you feeling stuck with your start-up accountability director is creative enough to break the barrier 🎯 Core Features πŸ§‘β€πŸ’Ό 1. President (Super Agent) Acts as the main controller that coordinates all sub-agents. Routes messages, assigns tasks, and ensures workflow synchronization between the AI Directors. πŸ“Š 2. Sales & Marketing Director Uses SerpAPI to search for market opportunities, leads, and trends. Suggests marketing campaigns, keywords, or outreach ideas. Can analyze current engagement metrics to adjust content strategy. πŸ•΅οΈβ€β™€οΈ 3. Business Research Director Powered by Perplexity AI for competitive and market analysis. Monitors competitor moves, social media engagement, and product changes. Provides concise insights to help the founder adapt and stay ahead. ⏰ 4. Accountability Director Keeps the founder and executive team on track. Sends motivational nudges, task reminders, and progress reports. Promotes consistency and discipline β€” key traits for early-stage success. πŸ—“οΈ 5. Executive Secretary Handles scheduling, email drafting, and reminders. Connects with Google Calendar, Gmail, and Sheets through OAuth. Automates follow-ups, meeting summaries, and notifications directly via WhatsApp. πŸ’¬ WhatsApp as the Main Interface Interact naturally with your AI team through WhatsApp Business API. All responses, updates, and summaries are delivered to your chat. Ideal for founders who want to manage operations on the go. βš™οΈ How It Works Trigger: The workflow starts from a WhatsApp Trigger node (via Meta Developer Account). Routing: The President agent analyzes the incoming message and determines which Director should handle it. Processing: Marketing or sales queries go to the Sales & Marketing Director. Research questions are handled by the Business Research Director. Accountability tasks are assigned to the Accountability Director. Scheduling or communication requests are managed by the Secretary. Collaboration: Each sub-agent returns results to the President, who summarizes and sends the reply back via WhatsApp. Memory: Context is maintained between sessions, ensuring personalized and coherent communication. 🧩 Integrations Required Gemini API – for general intelligence and task reasoning Supabase- for RAG and postgres persistent memory Perplexity API – for business and competitor analysis SerpAPI – for market research and opportunity scouting Google OAuth – to connect Sheets, Calendar, and Gmail WhatsApp Business API – for message triggers and responses πŸš€ Benefits Acts like a team of tireless employees available 24/7. Saves time by automating research, reminders, and communication. Enhances accountability and strategy consistency for founders. Keeps operations centralized in a simple WhatsApp interface. 🧰 Setup Steps Create API credentials for: WhatsApp (via Meta Developer Account) Gemini, Perplexity, and SerpAPI Google OAuth (Sheets, Calendar, Gmail) Create a supabase account at supabase Add the credentials in the corresponding n8n nodes. Customize the system prompts for each Director based on your startup’s needs. Activate and start interacting with your virtual executive team on WhatsApp. Use Case You are a small organisation or start-up that can not afford hiring; marketing department, research department and secretar office, then this workflow is for you πŸ’‘ Need Customization? Want to tailor it for your startup or integrate with CRM tools like Notion or HubSpot? You can easily extend the workflow or contact the creator for personalized support. Consider adjusting the system prompt to suite your business

ShadrackBy Shadrack
331