Monitor YouTube channels, fetch stats, classify videos as viral (≥ 1000 likes) or normal, and auto‑generate LinkedIn/email summaries with GPT‑4. Deliver via Gmail or SMTP. Clear node names, examples, and auditable fields.
This template monitors YouTube channels via RSS or the YouTube Data API, retrieves video stats, classifies each video as viral (≥ 1000 likes) or normal, and produces concise LinkedIn/email summaries with OpenAI (GPT‑4 family). It can send a compact weekly briefing via Gmail (OAuth2) or SMTP. Built for creators, marketing teams, and agencies who want automated trend alerts and ready‑to‑use content.
<a href="https://postimg.cc/cKsrVC7x" target="_blank"><img src="https://i.postimg.cc/cKsrVC7x/Screenshot-2025-10-16-085219.png" alt="Screenshot-2025-10-16-085219" /></a>
This screenshot shows the Gmail-ready weekly briefing generated by the Generate Weekly Briefing (HTML) node in my YouTube Trend Detector workflow, confirming the end-to-end pipeline: RSS/API → stats → like-based classification (≥ 1000 = viral) → LLM summaries → HTML email.
channelId
valuessnippet,statistics
for likes and detailsclassification
to viral
or normal
YouTube_API_Key
— Generic credential (field: apiKey
)OpenAi account
— OpenAI API KeyGmail account
(OAuth2) or SMTP_Default
(SMTP)channelId
values (e.g., UC…
).apiKey
)Classify by Likes (Code)
→ const THRESHOLD = 1000;
part=snippet,statistics
to obtain likeCount
likeCount
/ classification = "unknown"
→ ensure part=statistics
and a valid API key credential.redirect_mismatch
/ access_denied
→ redirect must be https://<your-n8n-host>/rest/oauth2-credential/callback
and test users added if restricted.1) Classification (single video)
{
"videoId": "abc123XYZ",
"title": "How to Ship an n8n Workflow with OpenAI",
"likeCount": 1587,
"classification": "viral",
"needsStatsFetch": false
}
2) LinkedIn draft (viral)
Did you know how much faster prompt workflows get with structured inputs?
• Setup: n8n + YouTube API + OpenAI for auto-briefs
• Tip: include `part=statistics` for reliable like counts
Useful for teams tracking trending how-to content.
What’s your best “viral” signal besides likes?
#n8n #YouTubeAPI #OpenAI #Automation #Growth
3) Plain‑text email preview
Subject: Weekly AI Briefing — YouTube Trend Highlights
Hi team,
Highlights from our tracked channels:
• Viral: “How to Ship an n8n Workflow with OpenAI” (1.6k likes)
• Normal: “RSS vs API: What’s Best for Monitoring?”
Generated via n8n + GPT‑4.
License: MIT
Support/Contact: [email protected]