Track outperforming YouTube competitor videos with Apify, Claude and Telegram
Quick overview
Description
Quick overview Checks your competitor YouTube channels every week with Apify and remembers view counts in a Data Table. Flags new outlier videos and older videos that are speeding up, reads the comments on them, has Claude explain why they worked, and sends a digest to Telegram. How it works A weekly schedule (Monday 08:00, your n8n instance's timezone) or a manual run starts the Settings node, which holds every value you can change. A Data Table node creates the memory table on the first run and reads every saved video. One request to the Apify actor sedgelabs/youtube-channel-scraper gets the latest videos of all channels with exact view counts and publish dates. If this call fails, a short failure notice goes to the delivery step and nothing is saved. A Code node takes each channel's median views and flags two kinds of video. A new outlier was published within recentDays and has at least outlierMultiple times the median views. A climbing video is older than that window, and its views gained per day since the saved snapshot are at least outlierMultiple times the median daily gain of the channel's other older videos (it needs 3 of them, and it is not flagged again for 4 weeks). The gain must also be at least minClimbPercent percent of the channel's median views per day (0.5 by default), so an old video that gains a few dozen views is not flagged. A video seen for the first time has no gain. A snapshot younger than minHoursBetweenSnapshots is kept as the baseline, so a quick rerun does not erase it. If anything is flagged, a second Apify request (sedgelabs/youtube-comments-scraper) gets the top comments on those videos, and a Code node picks up to 8 per video: the most liked and the ones that read as questions or requests. If useClaude is true, Claude writes why each video likely worked (from its title and numbers) and what viewers ask for next (from the picked comments), then one video idea to test. If Claude is off or fails, the digest lists the picked comments instead. A Code node builds a plain-text digest under 3,500 characters. A week with nothing flagged still gets a short digest with the top gainers. With deliverTo set to telegram, the digest is sent first. Then every fetched video is saved to the Data Table, and the videos that were in the digest get a reported date. If delivery fails, nothing is saved. With none, the digest is the workflow output. Setup Create an Apify account, copy your API token, and add an n8n Header Auth credential with Name Authorization and Value Bearer . Select it on both Apify HTTP Request nodes. Add an Anthropic credential with your Claude API key and select it on the Ask Claude node. Open the Settings node and list your competitors in channels (handles, URLs or channel IDs, separated by commas). Change outlierMultiple, recentDays, maxVideosPerChannel, maxVideosInDigest or claudeModel if you want. To get the digest in Telegram, create a bot with BotFather, add a Telegram credential, select it on the Send digest on Telegram node, and set deliverTo to telegram and telegramChatId in Settings. n8n will not publish a workflow whose Telegram node has no credential, so if you only use none, delete that node and the Send to Telegram? node and connect Build digest to Prepare rows to save. Execute the workflow once. The first run saves a baseline and reports new outliers only. Daily gains show from the next run that is at least minHoursBetweenSnapshots later. Publish the workflow to run it every Monday. Requirements n8n 2.3.0 or later. The Data Table node's table Create operation, which the first run uses, arrived in 2.3.0. Built and tested on n8n 2.45.1. An Apify account with an API token, and an Anthropic API key (skip it by setting useClaude to false). A Telegram bot token and chat ID only if deliverTo is telegram. Apify prices: $0.001 per video row plus $0.001 per exact-details row, so 3 channels at 20 videos each is at most $0.12 a run. The comments actor charges $1.00 per 1,000 comments plus $0.002 per video, so 5 flagged videos at 80 comments each is at most $0.41. A test run on three channels came to about $0.48 at these prices. Claude's cost for the one note is not included. Customization Replace the Telegram node with a Slack or Send Email node and use {{ $json.digest }} as the message. Keep it between Send to Telegram? and Prepare rows to save so rows are still saved only after delivery. Change the Weekly schedule node to another day. Set recentDays to match the gap between runs. Lower outlierMultiple to flag more videos, or raise it to flag fewer. Use another tableName per client, or per niche, to keep separate memories. Give each memory table a name that is not the start of another table's name in the same project. In n8n 2.45.1 the Create table step can fail with "already exists" while a second table with the same name plus "2" exists. Raise minClimbPercent if older videos are flagged on gains too small to matter, or set it to 0 to turn the floor off. Rows without an exact view count are left out of the medians and are not saved. Additional info By Sedge Labs (sedgelabs.dev). Actors: YouTube Channel Scraper (https://apify.com/sedgelabs/youtube-channel-scraper) and YouTube Comments Scraper (https://apify.com/sedgelabs/youtube-comments-scraper). Sample digest (Telegram, shortened) from a test run on three finance channels: YouTube competitor radar 13 Nov 2026 · 3 channels · 2 flagged It Started: Homebuyer Demand Just Collapsed - Buyers Getting 20-40% Discounts! Graham Stephan · +3.34K views a day · 28.9x its usual gain The Government Is Preparing For Something Andrei Jikh · +9.07K views a day · 10.5x its usual gain Why it worked: The title promises a sudden market collapse with specific 20-40% discounts... Viewers ask: prices are still too high and need to fall further, a way to avoid HOAs when buying, the research sources. Idea to test: A short video on whether internet-connected home appliances are safe to own... Channels Graham Stephan · median 538K · 19/20 fastest: It Started: The BIGGEST Wealth Transfer… +13.4K a day Andrei Jikh · median 1.68M · 20/20 Meet Kevin · median 136K · 20/20 Video tutorial: https://youtu.be/-BwPoRRSEFw. An n8n automation workflow template by Sedge Labs.
Community Metrics
Author
Sedge Labs
Platform
web
Pricing model
free
Categories
- Automation
- AI
Tags
- n8n
- workflow
- http-request
- telegram
- code
- anthropic
Capabilities
- 4 nodes