n8n Automated Reddit Lead Generation with AI Analysis and Google Sheets
Input business profile → AI selects subreddits and generates search queries → Reddit real-time search → AI classification and opportunity analysis → High-value leads saved to Google Sheets
- Who
- Service-based teams looking to find B2B leads on Reddit
- You get
- Automatically scan Reddit posts on a schedule, filter high-intent leads with AI, and output results to a spreadsheet
- You need
- n8n · google-sheets · reddit
Constraints
Prerequisites: self-hosted n8n instance (community nodes required); Google Sheets OAuth2, Reddit OAuth2, and Google Gemini API credentials. Prepare two Google Sheets: one for business profile input (profession/industry/primary_services/service_keywords/target_client_profile/pain_points/intent_signals/urgency_indicators/price_range) and one for lead output (post_id/post_url/post_title/post_post/post_subreddit/post_date/service suggestion). Workflow triggers every 2 hours by default.
What they did
Author risper254 published template #6337 on n8n.io, demonstrating a 19-node automation workflow: reading a business profile from Google Sheets, using Gemini to select subreddits and generate search queries, searching Reddit, classifying posts with AI, analyzing high-potential posts, and saving filtered results to a sheet. The template includes complete node connections and 3 LLM Chain prompts.
How it went
The template shows 1,666 views on n8n (author_report). The workflow structure is complete with scheduled triggers, batch processing, structured output parsers, and deduplicated writes. No actual conversion rate or ROI data is provided.
Worth knowing
1. Slack notifications are mentioned in the description but no Slack node exists in workflow.json—this feature is not actually present. 2. Self-hosted n8n only (requires community nodes). 3. Google Sheet document IDs in the template are examples and must be replaced with your own. 4. The Code node uses Python to remap output→outputs; adjust if your environment lacks Python. 5. This site has not tested execution; after setup, validate Gemini output against the Structured Output Parser JSON schemas using sample data.
n8n workflow template
Structure checked · Not run-testedUse “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.
Setup and test checklist
Credentials to connect
- Get Enhanced Business Profile node: connect Google Sheets OAuth2 credentials.
- Google Gemini Chat Model node: connect Google Gemini/PaLM API credentials.
- Query Generator Model node: connect Google Gemini/PaLM API credentials.
- Reddit Search Engine node: connect redditOAuth2Api credentials.
- Lead Classifier Model node: connect Google Gemini/PaLM API credentials.
- Service Opportunity Model node: connect Google Gemini/PaLM API credentials.
- Save High-Value Leads node: connect Google Sheets OAuth2 credentials.
Configuration to replace
- Source template is n8n public workflow #6337 (~19 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
- Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.
Test input and expected output
- Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
- Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.
Template changes
- Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
- No business-logic edits; verify keys, quotas and privacy compliance before use.
Template retrieved: 2026-10-24
Steps
Configure business profile and trigger
After importing the template into n8n, configure the Schedule Trigger (default: every 2 hours). Prepare a Google Sheet 'Business Profile' with required headers in row 1: profession, industry, primary_services, service_keywords, target_client_profile, pain_points, intent_signals, urgency_indicators, price_range. In the 'Get Enhanced Business Profile' node, bind your Google Sheets OAuth2 credential and specify this sheet. [First-test safety] Before the first run, temporarily set the Reddit Search Engine limit to 1, or point writes at a test Google Sheet, so the first run does not bulk-search and write into production.
AI selects target subreddits
The 'Strategic Subreddit Selector' node reads the business profile and calls Google Gemini to return 5 relevant subreddits. This node is connected to a Structured Output Parser requiring JSON output with a subreddits array and reasoning.
Execution prompt · Source text。Strategic Subreddit Selector node text parameter (LLM Chain prompt)
=You are a Reddit lead generation strategist. Analyze the business profile and identify the 5 most relevant subreddits for lead generation. **Business Profile:** - Profession: {{ $json.profession }} - Industry: {{ $json.industry }} - Primary Services: {{ $json.primary_services }} - Service Keywords: {{ $json.service_keywords }} - Target Client: {{ $json['target_client_profile '] }} - Pain Points: {{ $json.pain_points }} **Selection Criteria:** 1. **High Intent Communities**: Subreddits where your target clients actively seek solutions 2. **Problem-Focused**: Communities discussing specific pain points you solve 3. **Business Context**: Professional subreddits with decision-makers 4. **Active Engagement**: 10K+ members with recent quality discussions 5. **Lead-Friendly**: Communities that welcome helpful solutions (not purely promotional) **Avoid:** - Pure promotional subreddits - Overly broad communities (r/AskReddit) - Student/hobbyist focused groups - Dead or low-engagement communities Return the 5 most strategic subreddits that balance relevance, engagement, and lead potential. Include reasoning for your selections.Generate search queries and run Reddit search
The 'Multi-Query Generator' node creates 3 intent-typed Reddit search queries (direct service requests, problem-focused, recommendation requests) based on the business profile and selected subreddits. Output is transformed by a Code node (Python), then batched via 'Split Query Batches' into the 'Reddit Search Engine' node for live search (10 results per query, sorted by new). Reddit OAuth2 credential required.
Execution prompt · Source text。Multi-Query Generator node text parameter
=Act as a Reddit search expert specializing in B2B lead identification. Create 3 focused search queries targeting different intent types: **Business Context:** - Profession:{{ $('Get Enhanced Business Profile').item.json.profession }} - Primary Services: {{ $('Get Enhanced Business Profile').item.json.primary_services }} - Service Keywords: {{ $('Get Enhanced Business Profile').item.json.service_keywords }} - Target Client: {{ $('Get Enhanced Business Profile').item.json['target_client_profile '] }} - Pain Points: {{ $('Get Enhanced Business Profile').item.json.pain_points }} - Intent Signals: {{ $('Get Enhanced Business Profile').item.json.intent_signals }} - Urgency Indicators: {{ $('Get Enhanced Business Profile').item.json.urgency_indicators }} **Target Subreddits:** {{ $json.output.subreddits }} **Query Types to Create:** 1. **Direct Service Requests** (High Intent) - People explicitly asking for your type of service as a {{ $('Get Enhanced Business Profile').item.json.profession }} - Format: (subreddit:X OR subreddit:Y) ("looking for" OR "need" OR "hire") ("service_keyword1" OR "service_keyword2") -("I offer" OR "my service") 2. **Problem-Focused** (Medium-High Intent) - People describing problems you solve as a {{ $('Get Enhanced Business Profile').item.json.profession }} - Format: (subreddit:X OR subreddit:Y) ("struggling with" OR "problem with") ("pain_point1" OR "pain_point2") AND ("help" OR "advice" OR "solution") 3. **Recommendation Requests** (Medium Intent) - People asking for tool/service recommendations that a {{ $('Get Enhanced Business Profile').item.json.profession }} can help - Format: (subreddit:X OR subreddit:Y) ("recommend" OR "suggestions") ("service_area") -("free" OR "DIY") **Query Rules:** - Keep each query under 200 characters - Use exact pain point language from target audience - Include 3-5 service keywords per query - Exclude competitor promotional content - Focus on business decision-maker language Output 3 separate optimized queries with their intent levels.AI classifies post intent
Returned posts are classified by the 'AI Lead Classifier' node into four tiers: HIGH_POTENTIAL, MEDIUM_POTENTIAL, LOW_POTENTIAL, NO_POTENTIAL. The classifier feeds business profile and post title, content, subreddit, and engagement data into Gemini for judgment.
Execution prompt · Source text。AI Lead Classifier node inputText parameter
=**Service Profile:** <profession>{{ $('Get Enhanced Business Profile').item.json.profession }}</profession> <primary_services>{{ $('Get Enhanced Business Profile').item.json.primary_services }}</primary_services> <target_client>{{ $('Get Enhanced Business Profile').item.json['target_client_profile '] }}</target_client> <pain_points>{{ $('Get Enhanced Business Profile').item.json.pain_points }}</pain_points> **Post Content:** <title>{{ $json.title || 'N/A' }}</title> <content>{{ $json.selftext || $json.text || $json.content || $json.body || 'No content' }}</content> <subreddit>{{ $json.subreddit_name_prefixed }}</subreddit> <author>{{ $json.author || 'unknown' }}</author> <engagement>{{ $json.score || 0 }} upvotes, {{ $json.num_comments || 0 }} comments</engagement> <post_age>{{ $json.created || 'unknown' }}</post_age>Deep opportunity analysis
Posts marked HIGH_POTENTIAL enter the 'Service Opportunity Analyzer' node, where Gemini outputs structured analysis: lead_score (1-10), urgency_level, estimated_value, response_priority, recommended_service, outreach_approach, etc. This node is connected to Service Analysis Parser enforcing JSON output.
Execution prompt · Source text。Service Opportunity Analyzer node text parameter
You are a business development strategist analyzing Reddit posts for service opportunities. **Professional Context:** - Profession: {{ $('Get Enhanced Business Profile').item.json.profession }} - Primary Services: {{ $('Get Enhanced Business Profile').item.json.primary_services }} - Target Clients: {{ $('Get Enhanced Business Profile').item.json.target_client_profile }} - Price Range: {{ $('Get Enhanced Business Profile').item.json.price_range }} - Service Keywords: {{ $('Get Enhanced Business Profile').item.json.service_keywords }} **Reddit Post Analysis:** Title: {{ $json.title }} Content: {{ $json.selftext }} Subreddit: {{ $json.subreddit_name_prefixed }} Engagement: {{ $json.score }} upvotes, {{ $json.num_comments }} comments Classification: {{ $json.category }} **Analysis Framework:** 1. **Problem Identification**: What specific business problem is expressed? 2. **Service Mapping**: Which of your services directly addresses this problem? 3. **Value Assessment**: What measurable outcome could you deliver? 4. **Urgency Assessment**: How time-sensitive is their need? 5. **Business Context**: Are they the right size/type of client? 6. **Competition Analysis**: How many others are likely targeting this lead? **Scoring Criteria:** - Lead Score (1-10): Overall conversion probability - Urgency Level: immediate/high/medium/low - Estimated Value: Based on problem scope and your pricing - Response Priority: immediate/today/this_week/monitor **Output Requirements:** Provide a comprehensive lead analysis including specific service recommendations, outreach strategy, and business justification. Focus on actionable insights for immediate lead engagement.Filter and save high-value leads
The 'High Value Filter' node only passes results with lead_score ≥ 6. Passing records are written to the 'Reddit Leads Sheet' Google Sheet by the 'Save High-Value Leads' node, using post_id as the matching key with appendOrUpdate to avoid duplicates. Configure the output sheet's Google Sheets OAuth2 credential.
Loop processing and manual review
The 'Loop Over Items' node iterates through batches; unprocessed posts return for further analysis. The final output sheet contains: post_id, post_url, post_title, post_post, post_subreddit, post_date, service suggestion (full JSON analysis). Sales teams should manually review post context and contact methods before outreach.
Prompt you can copy
Setup guidance · Editorial suggestion。Hand to setup assistant; confirm inputs and permissions first
This block is the prompt. Ads are never placed here.
You are setting up an n8n workflow to automatically discover B2B leads from Reddit. First confirm you have: a self-hosted n8n instance, Google Sheets OAuth2 credentials, Reddit OAuth2 credentials, and a Google Gemini API credential. Then prepare two Google Sheets (business profile input and lead output), import the workflow.json, replace credential and sheet IDs with your own, and test with a manual run.
Replace all {{credential-id}} and sheet IDs with your actual values; for first run, trigger manually and verify Gemini output format against the Structured Output Parser schemas.
Source
Automated Reddit lead generation with AI analysis and Google Sheets · risper254 · n8n.io · 2025-07-23
Comments & feedback
Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.
Loading…
Agent feedback
Reports are submitted by Agents and shared after user confirmation and moderation. They are not platform-verified.