Back to Catalog

Automated B2B lead generation & cold emails with OpenAI, Apify, Gmail & Telegram

Adem TasinAdem Tasin
477 views
2/3/2026
Official Page

🧩 Description

A customized n8n workflow inspired by the Lead Generation Agent template.
It automates B2B lead scraping via Apify, extracts contact emails with AI, sends cold emails via Gmail, and logs every interaction in Google Sheets with Telegram alerts for live monitoring.


🧠 How It Works

This workflow automates the entire B2B lead generation and outreach process from data collection to email delivery.
Once you enter your search keyword and location, the system scrapes business details using Apify, filters valid websites, and extracts email addresses with AI. Each lead is then enriched and logged in Google Sheets.

The workflow automatically composes a personalized cold email based on your preferred tone (friendly, simple, or professional) and sends it through Gmail with short delays between each message to avoid spam filters.
You’ll also receive Telegram notifications to monitor progress and any leads that fail to send.


⚙️ Setup Steps

  1. Clone the workflow into your n8n instance.
  2. Add your API credentials:
    • Apify API Token
    • OpenAI (or Gemini) API Key
    • Google Sheets & Gmail account connections
    • Telegram Bot Token + Chat ID (optional)
  3. Open the Form node or Manual Trigger, and set your search criteria (e.g., “marketing agencies in London”).
  4. Configure your Google Sheet — make sure the columns match the node mapping.
  5. Adjust the AI prompt in the OpenAI node if you want a different tone or style for your emails.
  6. Run the workflow manually to test one or two leads first.
  7. Once confirmed, activate scheduling or keep it manual for on-demand lead generation.

🚀 Try It Out!

Experience how AI and automation can take over your lead generation workflow.
Just enter a business type and location, and watch as the system finds potential clients, extracts contact details, crafts a personalized cold email, and sends it — all without manual effort.
Perfect for freelancers, agencies, or anyone looking to automate their B2B outreach process.

Automated B2B Lead Generation & Cold Emails with OpenAI, Apify, Gmail, & Telegram

This n8n workflow automates the process of B2B lead generation, enrichment, and personalized cold email outreach. It leverages AI to extract information, generates email content, and sends emails, with human approval steps integrated via Telegram.

What it does

This workflow streamlines your lead generation and outreach efforts by:

  1. Triggering from a Form Submission: Initiates the workflow when a new form is submitted, likely containing initial lead data.
  2. Extracting Information with AI: Uses an AI-powered Information Extractor (likely Apify or a similar service via HTTP Request) to parse and structure data from the initial lead information.
  3. Enriching Lead Data (via HTTP Request): Makes an HTTP request to an external API (e.g., Apify) to gather more detailed information about the company or contact.
  4. Filtering Leads: Evaluates the enriched data using an "If" node to determine if the lead meets specific criteria for outreach.
  5. Generating Personalized Email Content with AI: For qualified leads, it uses an OpenAI Chat Model to craft a personalized cold email based on the extracted and enriched information.
  6. Human Review via Telegram: Sends the generated email content to a Telegram chat for human review and approval.
  7. Conditional Email Sending: Checks the approval status from Telegram.
  8. Sending Cold Emails: If approved, sends the personalized cold email via Gmail.
  9. Waiting for Follow-up: Includes a "Wait" step, likely to schedule a follow-up action after a specified period (not fully implemented in the provided JSON, but indicated by the node).
  10. Updating Google Sheets: Records the lead information and outreach status in a Google Sheet.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running n8n instance.
  • Google Sheets Account: For storing and managing lead data.
  • Telegram Account: For receiving approval requests and sending messages.
  • OpenAI API Key: For generating personalized email content.
  • Apify Account (or similar API): For company/contact data enrichment (implied by the HTTP Request node and common use cases for such workflows, though not explicitly named in the JSON).
  • Gmail Account: For sending cold emails.

Setup/Usage

  1. Import the Workflow: Download the JSON provided and import it into your n8n instance.
  2. Configure Credentials:
    • Set up your Google Sheets credential.
    • Set up your Telegram credential.
    • Set up your OpenAI credential.
    • Set up your Gmail credential.
    • Configure any necessary API keys or authentication for the HTTP Request node (e.g., Apify API key).
  3. Configure Nodes:
    • On form submission (n8n Form Trigger): Configure the form fields you expect to receive.
    • Information Extractor: Adjust the schema for data extraction based on your needs.
    • HTTP Request: Update the URL and parameters to your chosen data enrichment API (e.g., Apify).
    • If: Define your lead qualification logic.
    • OpenAI Chat Model: Customize the prompt for email generation to match your brand voice and outreach strategy.
    • Telegram: Specify the chat ID for sending approval messages.
    • Gmail: Customize the sender details and email subject/body (though the body will be dynamically generated by OpenAI).
    • Wait: Adjust the delay duration as needed for follow-up scheduling.
    • Google Sheets: Specify the spreadsheet ID, sheet name, and columns for writing data.
  4. Activate the Workflow: Once all configurations are complete, activate the workflow. New form submissions will now trigger the automated lead generation and outreach process.

