New to Kestra?
Use blueprints to kickstart your first workflows.
Track YouTube video performance with Kestra. Pull views, likes, and comments for a curated video list and post a weekly digest to Slack.
Stop copying numbers out of YouTube Studio. This blueprint runs io.kestra.plugin.youtube.VideoStats against a curated list of video IDs, pulls view, like, and comment counts for all of them in a single task, and posts an aggregate digest to Slack. With includeSnippet enabled, each video in the output also carries its title, description, and publish date, so the per-video breakdown on the execution's Outputs tab reads like a report, not a list of opaque IDs.
video_ids input holds the list of videos to track, editable at execution time without touching the flow.fetch_stats (io.kestra.plugin.youtube.VideoStats) calls the YouTube Data API with the OAuth2 access token, requesting snippet metadata alongside the statistics. The task outputs aggregate scalars, totalVideos, totalViews, totalLikes, and totalComments, plus a videos array with per-video counts and metadata.notify interpolates the four aggregate scalars into a Slack message, keeping the payload safe from arrays and nested objects.errors block posts a distinct Slack alert when the fetch fails, naming the flow and execution.Schedule trigger sends the digest every Monday at 08:00.The YouTube Data API answers the question, but someone still has to ask it every week, aggregate the answers, share them with the team, and notice when the credential expires. Kestra wraps the single VideoStats call with scheduling, execution history, output passing into Slack, and failure alerting, all declared in a few lines of YAML.
YOUTUBE_ACCESS_TOKEN: OAuth2 bearer token for the YouTube Data API.SLACK_WEBHOOK_URL: Slack incoming webhook URL.video_ids with the videos your team tracks.disabled: false on the weekly trigger.includeContentDetails: true to add duration and definition to each video's output.If task comparing totalViews against a target to alert only on notable weeks, as shown in the YouTube milestone watch blueprint.videos array into a JSONL file for warehouse loading, as shown in the YouTube stats to warehouse blueprint.