automations / GitHub Actions · updated 2026-07-20

YouTube transcripts batch (GitHub Actions)

Run a transcript batch straight from GitHub: a workflow_dispatch takes comma-separated video IDs, calls the actor, posts a delivered-vs-failed job summary, and uploads the dataset as an artifact. Captionless videos land as typed $0 rows, not failed jobs.

A 50-video batch costs about $0.15 (50 × $0.003 plus a $0.00005 start fee) — videos that can't deliver a transcript are $0.

What's inside

  1. 1.Run the transcript batch (curl → run-sync-get-dataset-items; the dispatch input becomes the videoIds array via jq)
  2. 2.Summarize delivered vs failed (a table in the job summary)
  3. 3.Upload the dataset (actions/upload-artifact — transcripts.json with billed rows and typed $0 failure rows side by side)

Set it up

Copy the file from GitHub (button above) into your repository's .github/workflows/ directory, then add an APIFY_TOKEN repository secret (Settings → Secrets and variables → Actions). Copy the file into .github/workflows/, add an APIFY_TOKEN repository secret, then run it from the Actions tab. The video_ids input takes up to 50 comma-separated IDs. The token comes from Apify Console → Settings → API tokens; the free tier works, and the run bills per delivered row on your Apify account.

Ways to extend it

  • Commit the results to the repo instead of uploading an artifact — the pattern the reviews-history template ships.
  • Swap workflow_dispatch for a schedule plus a checked-in ID list to keep a standing corpus fresh.
  • Add a downstream job that needs: the batch job and embeds or summarizes the artifact.

Going deeper: the Python guide — the same API called from code, with real error handling. Actor pricing: what a YouTube Transcript Scraper run costs. Error codes the failure branch can carry: the error-code reference.