🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 21, 2026

Apify + Gmail: ranked social trends in your inbox

Lisa Granqvist Partner Workflow Automation Expert

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

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

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.

  1. Add or open Timed Start Trigger.
  2. In Rule, define the interval you want (e.g., daily or weekly). The node is already configured with a schedule rule placeholder.
  3. Confirm Timed Start Trigger connects to Reddit Scrape Request.

Tip: Start with a short interval while testing, then increase it for production runs.

Step 2: Connect Apify Scrape Requests

Configure the Apify HTTP calls that kick off the scraping jobs for Reddit, Instagram, and TikTok.

  1. Open Reddit Scrape Request and set URL to https://api.apify.com/v2/acts/trudax~reddit-scraper-lite/runs.
  2. Set Method to POST and JSON Body to the provided payload (searches trottinette, top posts, last month).
  3. Credential Required: Connect your httpHeaderAuth credentials in Reddit Scrape Request.
  4. Repeat for Instagram Scrape Request with URL set to https://api.apify.com/v2/acts/apify~instagram-scraper/runs and the JSON body referencing https://www.instagram.com/explore/tags/trottinette/.
  5. Credential Required: Connect your httpHeaderAuth credentials in Instagram Scrape Request.
  6. Repeat for TikTok Scrape Request with URL set to https://api.apify.com/v2/acts/clockworks~tiktok-scraper/runs and hashtags trottinette.
  7. Credential Required: Connect your httpHeaderAuth credentials in TikTok Scrape Request.

⚠️ Common Pitfall: Ensure your Apify API token is included in the httpHeaderAuth credential headers, otherwise all HTTP requests will fail.

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.

  1. In Reddit Delay, keep Amount set to 30 seconds.
  2. In Instagram Delay, keep Amount set to 30 seconds.
  3. In TikTok Delay, keep Amount set to 30 seconds.
  4. Open Reddit Dataset Fetch and set URL to =https://api.apify.com/v2/datasets/{{ $json.data.defaultDatasetId }}/items.
  5. Open Instagram Dataset Fetch and set URL to =https://api.apify.com/v2/datasets/{{ $json.data.defaultDatasetId }}/items.
  6. Open TikTok Dataset Fetch and set URL to =https://api.apify.com/v2/datasets/{{ $json.data.defaultDatasetId }}/items.
  7. Credential Required: Connect your httpHeaderAuth credentials in all dataset fetch nodes.

Tip: If datasets return empty results, increase the delay above 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.

  1. Open Rank Reddit Posts and confirm it filters dataType === 'post' and scores posts using (upVotes * 1) + (numberOfComments * 2).
  2. Open Rank Instagram Posts and confirm it filters for post URLs containing /p/ and scores using (likes * 1) + (comments * 2).
  3. Open Rank TikTok Posts and confirm it calculates score with (likes * 1) + (comments * 2) + (shares * 3) + (views / 1000).
  4. 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.

  1. Open Send Digest Email and set Send To to [YOUR_EMAIL].
  2. Set Subject to Social media monitoring.
  3. Set Message to the provided HTML template (ensure the expressions referencing Unified Ranking remain intact).
  4. Credential Required: Connect your gmailOAuth2 credentials in Send Digest Email.

⚠️ Common Pitfall: Do not remove the embedded expressions like {{ $('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.

  1. Click Execute Workflow to run the sequence from Timed Start Trigger to Send Digest Email.
  2. Verify each node completes in order: Timed Start TriggerReddit Scrape RequestReddit DelayReddit Dataset FetchRank Reddit PostsInstagram Scrape RequestInstagram DelayInstagram Dataset FetchRank Instagram PostsTikTok Scrape RequestTikTok DelayTikTok Dataset FetchRank TikTok PostsUnified RankingSend Digest Email.
  3. Check your inbox for the HTML digest and confirm the tables populate with ranked results.
  4. Toggle the workflow to Active to enable scheduled runs.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

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

How long does it take to set up this Apify Gmail digest automation?

About 30 minutes if your Apify and Gmail accounts are ready.

Do I need coding skills to automate ranked trend digests?

No. You’ll mostly paste API credentials, edit keywords/hashtags, and test an email send.

Is n8n free to use for this Apify Gmail digest workflow?

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.

Where can I host n8n to run this automation?

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.

Can I customize this Apify Gmail digest workflow for multiple keywords?

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.

Why is my Apify connection failing in this workflow?

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.

How many posts can this Apify Gmail digest automation handle?

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.

Is this Apify Gmail digest automation better than using Zapier or Make?

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.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal