Social Media Scraper

Integrations

n8n Reddit Monitoring Workflow for Brand and Keyword Alerts

Monitor brand mentions, competitor discussions, and target subreddits in n8n on a schedule—without registering Reddit OAuth apps or spamming Slack with repeat alerts. This guide connects n8n's built-in HTTP Request node to Social Media Scraper's verified Reddit search, subreddit, and POST comment endpoints with post-ID deduplication and prompt-injection guardrails.

  • No Reddit OAuth or community plugin: runs on n8n's native HTTP Request node with Header Auth (x-api-key) and Idempotency-Key
  • 5 verified Reddit endpoints: search, subreddit, subreddit_search, post, and POST /v1/reddit/post_comments_post
  • Deduplicated alerts: filter seen data.items[].id values in Postgres, Google Sheets, or n8n static data before notifying Slack
  • Low polling cost: $0.003 (3 credits) per request across all 5 endpoints (10 keywords every 2 hours = $0.36/day)
Editorial illustration of a public profile lookup feeding a user-configured automation and output records.
reddit.search

Scheduled n8n polling captures periodic snapshots of public Reddit discussions rather than an exhaustive real-time firehose. Social Media Scraper supplies the read-only HTTP layer—not a hosted listening dashboard, sentiment engine, or reply bot—leaving schedules, seen-ID storage, LLM guardrails, and Slack delivery entirely in your workflow.

  1. Import the 2-node Reddit starter JSON
  2. Add Header Auth, Idempotency-Key, and freshness filters
  3. Execute once, Split Out items, and deduplicate by ID

Verified Reddit Endpoints for n8n Monitoring

Poll lightweight GET search or subreddit feeds on every tick, then invoke the POST comments route selectively on newly matched threads.

Monitoring TaskMethod & EndpointKey ParametersRate
Site-wide mentionsGET /v1/reddit/searchquery*, sort (new), timeframe (hour/day), after$0.003
Subreddit feedGET /v1/reddit/subredditsubreddit*, sort, timeframe, after$0.003
Subreddit keywordGET /v1/reddit/subreddit_searchsubreddit*, query, sort, timeframe, cursor$0.003
Single threadGET /v1/reddit/posturl*$0.003
Thread commentsPOST /v1/reddit/post_comments_postJSON body: {url, sort, trim, cursor}$0.003

Comment extraction uses POST /v1/reddit/post_comments_post—set Method = POST and Send Body = JSON ({"url": "..."}) inside n8n's HTTP Request node.

How Scheduled Reddit Monitoring Runs in n8n

Separating cheap discovery from stateful deduplication keeps both API bills and Slack noise minimal.

  • Schedule Trigger: Poll every 1, 2, or 6 hours (or once daily for morning digests).
  • Discovery HTTP call: Query GET /v1/reddit/search (sort=new, timeframe=day) or GET /v1/reddit/subreddit using Header Auth x-api-key and Idempotency-Key.
  • Split & Deduplicate: Expand data.items with Split Out, then drop any post whose string id already exists in Postgres, Google Sheets, or static data.
  • Deep-Dive & Notify: Optionally call POST /v1/reddit/post_comments_post on top matches, summarize safely with an LLM, and push links to Slack, Discord, or Email.

Step-by-Step Setup for n8n Reddit Monitoring

The downloadable integrations-n8n-reddit-monitoring.json template below starts with Manual Trigger → HTTP Request targeting GET /v1/reddit/search (query=data engineering) so you can inspect output once before enabling a schedule.

  1. Step 1: Import the 2-node Reddit starter JSON

    Copy or download integrations-n8n-reddit-monitoring.json below and import it into n8n. Confirm Manual Trigger wires to HTTP Request pointing at https://socialmediascraper.org/v1/reddit/search with Header Auth.

  2. Step 2: Add Header Auth, Idempotency-Key, and freshness filters

    Attach a Header Auth credential named x-api-key with your API key value. Enable Send Headers and add Idempotency-Key set to ={{ 'rd-search-' + $execution.id + '-' + $itemIndex }} (8–128 chars [A-Za-z0-9._:-]+). Under Query Parameters, swap data engineering for your keyword and add sort=new plus timeframe=day.

  3. Step 3: Execute once, Split Out items, and deduplicate by ID

    Execute the node once and confirm data.items[] (id, title, text, url, published_at, author.handle, metrics). Attach Split Out on data.items and filter out seen id strings against Postgres, Google Sheets, or workflow static data.

  4. Step 4: Swap to Schedule Trigger and wire alerts or comments

    Replace Manual Trigger with Schedule Trigger (every 2 hours or daily), route fresh matches to Slack or Google Sheets, and optionally branch priority threads to POST /v1/reddit/post_comments_post with JSON body {"url": "={{ $json.url }}", "sort": "top"}.

