Automated Reddit Prospecting and Llama3 Response Generator - n8n Workflow

Deploy an advanced n8n workflow to monitor Reddit, use Ollama/Llama3 for relevance analysis and custom response generation, and automate highly targeted social media outreach using n8n templates.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Growth hackers and marketing professionals looking for automated social media outreach.

  • Businesses wanting to leverage self-hosted AI (Ollama/Llama3) within an n8n workflow.

  • Users needing robust n8n templates for prospect filtering and personalized engagement.

  • Developers exploring integration between local LLMs and the n8n platform.

Overview

This sophisticated n8n workflow template solves the challenge of manually sifting through thousands of Reddit posts to find potential customers or relevant discussion opportunities. By integrating the power of an n8n trigger with large language models running on Ollama (like Llama3), it automates the entire prospecting cycle. It first scrapes specified subreddits, filters out already-processed posts using Google Sheets, and then routes each unique post to the AI. The AI not only determines relevance but also generates a tailored, context-aware comment. This ensures that every automated comment posted by this n8n node is highly targeted and personalized, significantly enhancing engagement quality compared to generic automation tools. This complete n8n workflow is a powerful tool for scalable social listening.

How it Works

This highly efficient n8n workflow executes the following steps:


  1. Initiation: The manual n8n trigger (When clicking 'Test workflow') starts the processing cycle.

  2. Data Collection: The Get Reddit Posts n8n node fetches recent activity from the configured subreddits.

  3. Database Consistency Check: The workflow fetches a list of previously handled post IDs from Google Sheets (Get Existing Posts1). The Filter New Posts custom code n8n node compares these lists to ensure the n8n workflow only processes new items, preventing spam and duplicates.

  4. Sequential Processing: The Process One Post at a Time n8n node ensures that the subsequent AI and posting actions handle only one item simultaneously, managing rate limits and resource usage effectively.

  5. AI Relevance Check: The core logic runs through the AI Relevance Analysis Langchain n8n node, which connects directly to the self-hosted Ollama Chat Model. This Llama3 model analyzes the post content, title, and existing comments to decide if the post is a relevant prospect for outreach.

  6. Response Handling: The Parse AI Response n8n node extracts the relevance decision and the proposed comment text generated by the AI.

  7. Conditional Action: The Is Post Relevant? n8n node routes the flow. If relevant, the post details are logged via the Log Relevant Post Google Sheets n8n node, and then the automated response is published using the Post Reddit Comment n8n node. If irrelevant, it is logged via the Log Irrelevant Post n8n node, and the n8n workflow moves to process the next item in the batch.

Installation Guide

To deploy this powerful n8n workflow, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON and paste it into your n8n instance using the 'New' -> 'Import from JSON' option.

  2. Reddit Credentials: Set up your Reddit credential for the Get Reddit Posts and Post Reddit Comment n8n nodes. This requires OAuth access for posting.

  3. Google Sheets Setup: Configure credentials for the three Google Sheets n8n nodes (Get Existing Posts1, Log Relevant Post, Log Irrelevant Post). You must specify the exact spreadsheet ID and sheet names where the post IDs will be read from and where the activity logs will be written.

  4. Ollama Connection: Configure the Ollama Chat Model n8n node to point to your running Ollama server instance (local or remote). Ensure the specified model (e.g., llama3) is pulled and available.

  5. Custom Code Review: Review the Filter New Posts and Parse AI Response n8n node code to ensure it matches your expected data structure, especially if you modify the input data from Reddit.

  6. Activate: Once credentials are set for every n8n node, activate the n8n workflow.

Node Details


  • n8n-nodes-base.manualTrigger (When clicking ‘Test workflow’): The starting n8n trigger point for manual execution and testing of the n8n workflow.

  • n8n-nodes-base.reddit (Get Reddit Posts): Fetches the target posts based on specified subreddits and query parameters (e.g., sorting by 'New').

  • n8n-nodes-base.googleSheets (Get Existing Posts1): Reads the master list of post IDs already processed by the n8n workflow, vital for avoiding duplicate engagement.

  • n8n-nodes-base.code (Filter New Posts): An essential custom n8n node utilizing JavaScript logic to compare and remove duplicate post IDs before costly AI analysis, maximizing the efficiency of the n8n template.

  • @n8n/n8n-nodes-langchain.lmChatOllama (Ollama Chat Model): Configured to connect to a self-hosted Ollama service. This acts as the LLM backbone (likely Llama3) for the subsequent Langchain agent n8n node.

  • @n8n/n8n-nodes-langchain.agent (AI Relevance Analysis): The core decision-making n8n node. Key configurations include the detailed system prompt that guides the Llama3 model to analyze relevance and generate a structured output including the personalized response.

  • n8n-nodes-base.if (Is Post Relevant?): The crucial flow control n8n node that branches the n8n workflow execution based on the Boolean relevance flag extracted from the AI's output.

  • n8n-nodes-base.googleSheets (Log Relevant Post / Log Irrelevant Post): Two separate Google Sheets n8n nodes used to maintain a comprehensive audit log of the activity of this sophisticated n8n workflow.

  • n8n-nodes-base.reddit (Post Reddit Comment): The final action n8n node, configured to publish the AI-generated and highly relevant comment back to the original Reddit thread.

Related n8n Workflows

Paid

Nodes: 10 Nodes
Updated: December 26 2025
View all
Created by
Dhrumil Barot
Dhrumil Barot

Featured*