Build Lab / API · AI agent · Automation Shipped

YouTube Channel Intelligence — an analyst that runs itself.

Every time a video goes live, it pulls the channel's full history from two YouTube APIs, computes the statistics in code, and emails a report naming what is working, what is not, and the literal title to publish next.

The problem

Channel analytics tell you what happened, not what to do next. YouTube Studio shows numbers per video; deciding the next move means comparing videos against each other, normalizing for age, and spotting patterns across titles, lengths, and publish times. That is a weekly hour of manual work most creators skip.

The architecture

Google Apps Script bound to a Google Sheet. No server, no hosting cost, runs inside the owner's Google account.

  1. 01
    Detect

    A lightweight poll checks whether the newest video ID has changed. If it has not, it stops there. No AI call, no email, about four API calls a day.

  2. 02
    Pull

    YouTube Data API v3 for titles, tags, length, publish time, views, likes, and comments; YouTube Analytics API for retention, watch time, and subscribers gained.

  3. 03
    Compute

    Statistics calculated in code, not by the model. Views per day since publish, medians by title feature, length bucket, publish day, and publish hour.

  4. 04
    Analyze

    The model receives computed findings and a strict brief, and returns a report with a banned-phrases list to keep it specific.

  5. 05
    Record

    Every run appends a snapshot row per video, so the sheet becomes a performance history rather than a current-state dump.

  6. 06
    Deliver

    A formatted email with what is working, what is not, what viewers are asking for, and the next two video titles to publish.

The emailed report: a dark header, four stat chips, a blue Do this next card with numbered recommendations, then colour-coded sections for what is working and what is not
The delivered report. Recommendations lead; the two upcoming video titles are redacted here, not in the original.
The Videos tab of the Google Sheet showing one row per video with published date, length, views, likes, comments, average view seconds, average view percentage, and subscribers gained
The Videos tab, rebuilt every run. Revenue and tag columns are cropped from this capture.

The decisions that made it useful

What it costs to run

Apps Script and both YouTube APIs are free at this volume. The upload detector uses roughly four of a ten thousand unit daily quota. Model spend is a handful of calls a week. The expensive part of most automations is the polling, so the design spends API calls only to answer one cheap question, and spends model tokens only when the answer changes.

What this does not share

The screenshots above are redacted on purpose: per-video revenue and the tag column are cropped out, and the two upcoming video titles are covered. Every build in this lab gets the same treatment: the system is private, the case study is public, and the line between them is stated rather than assumed.

Have a process that reports on itself?

Let's automate the analysis, not just the data.