AutomationFlowsSocial Media › Reddit Scraper

Reddit Scraper

reddit-scraper. Uses executeWorkflowTrigger, httpRequest. Event-driven trigger; 4 nodes.

Event trigger★★☆☆☆ complexity4 nodesExecute Workflow TriggerHTTP Request
Social Media Trigger: Event Nodes: 4 Complexity: ★★☆☆☆ Added:

This workflow follows the Execute Workflow Trigger → 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-scraper",
  "nodes": [
    {
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "targetURL"
            }
          ]
        }
      },
      "id": "2dd44f3b-aafc-4fc1-ad98-04c58ab4ecd0",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1.2,
      "position": [
        -192,
        16
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://browserless:3000/function",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ {\n  \"context\": {\n    \"redditUrl\": (() => { let u = String($json.targetURL).replace(/[\"']/g, \"\").trim(); if (u.includes(\".json\")) return u; if (u.endsWith(\"/\")) u = u.slice(0, -1); return u + \".json\"; })()\n  },\n  \"code\": \"module.exports = async ({ page, context }) => { await page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36'); await page.setExtraHTTPHeaders({ 'Accept-Language': 'en-US,en;q=0.9' }); await page.goto('https://www.reddit.com', { waitUntil: 'networkidle2', timeout: 30000 }); await page.goto(context.redditUrl, { waitUntil: 'domcontentloaded', timeout: 30000 }); const rawText = await page.evaluate(() => document.body.innerText); return { data: JSON.parse(rawText), type: 'application/json' }; };\"\n} }}",
        "options": {}
      },
      "id": "0c267645-45ac-4ad4-941e-5c5df7c6f716",
      "name": "Scrape_Reddit_via_Browserless_JSON",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        32,
        16
      ],
      "notesInFlow": false,
      "notes": "Runs custom Puppeteer automation via Browserless. Takes targetURL from the caller, bypasses Reddit's fingerprint check by visiting reddit.com first, then fetches the .json endpoint and returns raw structured JSON. URL logic is .json-aware: a URL that already contains .json (with any query string) is used as-is; a plain /r/sub/ URL gets .json appended."
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a18004f7-2ad8-445b-b0d5-de631f279e97",
              "name": "data.children",
              "value": "={{ $json.data.children }}",
              "type": "array"
            }
          ]
        },
        "options": {}
      },
      "id": "3753967f-bb2e-4dd1-9dc5-53f97b2e9351",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        256,
        16
      ]
    },
    {
      "parameters": {
        "fieldToSplitOut": "data.children",
        "options": {}
      },
      "id": "c1da0e89-6736-416f-97a3-096bf5fa8369",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        480,
        16
      ]
    }
  ],
  "connections": {
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Scrape_Reddit_via_Browserless_JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape_Reddit_via_Browserless_JSON": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate"
  },
  "versionId": "89344f11-02bd-408f-baba-d6bd18134f3c",
  "nodeGroups": [],
  "id": "knObnnQbnIHP9DAy",
  "tags": []
}
Pro

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

About this workflow

reddit-scraper. Uses executeWorkflowTrigger, httpRequest. Event-driven trigger; 4 nodes.

Source: https://github.com/maker-lab-9000/n8n/blob/main/reddit-market-brief/reddit-scraper.json — 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

Video explanation

HTTP Request, Execute Workflow Trigger, Postgres +1
Social Media

Wait Dropbox. Uses manualTrigger, httpRequest, executeWorkflowTrigger, stickyNote. Event-driven trigger; 20 nodes.

HTTP Request, Execute Workflow Trigger, Dropbox
Social Media

Extracts a clean transcript from a videoId using youtube-transcript.io. AI summaries, sentiment analysis, keyword extraction Internal indexing/SEO Content pipelines (blog/newsletter) Batch transcript

HTTP Request, Execute Workflow Trigger, Stop And Error
Social Media

YouTube Caption Extractor (Your Channel Only) Extracts clean transcripts from YOUR CHANNEL YouTube video captions using YouTube Data API v3.

Execute Workflow Trigger, HTTP Request, Stop And Error
Social Media

Purpose: Uploads videos to Facebook Pages or Groups automatically, either via a Form Trigger or triggered by another workflow.

Form Trigger, HTTP Request, Execute Workflow Trigger