Skip to main content

Overview

The AnySite Reddit node allows you to extract valuable data from Reddit within your n8n workflows. Search posts, monitor subreddits, analyze discussions, and track community sentiment.

Node Configuration

Authentication

credential
AnySite API Credentials
required
Select your AnySite API credentials from the dropdown or create new ones.

Available Operations

  • Search Posts
  • Get Post Comments
  • Get Subreddit Info
  • Monitor Hot Posts
Search for Reddit posts across all subreddits or within specific communities.Parameters:
  • Query (required): Search terms for finding posts
  • Subreddit: Specific subreddit to search (optional)
  • Sort: “relevance”, “hot”, “new”, “top”
  • Time Range: “hour”, “day”, “week”, “month”, “year”, “all”
  • Limit: Maximum results to return (1-100)
Example Output:
{
  "posts": [
    {
      "id": "post123",
      "title": "How to build scalable web applications",
      "text": "Here's what I learned after building 10+ web apps...",
      "subreddit": "webdev",
      "author": "experienced_dev",
      "score": 245,
      "upvoteRatio": 0.92,
      "comments": 67,
      "created": "2024-08-26T10:30:00Z",
      "url": "https://reddit.com/r/webdev/comments/abc123/"
    }
  ]
}

Workflow Examples

Brand Monitoring

1

Monitor Mentions

Search for posts mentioning your brand, product, or competitors across relevant subreddits.
2

Analyze Sentiment

Use AI nodes to analyze sentiment and identify positive/negative discussions.
3

Track Engagement

Monitor upvotes, comments, and discussion activity around your brand.
4

Alert Team

Send notifications for high-impact mentions or negative sentiment.
Example Workflow:
{
  "nodes": [
    {
      "name": "Monitor Brand Mentions",
      "type": "@horizondatawave/n8n-nodes-anysite.Reddit",
      "operation": "searchPosts",
      "parameters": {
        "query": "YourBrand OR YourProduct",
        "subreddit": "technology,startups,entrepreneur",
        "sort": "new",
        "limit": 50
      }
    },
    {
      "name": "Filter High Engagement",
      "type": "n8n-nodes-base.filter",
      "parameters": {
        "conditions": [
          {
            "field": "score",
            "operation": "greaterThan",
            "value": 10
          },
          {
            "field": "comments",
            "operation": "greaterThan", 
            "value": 5
          }
        ]
      }
    },
    {
      "name": "Get Comments",
      "type": "@horizondatawave/n8n-nodes-anysite.Reddit",
      "operation": "getPostComments",
      "parameters": {
        "postUrl": "={{ $json.url }}",
        "commentDepth": 2,
        "limit": 25
      }
    },
    {
      "name": "Analyze Sentiment",
      "type": "n8n-nodes-base.openAi",
      "parameters": {
        "prompt": "Analyze sentiment of this Reddit discussion: {{ $json.title }} - {{ $json.text }}"
      }
    }
  ]
}

Market Research

Research customer opinions and market trends:
  1. Industry Monitoring - Track discussions in industry-specific subreddits
  2. Product Feedback - Find mentions of your product or competitors
  3. Feature Requests - Identify commonly requested features or pain points
  4. Trend Analysis - Analyze trending topics and emerging technologies
  5. Report Generation - Create weekly market research reports

Community Management

Monitor and engage with your community:
  1. Support Questions - Find users asking for help with your product
  2. Bug Reports - Identify and track bug reports from users
  3. Feature Discussions - Monitor discussions about new features
  4. Community Health - Track sentiment and engagement in your subreddit
  5. Moderation Alerts - Get notified about posts needing attention

Search Operators

Use Reddit’s search syntax for precise queries:
// Exact title match
{
  "query": "title:\"How to learn machine learning\""
}

// Author search
{
  "query": "author:specific_username"
}

// Multiple subreddits
{
  "query": "subreddit:MachineLearning OR subreddit:programming"
}

// URL search
{
  "query": "url:github.com"
}

// Flair search
{
  "query": "flair:Discussion"
}

// Self posts only
{
  "query": "self:yes machine learning tutorial"
}

// Score filter
{
  "query": "score:>100 artificial intelligence"
}

Time-based Analysis

Track discussions over time:
{
  "name": "Weekly Trend Analysis",
  "type": "@horizondatawave/n8n-nodes-anysite.Reddit", 
  "operation": "searchPosts",
  "parameters": {
    "query": "artificial intelligence",
    "subreddit": "MachineLearning",
    "sort": "top",
    "timeRange": "week",
    "limit": 100
  }
}

Data Analysis

Engagement Metrics

