Automate Reddit Trend Analysis and PR Reports with n8n

Discover how this n8n automation identifies hot Reddit trends, filters top posts by upvotes, analyzes comments for sentiment, and generates comprehensive PR reports automatically. Save hours weekly by transforming social data into actionable PR insights with ease.
reddit
code
if
+9
Workflow Identifier: 1267
NODES in Use: Code, Reddit, If, Set, SplitInBatches, HTTP Request, Google Drive, Compression, ConvertToFile, Aggregate, StickyNote, Anthropic Chat Model

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Workflow Does

This workflow finds popular Reddit posts about specific topics and reads the top 30 comments. It checks if posts have more than 100 upvotes and removes duplicates. Then, it uses AI to analyze comment sentiment and gets detailed news content linked in the posts. Finally, it creates a report with all this information, packs it into a zip file, uploads it to Google Drive, and notifies the team on Mattermost with the download link.

This helps save 3-4 hours every week by doing what someone would normally do by hand, making PR work faster and smarter.


Who Should Use This Workflow

People who run weekly PR campaigns and need quick insight on trending political stories on Reddit. Also useful for digital teams that want to track comments’ moods and get full news article context quickly.

This workflow is good for PR strategists who want to save time and avoid missing viral stories.


Tools and Services Used

  • Reddit API (OAuth2): Searches posts and gets comments.
  • Anthropic AI: Analyzes sentiment and story ideas.
  • Jina.ai API: Gets full news articles from URLs.
  • Google Drive API (OAuth2): Uploads and shares reports.
  • Mattermost Webhook: Sends report links to team chat.

Inputs, Processing Steps, and Outputs

Inputs

  • List of topics to search on Reddit (for example, “Donald Trump”, “Politics”).
  • API keys for Reddit, Anthropic, Jina.ai, Google Drive.
  • Mattermost webhook URL and channel info.

Processing Steps

  • Split topics into single searches.
  • Search Reddit for each topic; filter posts with at least 100 upvotes.
  • Remove duplicate URLs, keeping posts with highest upvotes.
  • For each post, get all comments, keep top 30 by score, remove deleted.
  • Format comments to Markdown with author and score.
  • Send comments text to Anthropic AI for sentiment and engagement analysis.
  • Fetch full news article text from Jina.ai using post URL.
  • Analyze news and Reddit data with Anthropic AI for PR story ideas.
  • Generate a final report combining all data and analysis.
  • Convert report to text files, compress as zip.
  • Upload zip to Google Drive and share publicly.
  • Send notification with download link to Mattermost channel.

Output

A zipped file containing a detailed PR report for trending Reddit stories is stored in Google Drive and a link is shared with the team on Mattermost.


Beginner Step-by-Step: How to Use This Workflow in n8n

1. Download and Import Workflow

  1. Click the Download button on the page to get the workflow file.
  2. In the n8n editor, select “Import from File” and upload the workflow file.

2. Configure Credentials and Settings

  1. Open the Set node named “Set Data” and enter the list of topics you want (each topic on a new line).
  2. Enter API keys for Reddit OAuth2, Anthropic, Jina.ai, and Google Drive OAuth2 in their respective credentials sections.
  3. Update any folder IDs for Google Drive upload, and set the Mattermost webhook URL and channel in the notification HTTP Request node.

3. Test and Activate Workflow

  1. Run the workflow once manually to check for errors and correct outputs.
  2. If everything works, toggle the Schedule Trigger on; it will run every Monday at 6 AM automatically.
  3. Monitor workflow runs in the n8n dashboard for failures or command retries.

If using self hosting n8n, consider this self-host n8n resource for setup help.


Edge Cases and Common Failures

  • Reddit API 401 Unauthorized: Check that OAuth2 credentials for Reddit are valid and assigned.
  • Jina.ai HTTP Request fails: Verify Jina API key entry and network connection.
  • Google Drive permission denied: Reauthorize Google Drive OAuth2 and confirm folder access rights.
  • Duplicate posts not removed: Check the code in the “Remove Duplicates” Code node for correct URL filtering.
  • No reports generated: Confirm Reddit search topics and upvote filters yield results.

Customization Ideas

  • Change topics by editing the multi-line string in “Set Data” node.
  • Adjust the 100 upvotes filter in the “Upvotes Requirement Filtering” node for more or less strictness.
  • Alter the number of comments analyzed (default 30) in “Extract Top Comments” Code node.
  • Change report file naming format in “Convert to File” node using expressions.
  • Switch Mattermost webhook URL to notify different team channels.

Summary of Results

✓ The workflow finds the best Reddit posts on chosen topics with strong engagement.

✓ It analyzes top comments and news content for sentiment and story ideas using AI.

✓ Creates a clear, rich PR report and shares it automatically with the team.

→ Saves 3-4 hours weekly on manual research and analysis.

→ Helps PR teams react faster and pitch timely stories to clients.


Frequently Asked Questions

Update the multi-line string in the ‘Set Data’ node with new topics. Each topic should be on a new line.
Check that the Reddit OAuth2 credentials are correctly added and valid in n8n and assigned to Reddit nodes.
Yes, change the number in the ‘Extract Top Comments’ Code node to a different count for comment analysis.
The reports are compressed into a zip file, uploaded to Google Drive, and a public download link is sent to the Mattermost channel.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free