Skip to main content

YouTube lead generation: Turn comments into enriched prospects with Apify and Gemini AI

Workflow preview

Workflow preview
100%
YouTube lead generation: Turn comments into enriched prospects with Apify and Gemini AI preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Automated YouTube Leads: Turn Comments into Enriched Prospects Workflow Overview This cutting edge n8n workflow is a powerful automation tool designed to revolutionize how businesses and marketers ...

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.httprequest, n8n-nodes-base.googlesheets, @n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenrouter, n8n-nodes-base.googlesheetstool, @n8n/n8n-nodes-langchain.memorybufferwindow

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Msaid Mohamed el hadi.

Original n8n.io source

1.1 Workflow description

Title
YouTube lead generation: Turn comments into enriched prospects with Apify and Gemini AI
Workflow name
YouTube lead generation: Turn comments into enriched prospects with Apify and Gemini AI

Automated YouTube Leads: Turn Comments into Enriched Prospects

Workflow Overview

This cutting-edge n8n workflow is a powerful automation tool designed to revolutionize how businesses and marketers identify and qualify leads directly from YouTube video comments. By leveraging specialized Apify Actors and an intelligent AI agent, this workflow seamlessly transforms raw comment data into comprehensive lead profiles, saving valuable time and resources.

This workflow automatically:

  • Discovers & Scrapes Comments:

    • Monitors a Google Sheet for new YouTube video URLs.
    • Automatically extracts all comments from specified YouTube videos using a dedicated Apify Actor.
    • Marks videos as "scrapped" to avoid reprocessing.
  • Intelligent Lead Enrichment:

    • Retrieves unprocessed comments from Google Sheets.
    • Activates an advanced AI agent (powered by OpenRouter's cutting-edge models) to research comment authors.
    • Utilizes Google Search (via Serper API) and specialized Apify scrapers (for website content and Instagram profiles) to find publicly available information like social media links, bios, and potential contact details.
    • Generates concise descriptions for each lead based on gathered data.
  • Organized Data Storage:

    • Creates new entries in a dedicated Google Sheet for each new lead.
    • Updates lead profiles with all discovered enriched data (email, social media, short bio, etc.).
    • Marks comments as "processed" once their authors have been researched and enriched.

Key Benefits

🤖 Full Automation: Eliminates manual data collection and research, freeing up your team for strategic tasks. 💡 Smart Lead Enrichment: AI intelligently sifts through information to build rich, actionable lead profiles. ⏱️ Time-Saving: Instant, scalable lead generation without human intervention. 📈 Enhanced Lead Quality: Go beyond basic contact info with comprehensive social and professional context. 📊 Centralized Data: All leads are neatly organized in Google Sheets for easy access and integration.

Setup Requirements

  • n8n Installation:
    • Install n8n (cloud or self-hosted).
    • Import the workflow configuration.
    • Configure API credentials.
    • Set up scheduling preferences for continuous operation.
  • Google Sheets Credentials:
    • A Google Cloud API key with access to Google Sheets.
    • Set up OAuth2 authentication in n8n for read/write access to your "youtube leads" spreadsheet (containing "videos", "comments", and "leads" sheets).
  • OpenRouter API Access:
    • Create an OpenRouter account.
    • Generate an API key to access their chat models (e.g., google/gemini-2.5-flash-preview-05-20) for AI agent operations.
  • Apify API Access:
  • Serper API Key:
    • Sign up for an account on Serper.dev.
    • Obtain an API key for performing Google searches to find social media profiles and other information.

Potential Use Cases

  • Content Creators: Identify highly engaged audience members for community building or direct outreach.
  • Marketing Teams: Discover potential customers or influencers interacting with competitor content.
  • Sales Professionals: Build targeted lead lists based on specific interests expressed in comments.
  • Market Researchers: Analyze audience demographics and interests by enriching profiles of commenters on relevant videos.
  • Recruiters: Find potential candidates based on their expertise or engagement in industry-specific discussions.

Future Enhancement Roadmap

  • CRM Integration: Directly push enriched leads into popular CRM systems (e.g., HubSpot, Salesforce).
  • Automated Outreach: Implement automated email or social media messaging for qualified leads.
  • Sentiment Analysis: Analyze comment sentiment before enrichment to prioritize positive interactions.
  • Multi-Platform Support: Expand comment extraction and lead enrichment to other platforms (e.g., TikTok, Facebook).
  • Advanced Lead Scoring: Develop a scoring model based on engagement, profile completeness, and relevance.

Ethical Considerations

  • Data Privacy: Ensure all collected data is publicly available and used in compliance with relevant privacy regulations (e.g., GDPR, CCPA).
  • Platform Guidelines: Adhere strictly to YouTube's Terms of Service and Apify's usage policies.
  • Transparency: If engaging with leads, be transparent about how their information was obtained (if applicable).
  • No Spam: This tool is designed for lead identification, not for unsolicited mass messaging.

Technical Requirements

  • n8n v1.0.0 or higher (recommended for latest features and stability)
  • Google Sheets API access
  • OpenRouter API access
  • Apify API access
  • Serper API access
  • Stable internet connection

Workflow Architecture

[YouTube Video URLs (Google Sheet)]
    ⬇️
[Schedule/Manual Trigger]
    ⬇️
[Extract Comments (Apify YouTube Scraper)]
    ⬇️
[Save Raw Comments (Google Sheet)]
    ⬇️
[AI Agent (OpenRouter) for Lead Research]
    ⬇️
[Google Search (Serper) & Web Scraping (Apify FireScraper/Instagram Scraper)]
    ⬇️
[Save Enriched Leads (Google Sheet)]
    ⬇️
[Mark Comments Processed (Google Sheet)]

Connect With Me

Exploring AI-Powered Lead Generation? 📧 Email: [email protected] 💼 LinkedIn: Mohamed el Hadi Msaid

Transform your YouTube engagement into a powerful lead generation engine with intelligent, automated insights!

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 - HTTP apify get comments from video

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

Block 3 - mark video url as scrapped

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

Block 4 - Get rvideo urls

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

Block 5 - Save scrapped comments

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

Block 6 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 7 - AI Agent

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

Block 8 - OpenRouter Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenRouter - lmChatOpenRouter
Config choices
Version 1

Block 9 - get comments

Type / Role
n8n-nodes-base.googleSheetsTool - googleSheetsTool
Config choices
Version 4.6

Block 10 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 11 - search google

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

Block 12 - get url mardown

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

Block 13 - create a row for new search user

Type / Role
n8n-nodes-base.googleSheetsTool - googleSheetsTool
Config choices
Version 4.6

Block 14 - update result for user

Type / Role
n8n-nodes-base.googleSheetsTool - googleSheetsTool
Config choices
Version 4.6

Block 15 - instagram full profile scraper

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

Block 16 - mark comment as processed

Type / Role
n8n-nodes-base.googleSheetsTool - googleSheetsTool
Config choices
Version 4.6

Block 17 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 18 - Code

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

Block 19 - Schedule Trigger1

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 20 - Sticky Note1

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

Block 21 - Sticky Note

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

Block 22 - Sticky Note2

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

3. Summary Table

Workflow YouTube lead generation: Turn comments into enriched prospects with Apify and Gemini AI
Complexity advanced
Nodes 22
Categories Lead Generation, AI Summarization
Author Msaid Mohamed el hadi
Published 07 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/5751/5751.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 YouTube lead generation: Turn comments into enriched prospects with Apify and Gemini AI do?

Automated YouTube Leads: Turn Comments into Enriched Prospects Workflow Overview This cutting edge n8n workflow is a powerful automation tool designed to revolutionize how businesses and marketers ...

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.