Quick overview
This workflow runs every Monday to fetch your latest YouTube videos, calculate performance rankings, generate an OpenAI insight summary, then share a weekly digest to Slack, log metrics to Google Sheets, and email an HTML report via Gmail.
How it works
- Runs every Monday at 08:00 using a schedule trigger.
- Calls the YouTube Data API to fetch the 20 most recent videos from your channel and extracts their video IDs and metadata.
- Batch-fetches each video’s statistics from the YouTube Data API, then calculates engagement rate, a composite performance score, ranks videos, and tags them as Top Performer, Average, or Underperformer.
- Aggregates the ranked list and sends it to OpenAI to generate a concise weekly performance insight summary and recommendations.
- Posts a formatted weekly digest to a Slack channel highlighting the best and worst video plus the top 5 rankings and AI insights.
- Appends each video’s weekly metrics to a Google Sheets tab for historical tracking, then emails a full ranked HTML report to the content manager using Gmail.
Setup
- Enable the YouTube Data API v3 and set your YouTube API key and channel ID in the two YouTube HTTP requests.
- Add an OpenAI credential (Chat Model) and select the model you want to use for generating the insight summary.
- Add a Slack credential and set the target channel ID for where the digest should post.
- Create a Google Sheet with a tab named “YouTube Performance Log”, add a Google Sheets credential, and replace the placeholder spreadsheet ID.
- Add a Gmail credential and set the recipient address for the weekly email report.