Apify + Gmail: ranked social trends in your inbox
Tracking trends across TikTok, Instagram, and Reddit sounds simple until you’re juggling scrapers, tabs, and “where did I see that post?” screenshots. Then Monday turns into a research marathon instead of actual marketing work.
This Apify Gmail digest automation hits social media managers first, honestly. But brand managers and small marketing teams feel the same drag when reporting day shows up. The outcome is straightforward: one ranked email that surfaces what’s actually performing, without the scavenger hunt.
You’ll see how this workflow pulls platform data by keyword, scores it with consistent logic, and delivers a clean HTML digest you can forward to your team in seconds.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Apify + Gmail: ranked social trends in your inbox
flowchart LR
subgraph sg0["Timed Start Flow"]
direction LR
n0["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Reddit Scrape Request"]
n1["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Reddit Dataset Fetch"]
n2["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Instagram Scrape Request"]
n3["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Instagram Dataset Fetch"]
n4["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>TikTok Scrape Request"]
n5["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>TikTok Dataset Fetch"]
n6@{ icon: "mdi:message-outline", form: "rounded", label: "Send Digest Email", pos: "b", h: 48 }
n7["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Unified Ranking"]
n8@{ icon: "mdi:cog", form: "rounded", label: "Reddit Delay", pos: "b", h: 48 }
n9@{ icon: "mdi:cog", form: "rounded", label: "Instagram Delay", pos: "b", h: 48 }
n10@{ icon: "mdi:cog", form: "rounded", label: "TikTok Delay", pos: "b", h: 48 }
n11["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Rank Reddit Posts"]
n12["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Rank Instagram Posts"]
n13["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Rank TikTok Posts"]
n14@{ icon: "mdi:play-circle", form: "rounded", label: "Timed Start Trigger", pos: "b", h: 48 }
n3 --> n12
n2 --> n9
n9 --> n3
n1 --> n11
n5 --> n13
n0 --> n8
n8 --> n1
n11 --> n2
n13 --> n7
n10 --> n5
n4 --> n10
n12 --> n4
n14 --> n0
n7 --> n6
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n14 trigger
class n0,n1,n2,n3,n4,n5 api
class n7,n11,n12,n13 code
classDef customIcon fill:none,stroke:none
class n0,n1,n2,n3,n4,n5,n7,n11,n12,n13 customIcon
The Problem: Trend Research Is Scattered and Unranked
Most “trend research” ends up as a messy mix of browser bookmarks, half-finished spreadsheets, and links dumped into Slack with zero context. You bounce between platforms, search the same keywords repeatedly, and still miss the posts that matter because you’re sorting by gut feel instead of a consistent score. Then the real kicker: when someone asks, “What’s trending this week?” you either scramble for an answer or you send a screenshot collage that nobody can use. It’s not hard work. It’s just endless work.
It adds up fast. Here’s where it breaks down in the real world.
- Checking three platforms for one keyword can easily burn about 1 hour, and you still don’t have a ranked “top list” at the end.
- Engagement isn’t comparable out of the box, so the loudest post wins, not the best signal.
- Links get shared without metrics, which means your team can’t tell what to copy, test, or ignore.
- Manual tracking creates blind spots, especially when you’re trying to spot early momentum within the last 7 days.
The Solution: A Cross-Platform Ranked Trends Digest
This workflow turns “trend research” into a repeatable weekly (or daily) system. It starts on a schedule in n8n, then uses Apify-powered scraping requests to collect recent posts from Reddit, Instagram, and TikTok based on the keywords or hashtags you care about. As results come back, the workflow calculates an engagement score for each platform using simple, transparent formulas (likes, comments, shares, and views weighted in a way that makes sense). Finally, everything is merged into one unified leaderboard and sent as an HTML email via Gmail, complete with metrics and direct links so you can click through immediately.
The workflow kicks off with a timed trigger, scrapes Reddit first, then Instagram, then TikTok (with short delays to avoid rate-limit headaches). Each platform gets ranked, then all results are combined into one list. Gmail delivers the digest to your inbox, ready to forward.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you track one core keyword each week and you normally do 30 minutes per platform to “make sure you didn’t miss anything.” That’s about 1.5 hours for TikTok, Instagram, and Reddit, plus another 30 minutes to整理 links and write a quick summary, so roughly 2 hours weekly. With this workflow, you spend about 10 minutes updating the keyword/hashtags when needed, then the scheduled run scrapes and ranks the last 7 days, and Gmail sends the digest automatically. You still review the winners, but you’re reviewing a shortlist, not a firehose.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Apify for scraping TikTok, Instagram, Reddit
- Gmail to send the HTML digest email
- Apify API token (get it from Apify Console → Settings → Integrations)
Skill level: Intermediate. You’ll connect accounts, edit a few keyword/hashtag fields, and confirm the email formatting looks right.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
Timed trigger runs the check. The workflow starts on a schedule, so you can run it weekly, daily, or whenever you do planning. No manual “go run the report” reminder needed.
Apify pulls platform data in sequence. n8n sends HTTP requests to kick off Apify actors for Reddit, then Instagram, then TikTok. Short Wait steps are built in so datasets have time to populate before the workflow tries to fetch results.
Ranking logic converts engagement into one score. Each platform is scored using the workflow’s formulas (Reddit upvotes and comments, Instagram likes and comments, TikTok likes/comments/shares plus normalized views). That creates a leaderboard you can actually compare across networks.
Gmail sends a clean digest. The unified list is merged into a formatted HTML email with the top performers and links to the original posts, which means your team can review and act quickly.
You can easily modify the keywords and the scoring weights to match your niche and goals. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Schedule Trigger
Set the workflow to run on a recurring schedule so the social trend digest is generated automatically.
- Add or open Timed Start Trigger.
- In Rule, define the interval you want (e.g., daily or weekly). The node is already configured with a schedule rule placeholder.
- Confirm Timed Start Trigger connects to Reddit Scrape Request.
Step 2: Connect Apify Scrape Requests
Configure the Apify HTTP calls that kick off the scraping jobs for Reddit, Instagram, and TikTok.
- Open Reddit Scrape Request and set URL to
https://api.apify.com/v2/acts/trudax~reddit-scraper-lite/runs. - Set Method to POST and JSON Body to the provided payload (searches
trottinette, top posts, last month). - Credential Required: Connect your httpHeaderAuth credentials in Reddit Scrape Request.
- Repeat for Instagram Scrape Request with URL set to
https://api.apify.com/v2/acts/apify~instagram-scraper/runsand the JSON body referencinghttps://www.instagram.com/explore/tags/trottinette/. - Credential Required: Connect your httpHeaderAuth credentials in Instagram Scrape Request.
- Repeat for TikTok Scrape Request with URL set to
https://api.apify.com/v2/acts/clockworks~tiktok-scraper/runsand hashtagstrottinette. - Credential Required: Connect your httpHeaderAuth credentials in TikTok Scrape Request.
Step 3: Add Delay and Dataset Fetch Steps
The workflow waits for the Apify runs to finish and then fetches the dataset items for each platform.
- In Reddit Delay, keep Amount set to
30seconds. - In Instagram Delay, keep Amount set to
30seconds. - In TikTok Delay, keep Amount set to
30seconds. - Open Reddit Dataset Fetch and set URL to
=https://api.apify.com/v2/datasets/{{ $json.data.defaultDatasetId }}/items. - Open Instagram Dataset Fetch and set URL to
=https://api.apify.com/v2/datasets/{{ $json.data.defaultDatasetId }}/items. - Open TikTok Dataset Fetch and set URL to
=https://api.apify.com/v2/datasets/{{ $json.data.defaultDatasetId }}/items. - Credential Required: Connect your httpHeaderAuth credentials in all dataset fetch nodes.
30 seconds to allow Apify runs to finish.Step 4: Set Up Ranking and Aggregation Logic
Three code nodes rank posts per platform, then a final code node merges all results into one unified ranking.
- Open Rank Reddit Posts and confirm it filters
dataType === 'post'and scores posts using(upVotes * 1) + (numberOfComments * 2). - Open Rank Instagram Posts and confirm it filters for post URLs containing
/p/and scores using(likes * 1) + (comments * 2). - Open Rank TikTok Posts and confirm it calculates score with
(likes * 1) + (comments * 2) + (shares * 3) + (views / 1000). - Open Unified Ranking and confirm it pulls data from Rank Reddit Posts, Rank Instagram Posts, and Rank TikTok Posts, then slices to the top 15 posts.
Step 5: Configure the Email Digest Output
Send the unified ranking as a styled HTML digest to your inbox.
- Open Send Digest Email and set Send To to
[YOUR_EMAIL]. - Set Subject to
Social media monitoring. - Set Message to the provided HTML template (ensure the expressions referencing Unified Ranking remain intact).
- Credential Required: Connect your gmailOAuth2 credentials in Send Digest Email.
{{ $('Unified Ranking').all()... }} or the digest will lose its dynamic data.Step 6: Test and Activate Your Workflow
Run a full test to ensure each scrape and ranking stage produces output, then activate the schedule.
- Click Execute Workflow to run the sequence from Timed Start Trigger to Send Digest Email.
- Verify each node completes in order: Timed Start Trigger → Reddit Scrape Request → Reddit Delay → Reddit Dataset Fetch → Rank Reddit Posts → Instagram Scrape Request → Instagram Delay → Instagram Dataset Fetch → Rank Instagram Posts → TikTok Scrape Request → TikTok Delay → TikTok Dataset Fetch → Rank TikTok Posts → Unified Ranking → Send Digest Email.
- Check your inbox for the HTML digest and confirm the tables populate with ranked results.
- Toggle the workflow to Active to enable scheduled runs.
Common Gotchas
- Apify credentials can expire or your token may not have access to the specific actors. If things break, check Apify Console → Settings → Integrations and confirm the actors are available in your account.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Gmail sending can fail if OAuth permissions change or the connected account is locked down by an admin. Check the Gmail node credentials in n8n first, then confirm the recipient and “from” account match your Google Workspace rules.
Frequently Asked Questions
About 30 minutes if your Apify and Gmail accounts are ready.
No. You’ll mostly paste API credentials, edit keywords/hashtags, and test an email send.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Apify usage costs based on how many scraping runs you trigger.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, but you’ll want to be intentional. The quickest approach is to duplicate the workflow per keyword and schedule each one on a different day. If you prefer one workflow, you can loop through a list of keywords (for Reddit “searches” and TikTok “hashtags”) and then merge results before the unified ranking. Many teams also tweak the 7-day filters and the scoring multipliers so “shares matter more” or “Reddit comments matter less,” depending on what they sell.
Usually it’s an expired or incorrect Apify API token. Regenerate the token in Apify, update the HTTP header auth in n8n, and make sure your account can access the specific scrapers (Reddit Scraper Lite, Instagram Scraper, TikTok Scraper). If it runs once and then fails later, you may also be hitting Apify quotas or rate limits, so spacing runs out can help.
Plenty for weekly monitoring. The default setup pulls up to about 50 Reddit items, about 15 Instagram results, and around 20 TikTok results per run, and you can raise those limits if your Apify plan supports it.
Often, yes. n8n is a better fit when you need multi-step logic, merging datasets, and custom scoring without paying extra for every branch. Zapier or Make can work if you only want a simple “run scraper, email me,” but cross-platform ranking gets awkward fast. Also, self-hosting n8n can be cheaper when you’re running frequent checks. The practical difference is control: you can see and change the scoring, the time windows, and the formatting whenever you want. Talk to an automation expert if you want help choosing.
Once this is running, trend research becomes a single email you can trust. The workflow handles the repetitive stuff, and you get to spend your time on the decisions that actually move campaigns.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.