AutomationFlowsAI & RAG › Detect Reddit Problems & Auto-comment Solutions with Google Gemini & Sheets

Detect Reddit Problems & Auto-comment Solutions with Google Gemini & Sheets

ByKamran habib @virtualdepth on n8n.io

This n8n workflow automates Reddit community engagement by detecting posts that discuss problems and automatically replying with AI-generated solutions — powered by Google Gemini.

Event trigger★★★★☆ complexityAI-powered20 nodesAgentGoogle Gemini ChatRedditGoogle Sheets
AI & RAG Trigger: Event Nodes: 20 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #10343 — we link there as the canonical source.

This workflow follows the Agent → 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 →

Download .json
{
  "id": "BEji2e0zxDfm2TCt",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "AI automation for Reddit Problems",
  "tags": [],
  "nodes": [
    {
      "id": "35fec5df-e393-4d93-b2b5-cc244e34c7fd",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -3328,
        208
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "756450ba-a661-4a3f-a7cf-062c1d97d35f",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -2352,
        192
      ],
      "parameters": {
        "text": "=Define weather the reddit post is talking about the problems faced by the users of AI Automation or they need a solution on how they want  bew features in AI Automation. the post should mention a specific problem faced by the users.\n\nReddit Post:  {{ $json.selftext }}\n\nIs this post is about a problem that users are facing about AI Automation or they need new features, Just answer with Yes or No.",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 3
    },
    {
      "id": "933d79ab-cabf-4a4c-8e23-e795ee59e92e",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -2320,
        368
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "3d1ee156-858b-477f-a1f9-92cb89ff04d2",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        -2064,
        208
      ],
      "parameters": {
        "mode": "combine",
        "options": {
          "includeUnpaired": true
        },
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "eb9a9ebb-0352-4968-9b5d-70c91d05df0c",
      "name": "AI Agent1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1584,
        192
      ],
      "parameters": {
        "text": "=Based on the reddit post, suggest  a plan or a solution on how i fix the issues  the users are facing with Sora 2.\n\nReddit Post: {{ $json.selftext }}\n\nProvide a concise solution on how we can fix the problems in slack based on the reddit post. \nExplain the solution",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 3
    },
    {
      "id": "8c17f645-76ed-4806-ad95-77a4ca5352e9",
      "name": "Google Gemini Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -1344,
        304
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.0-flash"
      },
      "typeVersion": 1
    },
    {
      "id": "b6de179b-ff6d-4d3a-a175-b0aa7754e499",
      "name": "Merge1",
      "type": "n8n-nodes-base.merge",
      "position": [
        -1264,
        176
      ],
      "parameters": {
        "mode": "combine",
        "options": {
          "clashHandling": {
            "values": {
              "resolveClash": "preferInput1"
            }
          }
        },
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "c8affa4e-c19e-40ec-b16c-84a123886e5d",
      "name": "Create a comment in a post",
      "type": "n8n-nodes-base.reddit",
      "position": [
        -864,
        176
      ],
      "parameters": {
        "postId": "={{ $json.Bio }}",
        "resource": "postComment",
        "commentText": "={{ $json['Full Name'] }}"
      },
      "typeVersion": 1
    },
    {
      "id": "8a69784f-8906-4e0c-b950-e8bcf2e09a99",
      "name": "Append row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1056,
        176
      ],
      "parameters": {
        "columns": {
          "value": {
            "Bio": "={{ $json.created }}",
            "username": "={{ $json.selftext }}",
            "Full Name": "={{ $json.output }}",
            "Profile ID,": "={{ $json.title }}",
            "Follower Count": "={{ $json.subreddit_id }}"
          },
          "schema": [
            {
              "id": "username",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "username",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Full Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Full Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Profile ID,",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Profile ID,",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Follower Count",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Follower Count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Bio",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Bio",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Follower Count",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Follower Count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1703783376,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ic80xnSBq5RsNC5CDUEuaEoze4PDzhL9IPS0jj8z45I/edit#gid=1703783376",
          "cachedResultName": "Sheet2"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1ic80xnSBq5RsNC5CDUEuaEoze4PDzhL9IPS0jj8z45I",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ic80xnSBq5RsNC5CDUEuaEoze4PDzhL9IPS0jj8z45I/edit?usp=drivesdk",
          "cachedResultName": "Untitled spreadsheet"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "5fd3bc9a-5782-4433-86ff-da5b26ac6b90",
      "name": "Post Searching",
      "type": "n8n-nodes-base.reddit",
      "position": [
        -2976,
        208
      ],
      "parameters": {
        "limit": 10,
        "keyword": "Why i stopped using",
        "operation": "search",
        "subreddit": "n8n",
        "additionalFields": {}
      },
      "typeVersion": 1
    },
    {
      "id": "25b867fb-60cd-4515-bc31-ef0cd676dda2",
      "name": "If Condition",
      "type": "n8n-nodes-base.if",
      "position": [
        -2768,
        208
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "751771bf-3129-4806-a686-11d98ecfce3e",
              "operator": {
                "type": "number",
                "operation": "gte"
              },
              "leftValue": "={{ $json.ups }}",
              "rightValue": 2
            },
            {
              "id": "cda8f6cf-9c1f-49bd-afb0-6b404a9d054d",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.selftext }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "a0b43120-0737-426a-a3c4-84e25d95fc04",
      "name": "Value setup",
      "type": "n8n-nodes-base.set",
      "position": [
        -2528,
        192
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "7fc31f22-be37-4195-a26a-40054f74001b",
              "name": "title",
              "type": "string",
              "value": "={{ $json.title }}"
            },
            {
              "id": "da1b8bf9-c1a8-4c6b-b85d-379c91b45241",
              "name": "selftext",
              "type": "string",
              "value": "={{ $json.selftext }}"
            },
            {
              "id": "fea02618-7f96-474c-bcb5-a3e24508ecdb",
              "name": "ups",
              "type": "number",
              "value": "={{ $json.ups }}"
            },
            {
              "id": "b3c743d2-8e5a-48d9-a835-d53d178fb4da",
              "name": "created",
              "type": "number",
              "value": "={{ $('Post Searching').item.json.created }}"
            },
            {
              "id": "75c7a180-6451-4a07-aa09-4d54019c3257",
              "name": "url",
              "type": "string",
              "value": "={{ $json.url }}"
            },
            {
              "id": "a314d8bd-aa43-4b3a-bb35-acd777979939",
              "name": "subreddit_id",
              "type": "string",
              "value": "={{ $json.subreddit_id }}"
            },
            {
              "id": "87e595d0-e201-4b3f-a75b-396aa4202fd9",
              "name": "id",
              "type": "string",
              "value": "={{ $json.id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "dc1e2c07-9cbd-4cfd-ba6a-c86c67aabe4c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3472,
        -64
      ],
      "parameters": {
        "width": 440,
        "height": 592,
        "content": "## Manual Trigger (Template Demo)\nThis workflow starts with a **Manual Trigger** so reviewers can run it immediately from the Editor via **Execute workflow**.\n\nIn your own automations you can replace this with a **Schedule Trigger** or a **Webhook**. For the template, keeping it manual makes it easier to test the downstream Reddit search and AI steps without extra setup.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "4e5dc346-052c-4dfb-9bc3-7095cc1322df",
      "name": "If Condition 2",
      "type": "n8n-nodes-base.if",
      "position": [
        -1872,
        208
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "a80000e7-0860-41f4-a64f-087c176ca5a3",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.output }}",
              "rightValue": "Yes"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "f48bffbe-c4de-4072-a2e0-dc5e5dcc5f0c",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3024,
        -64
      ],
      "parameters": {
        "color": 6,
        "width": 640,
        "height": 584,
        "content": "## Search & Filter Reddit Posts (Data Source)\n**Post Searching (Reddit)** looks for posts in r/n8n with the keyword **\u201cWhy i stopped using\u201d**. \n\n**If Condition** then filters results to avoid noise:\n- `ups >= 2` \u2192 keeps posts with at least two upvotes (signals relevance).\n- `selftext not empty` \u2192 ignores link-only or empty posts.\n\nThese constraints make the AI analysis more reliable by focusing on substantive posts that actually describe problems.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "aae71a32-f119-4536-ae33-7b4f568ee7dc",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2368,
        -64
      ],
      "parameters": {
        "color": 7,
        "width": 720,
        "height": 584,
        "content": "## Problem Classifier (AI Analyzer)\n**Value setup (Set)** normalizes useful fields from the Reddit item (`title`, `selftext`, `ups`, `created`, etc.).\n\n**AI Agent** (LLM) is prompted to answer **Yes/No** to: \n\u201cIs this post about a user problem with AI automation (vs. a feature request)?\u201d\n\nThe **Google Gemini Chat Model** provides the language model for the agent.\n**Merge** simply passes through the AI result along with the original item so we can branch next.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "5a23ac83-1cbf-470c-a31f-9b78cfb49c83",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1632,
        -64
      ],
      "parameters": {
        "color": 7,
        "width": 1008,
        "height": 544,
        "content": "## Solution Generator (AI)\n**If Condition 2** checks the classifier's output:\n- When `$json.output` **contains \"Yes\"**, the post is treated as a real problem.\n\nFor qualifying posts, **AI Agent1** generates a concise, actionable plan to address the problem (prompt references the Reddit `selftext`).\nThe **Google Gemini Chat Model1** supplies the model (`gemini-2.0-flash`) for fast, low-latency responses.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "6717c8a9-d983-4f8a-889a-2fb1a2057c02",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1632,
        496
      ],
      "parameters": {
        "width": 1008,
        "height": 264,
        "content": "## Store Results & (Optionally) Reply\n**Merge1** combines the original Reddit fields with the AI-generated solution (prefers input1 on clashes).\n\n**Append row in sheet (Google Sheets)** archives key fields so you can review solutions later. \n- Mapped columns: `Full Name` \u2190 AI output (solution text), `username` \u2190 `selftext`, `Profile ID` \u2190 `title`, etc.\n- Update the target Spreadsheet ID and sheet name to your own doc.\n\n**Create a comment in a post (Reddit)** demonstrates posting back. \n- Update `postId` and `commentText` mappings to your desired fields (e.g., use the Reddit `id` as `postId` and the AI output as the comment text).\n- Keep this **disabled** until you have tested safely.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "77196185-7cf5-499e-baa1-6acff8328ff6",
      "name": "Sticky Note - Credentials",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3472,
        544
      ],
      "parameters": {
        "color": 6,
        "width": 1096,
        "height": 200,
        "content": "## Credentials & Safety\n- **Reddit (OAuth)**: Required by *Post Searching* and *Create a comment in a post*.\n- **Google Sheets**: Needed by *Append row in sheet*.\n- **Google Gemini**: Needed by both AI Agent nodes (set your model and project).\n\n**Tip:** Test with read-only actions first. Keep the reply node disabled until you verify outputs. Consider rate limits and community rules before posting automatically.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "0b3851c9-5cb8-46ef-838d-5271ee4e8991",
      "name": "Sticky Note - How to Reuse",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2352,
        544
      ],
      "parameters": {
        "color": 6,
        "width": 704,
        "height": 208,
        "content": "## How to Reuse / Customize\n1) Change the subreddit and keyword in **Post Searching** to target your audience.\n2) Adjust the **If** thresholds (e.g., `ups >= 5`) to control quality.\n3) Refine the **classifier prompt** to match your product or domain.\n4) Edit the **solution prompt** to match your support tone and policies.\n5) Map the **Google Sheets** fields to your own schema.\n6) When ready, point **postId** to the Reddit post ID and **commentText** to the AI solution to reply automatically.\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "488ed89a-1f72-4aac-9f75-08d59d1ccbd0",
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "If Condition 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent1": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Value setup": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "If Condition": {
      "main": [
        [
          {
            "node": "Value setup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Condition 2": {
      "main": [
        [
          {
            "node": "AI Agent1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Post Searching": {
      "main": [
        [
          {
            "node": "If Condition",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet": {
      "main": [
        [
          {
            "node": "Create a comment in a post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Post Searching",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This n8n workflow automates Reddit community engagement by detecting posts that discuss problems and automatically replying with AI-generated solutions — powered by Google Gemini.

Source: https://n8n.io/workflows/10343/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Episode 15: Startup ideas for YC RFS. Uses lmChatOpenAi, googleSheets, agent, informationExtractor. Event-driven trigger; 33 nodes.

OpenAI Chat, Google Sheets, Agent +12
AI & RAG

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Reddit, Agent, Google Gemini Chat +1
AI & RAG

This workflow creates a multi-talented AI assistant named Simran that interacts with users via Telegram. It can handle text and voice messages, understand the user's intent, and perform various tasks.

MongoDB, Chain Llm, Google Gemini Chat +11
AI & RAG

This project is a template for building a complete academic virtual assistant using n8n. It connects to Telegram, answers frequently asked questions by querying MongoDB, keeps the community informed a

Telegram, MongoDB, Telegram Trigger +6
AI & RAG

> Note: This workflow uses sticky notes extensively to document each logical section of the automation. Sticky notes are mandatory and already included to explain OCR, AI parsing, folder logic, dup

QuickBooks, Google Sheets, Google Drive +5