Watching 10,000 hours of TikTok for $20, without the brainrot
I was told that all product trends start on TikTok, but after an hour I realised my brain would wither before I found anything meaningful. So I built a pipeline that watches 10,000 hours of TikTok for $20 and emails me a top ten.

We import goods into New Zealand, and the fattest margin is on the thing that’s already trendy somewhere else. The whole game is finding it before anyone else does.
Context
As much as it kills me to say it, we are very similar to our commonwealth cousins. Looking at what’s taking off in the US, the UK and Australia is like looking into a crystal ball. If something’s taking off there we can get it in first, take the premium while our customers find it novel, and be out before it saturates and we’re holding a pallet of last year’s hype.
So: could we spot the trend early over there and land it here first?
Our customers and sales team insisted that all trends start on TikTok. Unfortunately, I don’t have social media and barely use Strava. I was terrified what would happen if I unleashed a firehose of addictive content at my brain. Luckily for me, candytok is awful.
I sat in the office feeling like a pervert, watching people seductively eat candy into a microphone. It’s the ASMR trend, so it’s all close-mic’d and it genuinely sounds lovely, but it is the definition of brainrot. After an hour I felt disgusting. I might have found a couple of interesting things. No way I’d sit through enough to see a pattern.
The useful thing that hour gave me: the video is the least important part of the video. The tags, the subtitles and the title are pretty good on their own. The dream would be to aggregate the signal and sentiment from the videos and surface a short list of trends that were new to us and worth monitoring.
How it’s built
Two n8n workflows. One scrapes TikTok through Apify into a data table. The other, sixteen nodes, wakes up when it finishes and throws videos away until a week of candytok is one email.
- n8n
1. When Executed by Another Workflow
The scraper hands over. Apify and the extraction happen upstream.
- n8n
2. Load Known Trends
The known_tiktok_trends data table, filtered to active = true and category = confectionary.
- Google Sheets
3. Create spreadsheet
A fresh sheet every run. Four more nodes share it, format it and write the header row.
- n8n
4. get tiktok run data
Today’s rows out of the Tiktok scrape data table.
- n8n
5. Tiktok Runs
Keeps only videos that have an identified product OR trend.
- n8n
6. identify videos with known trends
Compares each video against the known-trends list and flags the matches.
- n8n
7. Filter out known trends
Drops the matches, leaving only new or unknown ones.
- n8n
8. hide videos with low views
Keeps only videos with more than 1000 views.
- Google Sheets
9. Append row in sheet
Every survivor becomes a row.
- n8n
10. Aggregate TikTok Data
Rolls all the rows into a single item.
- OpenAI
11. Analyze and Generate Summary
An AI agent: an OpenAI model with a Perplexity research tool, writing the top 10.
- Gmail
12. Send Email Summary
The summary, plus a link to the spreadsheet.