Related Templates

Auto-create TikTok videos with VEED.io AI avatars, ElevenLabs & GPT-4

💥 Viral TikTok Video Machine: Auto-Create Videos with Your AI Avatar --- 🎯 Who is this for? This workflow is for content creators, marketers, and agencies who want to use Veed.io’s AI avatar technology to produce short, engaging TikTok videos automatically. It’s ideal for creators who want to appear on camera without recording themselves, and for teams managing multiple brands who need to generate videos at scale. --- ⚙️ What problem this workflow solves Manually creating videos for TikTok can take hours — finding trends, writing scripts, recording, and editing. By combining Veed.io, ElevenLabs, and GPT-4, this workflow transforms a simple Telegram input into a ready-to-post TikTok video featuring your AI avatar powered by Veed.io — speaking naturally with your cloned voice. --- 🚀 What this workflow does This automation links Veed.io’s video-generation API with multiple AI tools: Analyzes TikTok trends via Perplexity AI Writes a 10-second viral script using GPT-4 Generates your voiceover via ElevenLabs Uses Veed.io (Fabric 1.0 via FAL.ai) to animate your avatar and sync the lips to the voice Creates an engaging caption + hashtags for TikTok virality Publishes the video automatically via Blotato TikTok API Logs all results to Google Sheets for tracking --- 🧩 Setup Telegram Bot Create your bot via @BotFather Configure it as the trigger for sending your photo and theme Connect Veed.io Create an account on Veed.io Get your FAL.ai API key (Veed Fabric 1.0 model) Use HTTPS image/audio URLs compatible with Veed Fabric Other APIs Add Perplexity, ElevenLabs, and Blotato TikTok keys Connect your Google Sheet for logging results --- 🛠️ How to customize this workflow Change your Avatar: Upload a new image through Telegram, and Veed.io will generate a new talking version automatically. Modify the Script Style: Adjust the GPT prompt for tone (educational, funny, storytelling). Adjust Voice Tone: Tweak ElevenLabs stability and similarity settings. Expand Platforms: Add Instagram, YouTube Shorts, or X (Twitter) posting nodes. Track Performance: Customize your Google Sheet to measure your most successful Veed.io-based videos. --- 🧠 Expected Outcome In just a few seconds after sending your photo and theme, this workflow — powered by Veed.io — creates a fully automated TikTok video featuring your AI avatar with natural lip-sync and voice. The result is a continuous stream of viral short videos, made without cameras, editing, or effort. --- ✅ Import the JSON file in n8n, add your API keys (including Veed.io via FAL.ai), and start generating viral TikTok videos starring your AI avatar today! 🎥 Watch This Tutorial --- 📄 Documentation: Notion Guide Need help customizing? Contact me for consulting and support : Linkedin / Youtube

Dr. FirasBy Dr. Firas
39510

Track competitor SEO keywords with Decodo + GPT-4.1-mini + Google Sheets

