AutomationFlowsSocial Media › Reddit Collector to Sheets (rss + JSON Scoring)

Reddit Collector to Sheets (rss + JSON Scoring)

Reddit Collector to Sheets (RSS + JSON scoring). Uses httpRequest, xml, googleSheets. Scheduled trigger; 11 nodes.

Cron / scheduled trigger★★★★☆ complexity11 nodesHTTP RequestXMLGoogle Sheets
Social Media Trigger: Cron / scheduled Nodes: 11 Complexity: ★★★★☆ Added:

This workflow follows the Google Sheets → HTTP Request 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": "Reddit Collector to Sheets (RSS + JSON scoring)",
  "nodes": [
    {
      "parameters": {
        "triggerTimes": {
          "item": [
            {
              "mode": "everyDay",
              "hour": 9,
              "minute": 5
            },
            {
              "mode": "everyDay",
              "hour": 13,
              "minute": 5
            },
            {
              "mode": "everyDay",
              "hour": 18,
              "minute": 5
            }
          ]
        }
      },
      "name": "Cron",
      "type": "n8n-nodes-base.cron",
      "typeVersion": 1,
      "position": [
        240,
        260
      ]
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "rssUrls",
              "value": "https://www.reddit.com/r/Moving/new.rss,https://www.reddit.com/r/FirstTimeHomeBuyer/new.rss,https://www.reddit.com/r/SameGrassButGreener/new.rss,https://www.reddit.com/r/florida/new.rss,https://www.reddit.com/r/bocaraton/new.rss,https://www.reddit.com/r/fortlauderdale/new.rss,https://www.reddit.com/r/delraybeach/new.rss,https://www.reddit.com/r/broward/new.rss,https://www.reddit.com/r/palmbeach/new.rss"
            },
            {
              "name": "keywords",
              "value": "moving,relocating,relocation,neighborhood,neighbourhood,rent vs buy,first time buyer,hoa,insurance,flood,schools,commute,property tax,boca raton,delray,parkland,coral springs,fort lauderdale,broward,palm beach"
            }
          ],
          "number": [
            {
              "name": "minComments",
              "value": 2
            },
            {
              "name": "minScore",
              "value": 3
            }
          ]
        }
      },
      "name": "Config",
      "type": "n8n-nodes-base.set",
      "typeVersion": 2,
      "position": [
        440,
        260
      ]
    },
    {
      "parameters": {
        "functionCode": "const rssUrls = $json.rssUrls.split(',').map(s => s.trim()).filter(Boolean);\nconst keywords = $json.keywords.split(',').map(s => s.trim().toLowerCase()).filter(Boolean);\nreturn rssUrls.map(u => ({ json: { rssUrl: u, keywords, minComments: $json.minComments, minScore: $json.minScore } }));"
      },
      "name": "Split RSS URLs",
      "type": "n8n-nodes-base.function",
      "typeVersion": 2,
      "position": [
        640,
        260
      ]
    },
    {
      "parameters": {
        "url": "={{$json.rssUrl}}",
        "options": {}
      },
      "name": "Fetch RSS",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        840,
        260
      ]
    },
    {
      "parameters": {
        "options": {}
      },
      "name": "Parse XML",
      "type": "n8n-nodes-base.xml",
      "typeVersion": 2,
      "position": [
        1040,
        260
      ]
    },
    {
      "parameters": {
        "functionCode": "const items = $json.rss?.channel?.[0]?.item || [];\nconst { keywords, minComments, minScore } = $input.first().json;\n\nfunction getPostId(link) {\n  const m = link.match(/\\/comments\\/([a-z0-9]+)\\//i);\n  return m ? m[1] : '';\n}\n\nfunction getSubreddit(link) {\n  const m = link.match(/reddit\\.com\\/r\\/([^\\/]+)\\//i);\n  return m ? m[1] : '';\n}\n\nconst out = [];\nfor (const it of items) {\n  const title = (it.title?.[0] || '').toString();\n  const link = (it.link?.[0] || '').toString();\n  const desc = (it.description?.[0] || '').toString();\n  const allText = (title + ' ' + desc).toLowerCase();\n\n  const match = keywords.find(k => k && allText.includes(k));\n  if (!match) continue;\n\n  const post_id = getPostId(link);\n  if (!post_id) continue;\n\n  out.push({\n    json: {\n      post_id,\n      date_found: new Date().toISOString(),\n      subreddit: getSubreddit(link),\n      title,\n      post_url: link,\n      keyword_matched: match,\n      minComments,\n      minScore\n    }\n  });\n}\nreturn out;"
      },
      "name": "Extract RSS Items",
      "type": "n8n-nodes-base.function",
      "typeVersion": 2,
      "position": [
        1240,
        260
      ]
    },
    {
      "parameters": {
        "url": "={{$json.post_url.endsWith('/') ? $json.post_url + '.json' : $json.post_url + '/.json'}}",
        "options": {
          "responseFormat": "json"
        }
      },
      "name": "Fetch Thread JSON",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        1440,
        260
      ]
    },
    {
      "parameters": {
        "functionCode": "const body = $json;\nconst post = body?.[0]?.data?.children?.[0]?.data || {};\n\nconst upvotes = Number(post.ups || 0);\nconst comment_count = Number(post.num_comments || 0);\nconst score = (comment_count * 2) + upvotes;\n\nconst minComments = Number($input.first().json.minComments || 0);\nconst minScore = Number($input.first().json.minScore || 0);\n\nif (comment_count < minComments) return [];\nif (score < minScore) return [];\n\nreturn [{\n  json: {\n    post_id: post.id || $input.first().json.post_id,\n    date_found: $input.first().json.date_found,\n    subreddit: $input.first().json.subreddit,\n    title: post.title || $input.first().json.title,\n    post_url: post.permalink ? 'https://www.reddit.com' + post.permalink : $input.first().json.post_url,\n    keyword_matched: $input.first().json.keyword_matched,\n    comment_count,\n    upvotes,\n    score,\n    status: 'new'\n  }\n}];"
      },
      "name": "Score + Filter",
      "type": "n8n-nodes-base.function",
      "typeVersion": 2,
      "position": [
        1640,
        260
      ]
    },
    {
      "parameters": {
        "operation": "lookup",
        "documentId": "1n8TfxlswtIVqHgRg7JOkUri6BQa9NYrTTGqDZXOmGxY",
        "sheetName": "Reddit_Inbox",
        "lookupColumn": "post_id",
        "lookupValue": "={{$json.post_id}}"
      },
      "name": "Dedup Lookup",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [
        1840,
        260
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "functionCode": "const found = $json?.matchedRow || $json?.data || null;\nif (found && Array.isArray(found) && found.length > 0) return [];\nreturn [{ json: $input.first().json }];"
      },
      "name": "If Not Found",
      "type": "n8n-nodes-base.function",
      "typeVersion": 2,
      "position": [
        2040,
        260
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": "1n8TfxlswtIVqHgRg7JOkUri6BQa9NYrTTGqDZXOmGxY",
        "sheetName": "Reddit_Inbox",
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "post_id": "={{$json.post_id}}",
            "date_found": "={{$json.date_found}}",
            "subreddit": "={{$json.subreddit}}",
            "title": "={{$json.title}}",
            "post_url": "={{$json.post_url}}",
            "keyword_matched": "={{$json.keyword_matched}}",
            "comment_count": "={{$json.comment_count}}",
            "upvotes": "={{$json.upvotes}}",
            "score": "={{$json.score}}",
            "status": "={{$json.status}}"
          }
        }
      },
      "name": "Append to Reddit_Inbox",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [
        2240,
        260
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Cron": {
      "main": [
        [
          {
            "node": "Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Config": {
      "main": [
        [
          {
            "node": "Split RSS URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split RSS URLs": {
      "main": [
        [
          {
            "node": "Fetch RSS",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch RSS": {
      "main": [
        [
          {
            "node": "Parse XML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse XML": {
      "main": [
        [
          {
            "node": "Extract RSS Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract RSS Items": {
      "main": [
        [
          {
            "node": "Fetch Thread JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Thread JSON": {
      "main": [
        [
          {
            "node": "Score + Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Score + Filter": {
      "main": [
        [
          {
            "node": "Dedup Lookup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Dedup Lookup": {
      "main": [
        [
          {
            "node": "If Not Found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Not Found": {
      "main": [
        [
          {
            "node": "Append to Reddit_Inbox",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false
}

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.

Pro

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

About this workflow

Reddit Collector to Sheets (RSS + JSON scoring). Uses httpRequest, xml, googleSheets. Scheduled trigger; 11 nodes.

Source: https://gist.github.com/aamandel91/835bb6c1400cf1d234f720f6ae4a66aa — original creator credit. Request a take-down →

More Social Media workflows → · Browse all categories →

Related workflows

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

Social Media

This is for founders, service providers and anyone who wants to do more social listening but doesn't want to pay for an expensive tool.

Google Sheets, HTTP Request, XML +1
Social Media

This n8n workflow provides automated monitoring of YouTube channels and sends real-time notifications to RocketChat when new videos are published. It supports all YouTube URL formats, uses dual-source

HTTP Request, XML, Rocketchat
Social Media

This enterprise-grade n8n workflow automates the Instagram complaint handling process — from detection to resolution — using Claude AI, dynamic ticket assignment, and SLA enforcement. It converts cust

HTTP Request, Google Sheets, Slack
Social Media

This workflow automatically mirrors your YouTube to TikTok and Instagram, so you don’t have to manually download and re-upload your content across platforms.

@Blotato/N8N Nodes Blotato, Execute Command, HTTP Request +2
Social Media

This enterprise-grade n8n workflow automates influencer contract compliance for Instagram campaigns — from deadline tracking to breach detection — using Claude AI, Instagram API, and smart reminders.

Google Sheets, Slack, HTTP Request