AutomationFlowsAI & RAG › Draft Reddit Reply Suggestions with Openai and Send Them to Slack

Draft Reddit Reply Suggestions with Openai and Send Them to Slack

ByPavel Vainshtein @webflowforge on n8n.io

This workflow runs every morning, reads recent posts from selected subreddits via Reddit RSS feeds, uses OpenAI (via LangChain) to shortlist threads and draft helpful replies, and sends the drafts (or a “nothing worth answering” notice) to a Slack channel. Runs every morning at…

Cron / scheduled trigger★★★★☆ complexityAI-powered19 nodesRSS Feed ReadChain LlmOpenAI ChatOutput Parser StructuredSlack
AI & RAG Trigger: Cron / scheduled Nodes: 19 Complexity: ★★★★☆ AI nodes: yes Added:

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

This workflow follows the Chainllm → OpenAI Chat 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
{
  "name": "Draft AI replies to Reddit posts and send them to Slack",
  "nodes": [
    {
      "id": "sticky-1",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -680,
        -80
      ],
      "parameters": {
        "color": 1,
        "width": 560,
        "height": 1080,
        "content": "## Draft AI replies to Reddit posts and send them to Slack\n\n### Who's it for\nFreelancers, studios, and consultants who win work from Reddit but do not want to\nspend an hour a day scrolling. Also anyone building a reputation in a niche\ncommunity without spamming it.\n\n### How it works\nEvery morning the workflow reads the subreddits you choose over public RSS. No\nReddit account, app registration, or API key is required. Posts from the last N\nhours are cleaned up and handed to a language model, which picks at most three\nthreads where a genuinely useful reply is possible and drafts that reply in a\nplain, non-salesy voice. Each draft arrives in Slack with a link to the thread.\nWhen nothing is worth answering it says so rather than forcing picks. Nothing is\never posted to Reddit - you review and reply by hand.\n\n### How to set up\n1. Open \"Configure here\" and list the subreddits you want to follow.\n2. Add your credentials to the language model node.\n3. Pick your Slack channel on both Slack nodes.\n\n### Requirements\nAn OpenAI (or compatible) API key and a Slack account. No Reddit credentials.\n\n### How to customize\nSwap /new/.rss for a search feed to follow keywords instead of whole subreddits.\nTune maxThreads, lookbackHours, or the selection prompt to match your niche."
      },
      "typeVersion": 1
    },
    {
      "id": "sticky-2",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        -300
      ],
      "parameters": {
        "color": 7,
        "width": 420,
        "height": 200,
        "content": "### 1. Schedule and configuration\nEverything you need to edit lives in the Set node."
      },
      "typeVersion": 1
    },
    {
      "id": "sticky-3",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        -300
      ],
      "parameters": {
        "color": 7,
        "width": 620,
        "height": 200,
        "content": "### 2. Fetch and filter\nPublic RSS - no Reddit API key needed."
      },
      "typeVersion": 1
    },
    {
      "id": "sticky-4",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1020,
        -300
      ],
      "parameters": {
        "color": 7,
        "width": 560,
        "height": 200,
        "content": "### 3. AI shortlist and draft\nReturns at most maxThreads picks, or none."
      },
      "typeVersion": 1
    },
    {
      "id": "sticky-5",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        -300
      ],
      "parameters": {
        "color": 7,
        "width": 560,
        "height": 200,
        "content": "### 4. Review in Slack\nDrafts only. Nothing is posted to Reddit."
      },
      "typeVersion": 1
    },
    {
      "id": "trigger",
      "name": "Every morning at 9am",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 9
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "config",
      "name": "Configure here",
      "type": "n8n-nodes-base.set",
      "position": [
        200,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "f0",
              "name": "subreddits",
              "type": "string",
              "value": "webflow, n8n, nocode, web_design"
            },
            {
              "id": "f1",
              "name": "lookbackHours",
              "type": "number",
              "value": "24"
            },
            {
              "id": "f2",
              "name": "maxThreads",
              "type": "number",
              "value": "3"
            }
          ]
        },
        "includeOtherFields": false
      },
      "typeVersion": 3.4
    },
    {
      "id": "urls",
      "name": "Build feed URLs",
      "type": "n8n-nodes-base.code",
      "position": [
        420,
        0
      ],
      "parameters": {
        "jsCode": "// Turns the comma separated list from 'Configure here' into one item per subreddit.\nconst subs = String($json.subreddits)\n  .split(',')\n  .map(s => s.trim().replace(/^r\\//, ''))\n  .filter(Boolean);\n\nreturn subs.map(s => ({\n  json: { subreddit: s, feedUrl: `https://www.reddit.com/r/${s}/new/.rss` },\n}));"
      },
      "typeVersion": 2
    },
    {
      "id": "rss",
      "name": "Read subreddit RSS",
      "type": "n8n-nodes-base.rssFeedRead",
      "onError": "continueRegularOutput",
      "position": [
        640,
        0
      ],
      "parameters": {
        "url": "={{ $json.feedUrl }}",
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "recent",
      "name": "Keep recent posts only",
      "type": "n8n-nodes-base.filter",
      "position": [
        860,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "recent",
              "operator": {
                "type": "dateTime",
                "operation": "after"
              },
              "leftValue": "={{ $json.isoDate }}",
              "rightValue": "={{ $now.minus($('Configure here').first().json.lookbackHours, 'hours').toISO() }}"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "clean",
      "name": "Trim to essentials",
      "type": "n8n-nodes-base.code",
      "position": [
        1080,
        0
      ],
      "parameters": {
        "jsCode": "// Strip HTML and trim so the language model gets a small, clean payload.\nreturn $input.all().map(item => {\n  const j = item.json;\n  const body = (j.contentSnippet || j.content || '')\n    .replace(/<[^>]*>/g, ' ')\n    .replace(/\\s+/g, ' ')\n    .trim()\n    .slice(0, 600);\n  const m = (j.link || '').match(/reddit\\.com\\/r\\/([^\\/]+)/);\n  return { json: {\n    title: j.title || '',\n    url: j.link || '',\n    author: j.author || '',\n    subreddit: m ? m[1] : '',\n    posted: j.isoDate || '',\n    body,\n  }};\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "agg",
      "name": "Bundle posts for the model",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1300,
        0
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "llm",
      "name": "Shortlist and draft replies",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1520,
        0
      ],
      "parameters": {
        "text": "=You are helping an experienced practitioner find Reddit threads genuinely worth replying to.\n\nToday's posts as JSON:\n{{ JSON.stringify($json.data) }}\n\nPick AT MOST {{ $('Configure here').first().json.maxThreads }} threads where a thoughtful reply would actually help the person asking. Prefer people asking for help, pricing guidance, tool choices, or hitting a specific problem. Skip memes, showcases, hiring ads, rants, and anything already well answered.\n\nFor each thread you pick, write a reply that:\n- answers the question directly, with specifics or numbers where possible\n- reads like a person typing on Reddit, not marketing copy\n- contains no pitch, no link to your own work, no \"DM me\"\n- is 100 to 250 words\n\nIf nothing today is worth answering, return an empty list. An empty list is a good answer - do not force picks.",
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.5
    },
    {
      "id": "model",
      "name": "Language model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1480,
        220
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "parser",
      "name": "Structured output",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1620,
        220
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"threads\": [\n    {\n      \"title\": \"What should a 10 page marketing site cost?\",\n      \"url\": \"https://www.reddit.com/r/webflow/comments/example/\",\n      \"subreddit\": \"webflow\",\n      \"why\": \"Direct pricing question with no good answer yet\",\n      \"draft_reply\": \"The honest range here is...\"\n    }\n  ]\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "anyworth",
      "name": "Anything worth answering",
      "type": "n8n-nodes-base.if",
      "position": [
        1780,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "any",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $json.output.threads.length }}",
              "rightValue": 0
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "split",
      "name": "One message per thread",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2000,
        -120
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "output.threads"
      },
      "typeVersion": 1
    },
    {
      "id": "slack1",
      "name": "Post draft to Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        2220,
        -120
      ],
      "parameters": {
        "text": "=*<{{ $json.url }}|{{ $json.title }}>*\n_r/{{ $json.subreddit }} - {{ $json.why }}_\n\n```{{ $json.draft_reply }}```",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultName": ""
        },
        "otherOptions": {
          "mrkdwn": true
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "slack2",
      "name": "Report a quiet day to Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        2000,
        140
      ],
      "parameters": {
        "text": "=Nothing worth answering on Reddit today - checked {{ $('Bundle posts for the model').item.json.data.length }} new posts.",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultName": ""
        },
        "otherOptions": {
          "mrkdwn": true
        }
      },
      "typeVersion": 2.3
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "Configure here": {
      "main": [
        [
          {
            "node": "Build feed URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Language model": {
      "ai_languageModel": [
        [
          {
            "node": "Shortlist and draft replies",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Build feed URLs": {
      "main": [
        [
          {
            "node": "Read subreddit RSS",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured output": {
      "ai_outputParser": [
        [
          {
            "node": "Shortlist and draft replies",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Read subreddit RSS": {
      "main": [
        [
          {
            "node": "Keep recent posts only",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trim to essentials": {
      "main": [
        [
          {
            "node": "Bundle posts for the model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Every morning at 9am": {
      "main": [
        [
          {
            "node": "Configure here",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Keep recent posts only": {
      "main": [
        [
          {
            "node": "Trim to essentials",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "One message per thread": {
      "main": [
        [
          {
            "node": "Post draft to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anything worth answering": {
      "main": [
        [
          {
            "node": "One message per thread",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Report a quiet day to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Bundle posts for the model": {
      "main": [
        [
          {
            "node": "Shortlist and draft replies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Shortlist and draft replies": {
      "main": [
        [
          {
            "node": "Anything worth answering",
            "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 workflow runs every morning, reads recent posts from selected subreddits via Reddit RSS feeds, uses OpenAI (via LangChain) to shortlist threads and draft helpful replies, and sends the drafts (or a “nothing worth answering” notice) to a Slack channel. Runs every morning at…

Source: https://n8n.io/workflows/17567/ — 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

This workflow is designed for Japanese-speaking professionals, and learners who want to efficiently stay up to date with practical productivity, lifehack, and efficiency-related insights from Japanese

RSS Feed Read, Chain Llm, Google Gemini Chat +7
AI & RAG

公認資格ワークフロー. Uses rssFeedRead, chainLlm, lmChatGoogleGemini, outputParserStructured. Scheduled trigger; 25 nodes.

RSS Feed Read, Chain Llm, Google Gemini Chat +5
AI & RAG

This workflow runs daily, pulls the latest post from an RSS feed, and uses OpenAI to repurpose it into an SEO blog rewrite, a LinkedIn post, and an X/Twitter thread, then logs the drafts to Google She

RSS Feed Read, Chain Llm, OpenAI Chat +4
AI & RAG

This n8n-powered workflow automates the entire lifecycle of real estate lead intake, qualification, routing, assignment, and reporting across multiple channels. It brings WhatsApp inquiries and websit

Gmail, Typeform Trigger, WhatsApp Trigger +8
AI & RAG

My workflow 14. Uses rssFeedRead, chainLlm, lmChatOpenAi, openWeatherMap. Scheduled trigger; 40 nodes.

RSS Feed Read, Chain Llm, OpenAI Chat +6