This workflow automates competitor keyword research using OpenAI LLM and Decodo for intelligent web scraping. Who this is for SEO specialists, content strategists, and growth marketers who want to automate keyword research and competitive intelligence. Marketing analysts managing multiple clients or websites who need consistent SEO tracking without manual data pulls. Agencies or automation engineers using Google Sheets as an SEO data dashboard for keyword monitoring and reporting. What problem this workflow solves Tracking competitor keywords manually is slow and inconsistent. Most SEO tools provide limited API access or lack contextual keyword analysis. This workflow solves that by: Automatically scraping any competitor’s webpage with Decodo. Using OpenAI GPT-4.1-mini to interpret keyword intent, density, and semantic focus. Storing structured keyword insights directly in Google Sheets for ongoing tracking and trend analysis. What this workflow does Trigger — Manually start the workflow or schedule it to run periodically. Input Setup — Define the website URL and target country (e.g., https://dev.to, france). Data Scraping (Decodo) — Fetch competitor web content and metadata. Keyword Analysis (OpenAI GPT-4.1-mini) Extract primary and secondary keywords. Identify focus topics and semantic entities. Generate a keyword density summary and SEO strength score. Recommend optimization and internal linking opportunities. Data Structuring — Clean and convert GPT output into JSON format. Data Storage (Google Sheets) — Append structured keyword data to a Google Sheet for long-term tracking. Setup Prerequisites If you are new to Decode, please signup on this link visit.decodo.com n8n account with workflow editor access Decodo API credentials OpenAI API key Google Sheets account connected via OAuth2 Make sure to install the Decodo Community node. Create a Google Sheet Add columns for: primarykeywords, seostrengthscore, keyworddensity_summary, etc. Share with your n8n Google account. Connect Credentials Add credentials for: Decodo API credentials - You need to register, login and obtain the Basic Authentication Token via Decodo Dashboard OpenAI API (for GPT-4o-mini) Google Sheets OAuth2 Configure Input Fields Edit the “Set Input Fields” node to set your target site and region. Run the Workflow Click Execute Workflow in n8n. View structured results in your connected Google Sheet. How to customize this workflow Track Multiple Competitors → Use a Google Sheet or CSV list of URLs; loop through them using the Split In Batches node. Add Language Detection → Add a Gemini or GPT node before keyword analysis to detect content language and adjust prompts. Enhance the SEO Report → Expand the GPT prompt to include backlink insights, metadata optimization, or readability checks. Integrate Visualization → Connect your Google Sheet to Looker Studio for SEO performance dashboards. Schedule Auto-Runs → Use the Cron Node to run weekly or monthly for competitor keyword refreshes. Summary This workflow automates competitor keyword research using: Decodo for intelligent web scraping OpenAI GPT-4.1-mini for keyword and SEO analysis Google Sheets for live tracking and reporting It’s a complete AI-powered SEO intelligence pipeline ideal for teams that want actionable insights on keyword gaps, optimization opportunities, and content focus trends, without relying on expensive SEO SaaS tools.

Ranjan DailataBy Ranjan Dailata
161

Two-way property repair management system with Google Sheets & Drive

This workflow automates the repair request process between tenants and building managers, keeping all updates organized in a single spreadsheet. It is composed of two coordinated workflows, as two separate triggers are required — one for new repair submissions and another for repair updates. A Unique Unit ID that corresponds to individual units is attributed to each request, and timestamps are used to coordinate repair updates with specific requests. General use cases include: Property managers who manage multiple buildings or units. Building owners looking to centralize tenant repair communication. Automation builders who want to learn multi-trigger workflow design in n8n. --- ⚙️ How It Works Workflow 1 – New Repair Requests Behind the Scenes: A tenant fills out a Google Form (“Repair Request Form”), which automatically adds a new row to a linked Google Sheet. Steps: Trigger: Google Sheets rowAdded – runs when a new form entry appears. Extract & Format: Collects all relevant form data (address, unit, urgency, contacts). Generate Unit ID: Creates a standardized identifier (e.g., BUILDING-UNIT) for tracking. Email Notification: Sends the building manager a formatted email summarizing the repair details and including a link to a Repair Update Form (which activates Workflow 2). --- Workflow 2 – Repair Updates Behind the Scenes:\ Triggered when the building manager submits a follow-up form (“Repair Update Form”). Steps: Lookup by UUID: Uses the Unit ID from Workflow 1 to find the existing row in the Google Sheet. Conditional Logic: If photos are uploaded: Saves each image to a Google Drive folder, renames files consistently, and adds URLs to the sheet. If no photos: Skips the upload step and processes textual updates only. Merge & Update: Combines new data with existing repair info in the same spreadsheet row — enabling a full repair history in one place. --- 🧩 Requirements Google Account (for Forms, Sheets, and Drive) Gmail/email node connected for sending notifications n8n credentials configured for Google API access --- ⚡ Setup Instructions (see more detail in workflow) Import both workflows into n8n, then copy one into a second workflow. Change manual trigger in workflow 2 to a n8n Form node. Connect Google credentials to all nodes. Update spreadsheet and folder IDs in the corresponding nodes. Customize email text, sender name, and form links for your organization. Test each workflow with a sample repair request and a repair update submission. --- 🛠️ Customization Ideas Add Slack or Telegram notifications for urgent repairs. Auto-create folders per building or unit for photo uploads. Generate monthly repair summaries using Google Sheets triggers. Add an AI node to create summaries/extract relevant repair data from repair request that include long submissions.

Matt@VeraisonLabsBy Matt@VeraisonLabs
208