The last flow step is an agent rather than a plain call, and its research tool carries its own prompt. One trend goes in, five headings come back.
The research prompt
You are a market research analyst specialising in early-stage consumer and FMCG trends.
Deep-dive on the following trend:
**Trend name:** {{TREND_NAME}}
Your task is to produce a concise but rigorous report covering:
1. **Origin & Timeline** — when the trend first appeared, and key inflection points
2. **Who Started or Popularised It** — original creator, brand, community or geography
3. **Current Market & Price Signals** — typical retail prices, example products with citations
4. **Adoption & Momentum Signals** — growth on TikTok, Instagram, Amazon, Google Trends or trade sites, and whether this is early, mid-curve or peaking
5. **Commercial Takeaway** — why this trend may be worth paying attention to now
Be specific, evidence-based, and cite sources where possible.
Avoid hype — focus on signals, data, and concrete examples.The stack
- Apify · Scrapes TikTok. An actor that does nothing but this, up to 10,000 videos a run.
- n8n · Two workflows. One scrapes, the other filters and sends.
- OpenAI · Names the product or trend per video, then writes the top ten.
- Perplexity · A research tool on that agent, deep-diving each new trend.
- Google Sheets · A fresh sheet per run, one row per survivor.
- Gmail · Where the top ten lands on a Friday.
A run costs about five dollars all in.
Firecrawl couldn’t do it, Apify could
I tried scraping this myself first, with Firecrawl and a couple of other things, and none of it worked. Then I found an actor on Apify that does nothing but this, I can trigger it from n8n, and what comes back is full of information.
The cleaning is the build
Everything after the scrape is subtraction. The LLM needs to be fed clean data and only high value videos, so there is a lot of cleaning before I batch anything.
Three filters in a row do most of it, and none of them are clever. Unnameable, already-known, then anything under a thousand views. I filter for view count at the Apify end too and it doesn’t always hold, so it gets checked again here.
Anything that turns up more than once in a single run gets written to the known trends list, so the next run doesn’t hand it back to me.
The extraction prompt is where the effort went. When there’s no product name to be had, it’s told to name the trend rather than return nothing.
The extraction prompt
You are an expert at extracting consumer product intelligence and emerging candy trends from short-form social media videos.
You will be given: video script / transcript, video description text, hashtags, video id.
Your task is to identify all specific products and, when no specific product exists, identify the candy trend or product type being referenced.
Inputs
Script: {{ $json.subtitle_text }}
Text / Description: {{ $json.text }}
Hashtags: {{ $json.hashtags }}
Video id: {{ $json.video_id }}
Instructions
Primary extraction
Extract specific product names when available
Examples: "Takis Blue Heat", "World's biggest sour candy necklace"
Extract the brand when it is explicitly mentioned or strongly implied.
Include products even if they are mentioned casually or indirectly, referred to by size, color, or variant, or only visible via hashtags.
Trend / product-type fallback
If no specific product name is present, identify the candy trend or product type instead.
Examples: "peelable candy", "Swedish candy", "wax candy", "giant novelty candy", "extreme sour candy", "TikTok imported candy"
When returning a trend or product type: set product_name to the trend or category, set brand to null, set product_type to "trend" or "category".
General rules
Do not hallucinate brands or products not reasonably supported by the inputs.
If a product is generic or unnamed, keep brand as null.
If multiple distinct products or trends appear, return one entry per item.
Be conservative — precision > recall, but prefer trend-level extraction over returning nothing.
all references to asmr and unboxing can be ignored. just focus on the candy
Output Format (JSON only)
{
"products": [
{
"video_id": "string",
"product_name": "string",
"brand": "string | null",
"product_type": "specific_product | trend | category",
"confidence": "high | medium | low",
"evidence": ["script", "text", "hashtags"]
}
]
}
Confidence Guidelines
High: Explicitly named in script or text
Medium: Strongly implied via context or hashtags
Low: Trend inferred from multiple weak signals
Important
Return JSON only. No explanations. No commentary. No brand-only output. Do not alter the videoId.It hands back a confidence too. Named out loud is high, inferred from three weak hashtags is low.
Learnings
- I never processed the video. The subtitles, the description and the hashtags carry the product name, and they’re cheap to read. Watching the footage would have cost more and been much slower to process, for a product name I already had.
- It found interesting trends early, like spicy Skittles, Swedish candy and bone-conducting lollipops. What’s cool is that we saw these super early, and when our procurement boys went to the candy convention in Las Vegas, not too much was new to them.
- As an exploratory tool it was great. Four of the trends it found went to our suppliers as enquiries, but nothing has landed in the warehouse yet, and that’s where the real proof lies.
- The pipeline is actually very general. Changing the search terms and the text processing prompt is the only difference between watching confectionery and watching anything else.
And this is the prompt that writes the email. It never sees a video, only the aggregated rows.
The summary prompt
You are a confectionery procurement analysis expert specialising in finding new product trends on tiktok. Your goal is to find specific items that could become trendy and then import them into new zealand. Your task is to analyze TikTok video data and create an email summary that highlights the top 10 most interesting confectionery trends or products worth investigating. ONLY CONSIDER CONFECTIONERY prioritise recommendations that appear multiple times in the dataset For each recommendation, you must: 1. Identify the trend or product name 2. give key video metrics,hashtags, views, location 3. Include a direct link to the TikTok video in the format: https://www.tiktok.com/@username/video/VIDEO_ID Base your analysis on the provided data fields: video_url, Identified_products, identified_trends, view_count, engagement_score, location_created, hashtags, and subtitle_text. Return ONLY the HTML email body content, ready to be sent.
A Friday run looks like this.

Next steps
What’s still broken
- No orders yet. Four supplier enquiries out, nothing in the warehouse.
- Low view counts still get through. The filter at the Apify end doesn’t always apply, so the flow has to do it again.
- The processing takes several hours. I’ve done some small batching optimisations, but this is still insane and I’d want to work on the architecture to make it snappier.
What I want to build
- Swap confectionery for another category. Change the search terms and the hashtags and it’s a trend radar for something else.
- Point it at a different pair of markets. Anywhere further along than where you’re selling works the same way.
- A time series, so we can watch trends grow and die. The known trends list only remembers whether we’ve seen something, not how big it was, so every run is almost static.
Four trends off the back of it went to our suppliers as enquiries: Swedish gummies, spicy candy, bone-conducting musical lollipops, and fairy bread flavoured marshmallow. Let’s see how many make it into the warehouse.
One hour of TikTok was plenty for one lifetime. This does about ten thousand videos a week and doesn’t seem to mind.