integrations-n8n-reddit-monitoring.json
{
  "name": "n8n Reddit Monitoring",
  "nodes": [
    {
      "id": "start",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "parameters": {}
    },
    {
      "id": "request",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        260,
        0
      ],
      "parameters": {
        "method": "GET",
        "url": "https://socialmediascraper.org/v1/reddit/search",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "query",
              "value": "data engineering"
            }
          ]
        },
        "options": {}
      }
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {}
}

Deduplicating Seen Posts and Pulling Thread Comments

Without deduplication, polling timeframe=day every two hours repeats the same post twelve times. For production workflows, persist post_id in Postgres (INSERT ... ON CONFLICT (post_id) DO NOTHING RETURNING post_id) or check a Google Sheets column. For lightweight self-hosted schedules, keep a 500-ID ring buffer in n8n static data:

dedupe-reddit-items.js
// n8n Code node (Run Once for All Items) after Split Out on data.items
// Static data persists on active scheduled executions (not manual runs).
const store = $getWorkflowStaticData('global');
const seenList = Array.isArray(store.seenIds) ? store.seenIds : [];
const seen = new Set(seenList);
const fresh = [];

for (const item of $input.all()) {
  const row = item.json;
  const id = String(row.id ?? '').trim();
  if (!id || seen.has(id)) continue;
  seen.add(id);
  seenList.push(id);

  fresh.push({
    json: {
      post_id: id,
      title: row.title ?? '',
      text: row.text ?? '',
      url: row.url ?? '',
      author: row.author?.handle ?? null,
      published_at: row.published_at ?? null,
      likes: row.metrics?.likes ?? null,
      comments: row.metrics?.comments ?? null,
    },
  });
}

store.seenIds = seenList.slice(-500);
return fresh;

When fresh returns empty, downstream nodes halt automatically—zero Slack clutter and zero extra calls to POST /v1/reddit/post_comments_post (which needs its own Idempotency-Key such as ={{ 'rd-comments-' + $execution.id + '-' + $json.post_id }}).

Summarizing Reddit Threads Safely with n8n AI Nodes

Public Reddit posts come from anonymous strangers. Follow four prompt-injection guardrails whenever summarizing threads with OpenAI, Claude, or Gemini nodes in n8n.

Treat Reddit text strictly as untrusted data

Post bodies and comments can embed adversarial directives telling an agent to ignore instructions or inject links. Never treat retrieved social text as commands.

Separate instructions from delimited content

Keep your classification rubric in the system prompt and wrap title, text, and comments inside explicit JSON or <reddit_thread> tags in the user message. Never grant summarizer nodes arbitrary HTTP or auto-reply tools.

Attach raw URLs outside model output

Bind url and post_id into Slack or Sheets directly from n8n expressions rather than trusting model-regenerated links so humans verify real threads before replying.

Filter before spending LLM tokens

Screen out off-topic subreddits or low-engagement noise with an n8n Filter node first, keeping absent engagement counts as null rather than 0.

What Product and Growth Teams Monitor on Reddit

Swap your keyword list and destination channel to cover three common listening workflows.

Brand and competitor mention alerts

Poll GET /v1/reddit/search every two hours for brand names, competitors, and switching queries, pushing deduplicated hits into #reddit-mentions on Slack.

Subreddit support and bug triage

Watch product communities with GET /v1/reddit/subreddit (sort=new), fetch replies on bug reports via POST /v1/reddit/post_comments_post, and log tickets in Linear.

Daily category research digests

Query GET /v1/reddit/subreddit_search across niche subreddits each morning and email a concise digest with direct thread links.

Monitoring Workflow Health and Handling API Errors

Assign an n8n Error Workflow to alert Slack on failed cron runs, log request_id per call, and handle these states cleanly:

ConditionCauseAction in n8n
400 Bad RequestMissing Idempotency-Key, blank query, or wrong comment HTTP methodCheck Send Headers (8–128 chars) and ensure comments use POST /v1/reddit/post_comments_post
401 or 402Wrong Header Auth name or zero balanceConfirm Name is x-api-key and check balance at /pricing/
429 Too Many RequestsExceeded 60 req/min or 5 concurrent callsSpace keywords with Wait, honor Retry-After, reuse identical Idempotency-Key
202 AcceptedUpstream retrieval completing asynchronouslyPoll GET /v1/requests/{{ $json.request_id }} instead of firing a duplicate call
Repeat Slack alertsStatic data run manually or missing id lookupPersist string id in Postgres or Google Sheets (or run active schedules)