Calculate post and comment engagement:
// Engagement rate calculation
{
  "engagementRate": "={{ ($json.comments / ($json.score || 1)) * 100 }}"
}

// Controversy score
{
  "controversyScore": "={{ (1 - $json.upvoteRatio) * 100 }}"
}

// Discussion density
{
  "discussionDensity": "={{ $json.comments / Math.max($json.text.length / 100, 1) }}"
}

Content Analysis

Extract insights from Reddit content:
{
  "name": "Extract Keywords",
  "type": "n8n-nodes-base.function",
  "parameters": {
    "functionCode": `
      const text = $input.first().json.text.toLowerCase();
      const keywords = text.match(/\\b\\w{4,}\\b/g) || [];
      const wordCount = {};
      
      keywords.forEach(word => {
        wordCount[word] = (wordCount[word] || 0) + 1;
      });
      
      const topKeywords = Object.entries(wordCount)
        .sort(([,a], [,b]) => b - a)
        .slice(0, 10)
        .map(([word, count]) => ({ word, count }));
        
      return [{ json: { ...item.json, topKeywords } }];
    `
  }
}

Error Handling

Common Errors

Error: 404 - Subreddit not foundSolution:
  • Verify subreddit name is spelled correctly
  • Check if subreddit is private or banned
  • Handle missing subreddits gracefully in bulk operations
Error: 404 - Post not foundSolution:
  • Post may have been deleted by user or moderator
  • Store post data when first accessed
  • Implement fallback logic for missing posts
Error: 429 - Too many requestsSolution:
  • Add delays between requests (recommended: 2-3 seconds)
  • Implement exponential backoff retry logic
  • Consider upgrading API plan for higher limits

Robust Error Handling

{
  "name": "Reddit with Error Handling",
  "type": "@horizondatawave/n8n-nodes-anysite.Reddit",
  "continueOnFail": true,
  "retryOnFail": true,
  "maxTries": 3,
  "waitBetweenTries": 3000,
  "parameters": {
    "operation": "searchPosts",
    "query": "your search query"
  }
}

Integration Examples

Slack Notifications

Send alerts for important discussions:
{
  "name": "High-Impact Alert",
  "type": "n8n-nodes-base.slack",
  "parameters": {
    "channel": "#marketing",
    "text": "🔥 Trending Reddit post about {{ $json.title }}\n📊 Score: {{ $json.score }} | 💬 Comments: {{ $json.comments }}\n🔗 {{ $json.url }}"
  }
}

Database Storage

Store Reddit data for analysis:
{
  "name": "Store in Database",
  "type": "n8n-nodes-base.postgres",
  "parameters": {
    "operation": "insert",
    "table": "reddit_posts",
    "columns": [
      "post_id",
      "title", 
      "subreddit",
      "score",
      "comments",
      "created_at"
    ],
    "values": [
      "={{ $json.id }}",
      "={{ $json.title }}",
      "={{ $json.subreddit }}",
      "={{ $json.score }}",
      "={{ $json.comments }}",
      "={{ $json.created }}"
    ]
  }
}

Content Aggregation

Combine Reddit data with other sources:
{
  "workflow": [
    "Reddit Search → Get Hot Posts",
    "Twitter Search → Find Related Tweets",
    "Google News → Get News Articles",
    "AI Analysis → Extract Common Themes",
    "Report Generation → Create Daily Brief"
  ]
}

Performance Tips

Efficient Bulk Operations

{
  "name": "Batch Subreddit Monitor",
  "type": "n8n-nodes-base.splitInBatches",
  "parameters": {
    "batchSize": 5,
    "options": {
      "reset": false
    }
  }
}

Data Deduplication

Remove duplicate posts:
// Deduplicate by post ID
{
  "name": "Remove Duplicates",
  "type": "n8n-nodes-base.removeDuplicates",
  "parameters": {
    "compare": "selectedFields",
    "fieldsToCompare": ["id"]
  }
}

Community Insights

Subreddit Analysis

Analyze subreddit health and trends:
{
  "name": "Subreddit Health Check",
  "type": "@horizondatawave/n8n-nodes-anysite.Reddit",
  "operation": "getSubredditInfo",
  "parameters": {
    "subredditName": "{{ $json.subreddit }}",
    "includeRules": true,
    "includeModerators": false
  }
}

Discussion Quality

Assess discussion quality metrics:
// Calculate discussion quality score
{
  "qualityScore": "={{ (($json.score * 0.4) + ($json.comments * 0.3) + (($json.upvoteRatio - 0.5) * 200 * 0.3)) }}"
}

Next Steps

I