Send weekly YouTube Analytics channel report with Gmail
Ready for 3.0What this workflow does
This workflow has 8 nodes and runs on a schedule (cron 0 8 * * 1). Along the way it connects Gmail. It also calls youtubeanalytics.googleapis.com over HTTP.
How it runs
Trigger: On a schedule (cron 0 8 * * 1).
- Configure workflow (Edit Fields (Set)): sets 2 fields: recipient_email, analytics_lag_days
- Build two seven-day windows (Code): runs custom JavaScript code
- Read current week (HTTP Request): calls youtubeanalytics.googleapis.com
- Read previous week (HTTP Request): calls youtubeanalytics.googleapis.com
- Read top five by watch time (HTTP Request): calls youtubeanalytics.googleapis.com
- Calculate changes and build email (Code): runs custom JavaScript code
- Email weekly channel report (Gmail): uses Gmail
Services it uses
HTTP calls to: youtubeanalytics.googleapis.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (5)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Gmail
n8n-nodes-base.gmail
From the author
Quick overview This workflow runs every Monday and pulls two comparable 7-day YouTube Analytics reporting windows, calculates week-over-week changes plus the top videos by watch time, then emails an HTML report through Gmail. How it works 1. Runs every Monday…