Polling Frequency and Monthly Cost Math

All five verified Reddit routes (search, subreddit, subreddit_search, post, and POST /v1/reddit/post_comments_post) cost $0.003 (3 credits) per request ($3.00/1k; 1,000 credits = $1).

Polling ScheduleMonthly RequestsEstimated Cost
Daily digest (5 keywords + 3 subreddits)240 calls / month$0.72 / month
Brand watch (10 keywords / 2 hrs + 5 daily comment pulls)3,750 calls / month$11.25 / month
Community sweep (20 subreddits every 6 hrs)2,400 calls / month$7.20 / month

New signups start with 100 starter credits ($0.10, ~33 standard calls), while one-time prepaid packs run $5 (5,000 credits, ~1,666 calls), $20 (20,000 credits, ~6,666 calls), and $50 (50,000 credits, ~16,666 calls) with no subscription. Want an ad-hoc browser check before wiring n8n? Open the Reddit Research Tool inside our free tools directory.

Polling Boundaries, Privacy, and Platform Rules

This workflow reads public Reddit posts, public subreddits, and public comments only—no private or quarantined communities, no auto-posting or DMs, and posts deleted between poll intervals will not appear. Check /status/ for public telemetry rather than assuming fixed SLAs.

Public visibility does not grant unrestricted redistribution rights. Follow Reddit's terms and applicable privacy regulations, and always isolate retrieved threads as untrusted input in downstream AI nodes.

n8n Reddit Monitoring Questions

Do I need Reddit API OAuth credentials for this n8n monitoring workflow?

No. n8n authenticates solely with your Social Media Scraper x-api-key Header Auth credential plus Idempotency-Key—no Reddit developer app approval or OAuth token refresh loop required.

How do I prevent duplicate Slack alerts on every scheduled poll?

Split data.items and drop every post whose string id already exists in your seen store. Use Postgres ON CONFLICT DO NOTHING or a Google Sheets lookup in production, or $getWorkflowStaticData('global') for simple active self-hosted schedules.

How do I fetch comments for a matched Reddit post in n8n?

Add an HTTP Request node with Method = POST, URL https://socialmediascraper.org/v1/reddit/post_comments_post, Header Auth x-api-key, a fresh Idempotency-Key, and JSON body {"url": "={{ $json.url }}", "sort": "top"} after deduplicating new posts.

Can I monitor specific subreddits instead of all of Reddit?

Yes. Call GET /v1/reddit/subreddit (subreddit, sort=new, timeframe=day) to watch every new post in a community, or GET /v1/reddit/subreddit_search to filter keywords inside one subreddit.

How frequently can I poll Reddit without hitting rate limits?

Default account limits allow 60 requests/minute and 5 concurrent calls (GET /v1/limits). Polling 10 keywords sequentially with a short Wait node fits easily inside those limits; on HTTP 429, honor Retry-After and reuse the same Idempotency-Key.

How much does daily or bi-hourly Reddit monitoring cost?

Every verified Reddit call costs $0.003 (3 credits). A daily digest of 8 queries costs $0.72/month; polling 10 keywords every 2 hours plus 5 daily comment fetches costs $11.25/month on one-time prepaid packs starting at $5.

How do I summarize Reddit threads with AI nodes safely?

Keep directives strictly inside the system prompt, wrap Reddit title, text, and comments inside delimited JSON or XML blocks in the user message, omit write tools from the summarizer, and attach raw url links directly from n8n.

How do I monitor whether my n8n Reddit workflow failed silently?

Configure an n8n Error Workflow that pings Slack or email on execution failures, log request_id on each API call, and optionally send a weekly heartbeat reporting scanned vs. new items.

Can I test a Reddit keyword query in a browser before configuring n8n?

Yes. Run limited anonymous searches using the Reddit Research Tool in our free tools hub before funding a prepaid API pack.

Can this workflow automatically reply to Reddit threads?

No. Social Media Scraper is strictly read-only for public data. Route matched links to Slack or email so a teammate reviews context before replying manually.

Why do some engagement metrics return null on Reddit items?

When Reddit omits a score or view metric, the API returns null explicitly. Preserve null in Postgres, Sheets, and filters instead of replacing it with 0.