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
- Click the Download button on the page to get the workflow file.
- In the n8n editor, select “Import from File” and upload the workflow file.
2. Configure Credentials and Settings
- Open the Set node named “Set Data” and enter the list of topics you want (each topic on a new line).
- Enter API keys for Reddit OAuth2, Anthropic, Jina.ai, and Google Drive OAuth2 in their respective credentials sections.
- 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
- Run the workflow once manually to check for errors and correct outputs.
- If everything works, toggle the Schedule Trigger on; it will run every Monday at 6 AM automatically.
- 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.
