This workflow corresponds to n8n.io template #6337 — we link there as the canonical source.
This workflow follows the Chainllm → Google Sheets recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "PDk5XYRiGbBpHOOs",
"name": "Reddid lead Finder",
"tags": [],
"nodes": [
{
"id": "4552f25b-e6db-4fbd-ba6c-d7d395f2ee5e",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-560,
-320
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours",
"hoursInterval": 2
}
]
}
},
"typeVersion": 1.1
},
{
"id": "66c4b9df-86d7-4638-a07e-26eae12af0e4",
"name": "Get Enhanced Business Profile",
"type": "n8n-nodes-base.googleSheets",
"position": [
-208,
-320
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1pmoW6LBeR1E23qfObMf_ce8pOpohP0qmftU9N7Vuq6o/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1pmoW6LBeR1E23qfObMf_ce8pOpohP0qmftU9N7Vuq6o",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1pmoW6LBeR1E23qfObMf_ce8pOpohP0qmftU9N7Vuq6o/edit?usp=drivesdk",
"cachedResultName": "Enhanced Business Profile"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "0110d814-6923-474e-afae-a8c82a60f9a6",
"name": "Google Gemini Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
32,
-96
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.0-flash-001"
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "fa3e6273-7c4a-45d9-8dfb-5238e0748894",
"name": "Subreddit Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
208,
-96
],
"parameters": {
"jsonSchemaExample": "{\n \"subreddits\": [\n \"r/entrepreneur\",\n \"r/startups\",\n \"r/SaaS\",\n \"r/marketing\",\n \"r/ecommerce\"\n ],\n \"reasoning\": \"Selected based on target audience and problem alignment\"\n}"
},
"typeVersion": 1.3
},
{
"id": "6c5b08e9-3469-41a8-bac6-1bd85355acb4",
"name": "Strategic Subreddit Selector",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
80,
-320
],
"parameters": {
"text": "=You are a Reddit lead generation strategist. Analyze the business profile and identify the 5 most relevant subreddits for lead generation.\n\n**Business Profile:**\n- Profession: {{ $json.profession }}\n- Industry: {{ $json.industry }}\n- Primary Services: {{ $json.primary_services }}\n- Service Keywords: {{ $json.service_keywords }}\n- Target Client: {{ $json['target_client_profile '] }}\n- Pain Points: {{ $json.pain_points }}\n\n**Selection Criteria:**\n1. **High Intent Communities**: Subreddits where your target clients actively seek solutions\n2. **Problem-Focused**: Communities discussing specific pain points you solve\n3. **Business Context**: Professional subreddits with decision-makers\n4. **Active Engagement**: 10K+ members with recent quality discussions\n5. **Lead-Friendly**: Communities that welcome helpful solutions (not purely promotional)\n\n**Avoid:**\n- Pure promotional subreddits\n- Overly broad communities (r/AskReddit)\n- Student/hobbyist focused groups\n- Dead or low-engagement communities\n\nReturn the 5 most strategic subreddits that balance relevance, engagement, and lead potential. Include reasoning for your selections.",
"batching": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.7
},
{
"id": "1c96b400-b522-4944-9d1d-94f3ece1ddef",
"name": "Query Generator Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
480,
0
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.0-flash"
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "978002c3-a72e-420c-845c-3474d1fb64a9",
"name": "Multi-Query Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
672,
0
],
"parameters": {
"jsonSchemaExample": "[ {\n \"type\": \"direct_service_request\",\n \"query\": \"(subreddit:entrepreneur OR subreddit:startups) (\\\"looking for\\\" OR \\\"need to hire\\\") (\\\"SEO expert\\\" OR \\\"digital marketing\\\") -(\\\"I offer\\\" OR \\\"my service\\\")\",\n \"intent_level\": \"high\"\n },\n {\n \"type\": \"problem_focused\",\n \"query\": \"(subreddit:marketing OR subreddit:SaaS) (\\\"struggling with\\\" OR \\\"problem with\\\") (\\\"conversion rate\\\" OR \\\"email marketing\\\") AND (\\\"help\\\" OR \\\"advice\\\")\",\n \"intent_level\": \"medium-high\"\n },\n {\n \"type\": \"recommendation_request\",\n \"query\": \"(subreddit:ecommerce OR subreddit:entrepreneur) (\\\"recommend\\\" OR \\\"suggestions\\\") (\\\"marketing agency\\\" OR \\\"SEO tools\\\") -(\\\"free\\\" OR \\\"DIY\\\")\",\n \"intent_level\": \"medium\"\n }\n \n]"
},
"typeVersion": 1.3
},
{
"id": "abcd25e7-1fe3-4fad-8d10-56480db28aa6",
"name": "Multi-Query Generator",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
496,
-320
],
"parameters": {
"text": "=Act as a Reddit search expert specializing in B2B lead identification.\n\nCreate 3 focused search queries targeting different intent types:\n\n**Business Context:**\n- Profession:{{ $('Get Enhanced Business Profile').item.json.profession }} \n- Primary Services: {{ $('Get Enhanced Business Profile').item.json.primary_services }}\n- Service Keywords: {{ $('Get Enhanced Business Profile').item.json.service_keywords }}\n- Target Client: {{ $('Get Enhanced Business Profile').item.json['target_client_profile '] }}\n- Pain Points: {{ $('Get Enhanced Business Profile').item.json.pain_points }}\n- Intent Signals: {{ $('Get Enhanced Business Profile').item.json.intent_signals }}\n- Urgency Indicators: {{ $('Get Enhanced Business Profile').item.json.urgency_indicators }}\n\n**Target Subreddits:** {{ $json.output.subreddits }}\n\n**Query Types to Create:**\n\n1. **Direct Service Requests** (High Intent)\n - People explicitly asking for your type of service as a {{ $('Get Enhanced Business Profile').item.json.profession }} \n - Format: (subreddit:X OR subreddit:Y) (\"looking for\" OR \"need\" OR \"hire\") (\"service_keyword1\" OR \"service_keyword2\") -(\"I offer\" OR \"my service\")\n\n2. **Problem-Focused** (Medium-High Intent) \n - People describing problems you solve as a {{ $('Get Enhanced Business Profile').item.json.profession }} \n - Format: (subreddit:X OR subreddit:Y) (\"struggling with\" OR \"problem with\") (\"pain_point1\" OR \"pain_point2\") AND (\"help\" OR \"advice\" OR \"solution\")\n\n3. **Recommendation Requests** (Medium Intent)\n - People asking for tool/service recommendations that a {{ $('Get Enhanced Business Profile').item.json.profession }} can help\n - Format: (subreddit:X OR subreddit:Y) (\"recommend\" OR \"suggestions\") (\"service_area\") -(\"free\" OR \"DIY\")\n\n**Query Rules:**\n- Keep each query under 200 characters\n- Use exact pain point language from target audience\n- Include 3-5 service keywords per query\n- Exclude competitor promotional content\n- Focus on business decision-maker language\n\nOutput 3 separate optimized queries with their intent levels. ",
"batching": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.7
},
{
"id": "24a75509-1cc4-40e3-b27f-3aa23b5419e0",
"name": "Split Query Batches",
"type": "n8n-nodes-base.splitInBatches",
"position": [
1232,
-432
],
"parameters": {
"options": {
"reset": false
}
},
"typeVersion": 3
},
{
"id": "c306da2f-f91d-4729-9a10-3545ce47d9ad",
"name": "Reddit Search Engine",
"type": "n8n-nodes-base.reddit",
"position": [
1360,
-224
],
"parameters": {
"limit": 10,
"keyword": "={{ $json.query }}",
"location": "allReddit",
"operation": "search",
"additionalFields": {
"sort": "new"
}
},
"credentials": {
"redditOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "d1011a5b-3c19-4054-964a-9d53e2d16e82",
"name": "Lead Classifier Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
1600,
-144
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.0-flash"
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "80f2df09-3262-46b7-bbe6-46fc32c9dbb4",
"name": "Service Opportunity Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
2368,
-256
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.0-flash"
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "ed64c9e1-d3b5-4fee-9dfd-7a6d26543a94",
"name": "Service Analysis Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
2560,
-272
],
"parameters": {
"jsonSchemaExample": "{\n \"lead_score\": 8,\n \"urgency_level\": \"high\",\n \"business_context\": \"SaaS startup with scaling challenges\",\n \"specific_problem\": \"Conversion rate dropping after recent website changes\",\n \"recommended_service\": \"Comprehensive conversion rate audit and optimization strategy\",\n \"outreach_approach\": \"Offer free 15-minute conversion analysis to demonstrate expertise\",\n \"estimated_value\": \"$3000-5000\",\n \"response_priority\": \"immediate\"\n}"
},
"typeVersion": 1.3
},
{
"id": "55b90732-6359-4692-ba85-9e3ed7660995",
"name": "Service Opportunity Analyzer",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
2384,
-464
],
"parameters": {
"text": "You are a business development strategist analyzing Reddit posts for service opportunities.\n\n**Professional Context:**\n- Profession: {{ $('Get Enhanced Business Profile').item.json.profession }}\n- Primary Services: {{ $('Get Enhanced Business Profile').item.json.primary_services }}\n- Target Clients: {{ $('Get Enhanced Business Profile').item.json.target_client_profile }}\n- Price Range: {{ $('Get Enhanced Business Profile').item.json.price_range }}\n- Service Keywords: {{ $('Get Enhanced Business Profile').item.json.service_keywords }}\n\n**Reddit Post Analysis:**\nTitle: {{ $json.title }}\nContent: {{ $json.selftext }}\nSubreddit: {{ $json.subreddit_name_prefixed }}\nEngagement: {{ $json.score }} upvotes, {{ $json.num_comments }} comments\nClassification: {{ $json.category }}\n\n**Analysis Framework:**\n1. **Problem Identification**: What specific business problem is expressed?\n2. **Service Mapping**: Which of your services directly addresses this problem?\n3. **Value Assessment**: What measurable outcome could you deliver?\n4. **Urgency Assessment**: How time-sensitive is their need?\n5. **Business Context**: Are they the right size/type of client?\n6. **Competition Analysis**: How many others are likely targeting this lead?\n\n**Scoring Criteria:**\n- Lead Score (1-10): Overall conversion probability\n- Urgency Level: immediate/high/medium/low\n- Estimated Value: Based on problem scope and your pricing\n- Response Priority: immediate/today/this_week/monitor\n\n**Output Requirements:**\nProvide a comprehensive lead analysis including specific service recommendations, outreach strategy, and business justification. Focus on actionable insights for immediate lead engagement.",
"batching": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.7
},
{
"id": "0520c053-b24f-46ba-ad90-7b839184e05d",
"name": "High Value Filter",
"type": "n8n-nodes-base.filter",
"position": [
2752,
-464
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "high-value-filter",
"operator": {
"type": "number",
"operation": "gte"
},
"leftValue": "={{ $json.output.lead_score }}",
"rightValue": 6
}
]
}
},
"typeVersion": 2
},
{
"id": "93f5c07d-6b77-44d2-a6f2-a6a5a4b4db92",
"name": "Save High-Value Leads",
"type": "n8n-nodes-base.googleSheets",
"position": [
3008,
-208
],
"parameters": {
"columns": {
"value": {
"post_id": "={{ $('Loop Over Items').item.json.id}}",
"post_url": "={{ $('Loop Over Items').item.json.url}}",
"post_date": "={{ $('Loop Over Items').item.json.created}}",
"post_post": "={{ $('Loop Over Items').item.json.selftext}}",
"post_title": "={{ $('Loop Over Items').item.json.title}}",
"post_subreddit": "={{ $('Loop Over Items').item.json.subreddit_name_prefixed}}",
"service suggestion": "={{ $json.output.toJsonString() }}"
},
"schema": [
{
"id": "post_id",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "post_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "post_url",
"type": "string",
"display": true,
"required": false,
"displayName": "post_url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "post_title",
"type": "string",
"display": true,
"required": false,
"displayName": "post_title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "post_post",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "post_post",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "post_subreddit",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "post_subreddit",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "post_date",
"type": "string",
"display": true,
"required": false,
"displayName": "post_date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "service suggestion",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "service suggestion",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"post_id"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1cTkC1xkj11B0O81UBz-DXbkZ9oAOxsBTk3YsHJHfJ1k/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1cTkC1xkj11B0O81UBz-DXbkZ9oAOxsBTk3YsHJHfJ1k",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1cTkC1xkj11B0O81UBz-DXbkZ9oAOxsBTk3YsHJHfJ1k/edit?usp=drivesdk",
"cachedResultName": "Redditleads"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.5
},
{
"id": "3012c47d-58e5-46b3-a3e5-790d34e22e56",
"name": "Code",
"type": "n8n-nodes-base.code",
"position": [
976,
-336
],
"parameters": {
"language": "python",
"pythonCode": "# Loop over input items and add a new field called 'myNewField' to the JSON of each one\nfor item in _input.all():\n item.json.outputs=item.json.output\n \nreturn item.json.outputs"
},
"typeVersion": 2
},
{
"id": "84700109-17f0-4b9d-b092-50e7b572f12e",
"name": "Loop Over Items",
"type": "n8n-nodes-base.splitInBatches",
"position": [
2064,
-480
],
"parameters": {
"options": {
"reset": false
}
},
"typeVersion": 3
},
{
"id": "0072a9bc-d787-49af-91c6-8ec546258f56",
"name": "AI Lead Classifier",
"type": "@n8n/n8n-nodes-langchain.textClassifier",
"position": [
1568,
-464
],
"parameters": {
"options": {},
"inputText": "=**Service Profile:**\n<profession>{{ $('Get Enhanced Business Profile').item.json.profession }}</profession>\n<primary_services>{{ $('Get Enhanced Business Profile').item.json.primary_services }}</primary_services>\n<target_client>{{ $('Get Enhanced Business Profile').item.json['target_client_profile '] }}</target_client>\n\n<pain_points>{{ $('Get Enhanced Business Profile').item.json.pain_points }}</pain_points>\n\n**Post Content:**\n<title>{{ $json.title || 'N/A' }}</title>\n<content>{{ $json.selftext || $json.text || $json.content || $json.body || 'No content' }}</content>\n<subreddit>{{ $json.subreddit_name_prefixed }}</subreddit>\n<author>{{ $json.author || 'unknown' }}</author>\n<engagement>{{ $json.score || 0 }} upvotes, {{ $json.num_comments || 0 }} comments</engagement>\n<post_age>{{ $json.created || 'unknown' }}</post_age>",
"categories": {
"categories": [
{
"category": "HIGH_POTENTIAL",
"description": "=Posts that clearly describe business problems, pain points, or requests for help that directly align with the service profile. The author appears to be from the target audience and is actively seeking solutions. These represent high-value lead opportunities with strong conversion potentialfor for a {{ $('Get Enhanced Business Profile').item.json.profession }}"
},
{
"category": "MEDIUM_POTENTIAL",
"description": "=Posts that mention relevant challenges or needs but may be less specific or from audience segments that are somewhat aligned. These could be developed into leads with the right approach but require more nurturing."
},
{
"category": "LOW_POTENTIAL",
"description": "Posts that have minimal relevance to the services offered or come from audiences outside the target demographic. These are unlikely to convert but might provide industry insights."
},
{
"category": "NO_POTENTIAL",
"description": "Posts that are clearly promotional, self-serving, or completely irrelevant to the service profile. These should be ignored as they offer no business value and may harm reputation if engaged with."
}
]
}
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "6fa74d3d-f863-42fc-94a3-7c38d915ec40",
"connections": {
"Code": {
"main": [
[
{
"node": "Split Query Batches",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Service Opportunity Analyzer",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Get Enhanced Business Profile",
"type": "main",
"index": 0
}
]
]
},
"High Value Filter": {
"main": [
[
{
"node": "Save High-Value Leads",
"type": "main",
"index": 0
}
]
]
},
"AI Lead Classifier": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Split Query Batches": {
"main": [
[
{
"node": "AI Lead Classifier",
"type": "main",
"index": 0
}
],
[
{
"node": "Reddit Search Engine",
"type": "main",
"index": 0
}
]
]
},
"Reddit Search Engine": {
"main": [
[
{
"node": "Split Query Batches",
"type": "main",
"index": 0
}
]
]
},
"Lead Classifier Model": {
"ai_languageModel": [
[
{
"node": "AI Lead Classifier",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Multi-Query Generator": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"Query Generator Model": {
"ai_languageModel": [
[
{
"node": "Multi-Query Generator",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Save High-Value Leads": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Service Analysis Parser": {
"ai_outputParser": [
[
{
"node": "Service Opportunity Analyzer",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Subreddit Output Parser": {
"ai_outputParser": [
[
{
"node": "Strategic Subreddit Selector",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "Strategic Subreddit Selector",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Multi-Query Output Parser": {
"ai_outputParser": [
[
{
"node": "Multi-Query Generator",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Service Opportunity Model": {
"ai_languageModel": [
[
{
"node": "Service Opportunity Analyzer",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Service Opportunity Analyzer": {
"main": [
[
{
"node": "High Value Filter",
"type": "main",
"index": 0
}
]
]
},
"Strategic Subreddit Selector": {
"main": [
[
{
"node": "Multi-Query Generator",
"type": "main",
"index": 0
}
]
]
},
"Get Enhanced Business Profile": {
"main": [
[
{
"node": "Strategic Subreddit Selector",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googlePalmApigoogleSheetsOAuth2ApiredditOAuth2Api
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
Source: https://n8n.io/workflows/6337/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Effortlessly generate, review, and publish SEO-optimized blog posts to WordPress using AI and automation.
This n8n workflow automatically monitors YouTube channels, transcribes new videos, and generates AI-powered summaries with relevance scoring. It pulls channel URLs from a Google Sheet, fetches recent
Transform your festival marketing with this comprehensive automation workflow that creates and posts culturally authentic social media content across multiple platforms daily.
This workflow creates a sophisticated, self-improving customer support system that automatically handles incoming emails. It's designed to answer common questions using an AI-powered knowledge base an
It transforms a basic list of LinkedIn profiles into a campaign-ready database by first enriching contacts with detailed career data and then using AI to craft unique, context-aware emails based on ea