Viral Content Engine: Reddit Pain Points to AI-Generated LinkedIn Posts - n8n Workflow

Maximize social engagement with this advanced n8n workflow. Scrape business pain points from Reddit, use AI (Gemini, OpenAI) to generate viral content and images, and publish automatically to LinkedIn.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  1. Social media managers and content creators seeking automated content generation.

  2. B2B marketers who want to identify high-value customer pain points.

  3. Automation specialists looking for advanced AI and custom logic within an n8n workflow.

  4. Agencies needing high-volume, niche-specific content marketing n8n templates.

Overview

This comprehensive n8n workflow acts as a fully automated content engine, solving the core problem of finding relevant, engaging, and unique content ideas. It leverages multiple data sources (Reddit) and sophisticated AI models (Gemini 2.5 Pro, OpenAI 4.1 Mini) to transform raw community data into polished, viral-ready LinkedIn posts.

The automation begins by monitoring high-traffic business subreddits (Dentistry, Real Estate, HR, etc.) for posts indicating user pain points. Using advanced LangChain n8n node agents, it extracts the core problem, crafts a compelling solution, generates a custom visual prompt, and creates the final image using a service like Freepik. The result is a high-quality post—text and image—published directly to LinkedIn, all managed through a robust scheduling n8n trigger. This structure showcases the power of integrated AI within the n8n platform.

How it Works

This powerful n8n workflow operates in two main phases: Data Acquisition & Analysis, and Content Generation & Publishing.

Phase 1: Data Acquisition and Analysis


  1. Trigger and Scraping: A Schedule Trigger initiates the flow, activating ten parallel Reddit n8n node operations to scrape popular posts across various business niches (e.g., Dentist, Accounting, HR).

  2. Consolidation and Filtering: A Merger node combines all scraped data. A Filter node (+5 UPS) ensures only highly engaged posts (those with significant upvotes/engagement) proceed, focusing on validated pain points.

  3. Pain Point Extraction: The Loop Over Items n8n node processes each item. The agentepainpoints LangChain n8n node, powered by OpenAI 4.1 Mini, extracts the precise pain point from the Reddit post text.

  4. Solution Generation: If extraction is successful, the agentesoluciones LangChain n8n node uses AI to craft a solution or transformation narrative related to the pain point.

  5. Data Logging: The refined pain points and generated solutions are saved to Google Sheets via the Append row in sheet n8n node for record-keeping and future reference.

Phase 2: Content Generation and Publishing


  1. Topic Selection: A separate Schedule Trigger1 starts the publishing sequence. The nichoaleatorio LangChain n8n node selects a random niche or pain point saved in Google Sheets (Extraerpainpoints).

  2. Post Copy Generation: The agentepost LangChain n8n node, utilizing Gemini 2.5 Pro and integrating the SerpAPI tool for real-time data, generates the final, high-impact LinkedIn post copy.

  3. Visual Prompting: The promptimagen LangChain n8n node generates an optimized text prompt for image generation, ensuring the visual matches the post's theme.

  4. Image Creation and Retrieval: An HTTP Request n8n node (Crear Imagen) sends the prompt to an image service (like Freepik). After a Wait period, subsequent HTTP Request nodes retrieve the image URL and download the actual binary image data (Descargar_imagen1).

  5. Publishing: Finally, the Create a post1 LinkedIn n8n node publishes the generated text and the associated visual asset, completing the automation.

Installation Guide

To deploy this comprehensive n8n workflow template, follow these steps:


  1. Import: Copy the entire JSON code provided and paste it into your n8n canvas using the 'Import Workflow' function.

  2. Credentials Setup: You will need credentials for the following services:

Reddit: Required for the Get many posts n8n node operations (Scraping).
Google Sheets: Needed for the Extraerpainpoints and Append row in sheet nodes.
LinkedIn: Essential for the Create a post1 n8n node.
AI Services (LangChain/OpenRouter): Configure credentials for Gemini (or OpenRouter connection to Gemini 2.5 Pro) and OpenAI (or OpenRouter connection to OpenAI 4.1 Mini) used by the LangChain n8n node agents.
SerpAPI: Credentials required for the integrated search tool.
Freepik/Image Service: The custom HTTP Request n8n node operations require API keys or credentials for your chosen image generation platform.

  1. Configuration: Update the spreadsheet ID in the Google Sheets n8n node operations and verify the subreddits and filtering criteria in the Reddit and Filter n8n node settings to match your target niches.

  2. Activation: Set the Schedule Trigger nodes to your desired execution frequency and activate the n8n workflow.

Node Details

This advanced n8n workflow utilizes many specialized and custom nodes:

Schedule Trigger (n8n trigger): Initiates the flow based on a defined schedule, controlling when scraping and posting occur.
Reddit (Get many posts): Executes the scraping action, collecting recent and popular posts from specific subreddits (e.g., r/Dentistry, r/RealEstate). Key Configuration: Operation: Get Many.
Merger: Combines the results from all ten parallel Reddit n8n node operations into a single stream for unified processing.
Filter (+5 UPS): Filters items based on criteria, likely filtering for posts with a minimum number of upvotes to ensure content relevance and popularity.
Split In Batches (Loop Over Items): Manages the asynchronous processing of items, ensuring each pain point is handled individually by the AI agents.
@n8n/n8n-nodes-langchain.chainLlm (agentepainpoints, agentesoluciones, nichoaleatorio, promptimagen): These are core AI processors. They use custom prompts and models (OpenAI 4.1 Mini and Gemini 2.5 Pro) to perform specific tasks: extracting pain points, generating solutions, selecting topics, and crafting image prompts. This custom logic is crucial to the success of this n8n template.
@n8n/n8n-nodes-langchain.agent (agentepost): A sophisticated AI n8n node that uses the Gemini 2.5 Pro model with the SerpAPI tool to generate final, SEO-friendly LinkedIn post copy.
Google Sheets (Append row in sheet): Stores the extracted pain points and AI-generated solutions persistently.
HTTP Request (Crear Imagen, Getfreepik, Descargarimagen1): Handles interaction with the external image generation API (likely Freepik), including requesting generation, polling for results, and downloading the final binary image file.
LinkedIn (Create a post1): The final action n8n node, responsible for uploading the generated image and publishing the associated AI text content to the user’s LinkedIn profile.

Related n8n Workflows

Paid

Nodes: 19 Nodes
Updated: December 26 2025
View all
Created by

As a strategic consultant in Automation and AI, I'm passionate about helping business owners simplify operations and scale smarter. My approach is a partnership: I listen to your unique needs to design custom solutions that solve real challenges. But I don't just build and leave—I also coach your team to master these new systems, empowering you for sustainable success. Beyond client work, I'm a true enthusiast, always exploring new possibilities and sharing what I learn with the community.

Featured*