Live Generator

Google Sheets extension that schedules YouTube live events in bulk from rows of stream settings.

10JavaScriptMIT licenseUpdated 2026-11-16
apps-scriptautomationbroadcastgoogle-apps-scriptgoogle-sheetsjavascriptlive-streaminglivestreamschedulerspreadsheetyoutubeyoutube-apiyoutube-live
On this page
  1. Features
  2. Requirements
  3. Setup
  4. Quick setup (recommended)
  5. Manual setup (no terminal)
  6. If something goes wrong
  7. Usage
  8. Sheet columns
  9. Limitations
  10. Which YouTube channel is used
  11. Project structure
  12. Development
  13. Contributing
  14. License
Live Generator logo

Many YouTube live events, one spreadsheet.

Google Apps Script YouTube Data API v3 License: MIT Website

Bulk-schedule YouTube live broadcasts straight from a Google Sheet. Fill in a few rows, click one button, and Live Generator creates the broadcasts on YouTube and binds each one to the stream key you picked.

It is a Google Apps Script project that you attach to a Google Sheet. It adds a sidebar that signs in to your YouTube account and turns spreadsheet rows into scheduled live broadcasts. It is built for teams that run many streams on a regular basis, such as daily satsangs, recurring events and multi-camera setups, where creating each broadcast by hand in YouTube Studio is slow and error-prone.

Live Generator sidebar next to the schedule sheet

Features

  • Bulk scheduling. Select any number of rows and schedule them all at once.
  • Stream key sync. One click pulls every stream key from your YouTube channel into the YT Keys sheet.
  • Automatic binding. Each broadcast is bound to the stream key named in the row's Key ID column.
  • Row validation. Dates, times, visibility and boolean options are checked before anything is sent to YouTube, and errors name the offending row.
  • Smart defaults. If you leave Year, Month, Day or Hour empty, the current date and time are used.
  • Visual feedback. A successfully scheduled row gets its Broadcast ID filled in and highlighted. A failed row is highlighted red.
  • Activity log. The sidebar shows a timestamped log of every action and error.
  • Full control. Set visibility, DVR, auto-start, auto-stop and latency per broadcast.

Requirements

  • A Google account whose own (main) YouTube channel, the one created automatically with that account, is enabled for live streaming. Branded channels are not supported. See Which YouTube channel is used.
  • Node.js 22 or newer, for the one-command setup (not needed for the manual setup).

[!IMPORTANT] Live Generator works only with the main YouTube channel of the Google account you are signed in with, the one created with that email address. It does not work with Brand Accounts (branded channels), even if you are a manager or owner of one. See Which YouTube channel is used.

Setup

About 5 minutes. You need Node.js 22 or newer and a Google account.

  1. One-time: turn on the Apps Script API for your Google account at script.google.com/home/usersettings (switch Google Apps Script API to On).

  2. In a terminal, in this project's folder, run:

    npm install
    npm run setup
    

    A browser window opens. Sign in with the Google account that owns your YouTube channel. The command then creates a new spreadsheet called Live Generator with the script attached, and uploads the code.

    To use a spreadsheet you already have, pass its link or ID instead: npm run setup -- <spreadsheet link or ID>.

  3. Open the spreadsheet, reload it, and go to Extensions → Live Generator → Show Sidebar. The YT Schedule and YT Keys tabs are created for you the first time the sidebar opens.

  4. Google asks you to authorize the script. It says the app is "not verified" because you made it yourself: click Advanced → Go to Live Generator (unsafe) → Allow. Use the account that owns your YouTube channel.

Updating later: pull the new changes and run npm run setup again. It re-uploads the code to the same script and leaves your spreadsheet untouched.

Manual setup (no terminal)

  1. Create a Google Sheet, then go to Extensions → Apps Script and name the project Live Generator.
  2. Copy the files from src/ into the editor:
  3. Enable the YouTube API. Either:
    • open Project Settings, tick Show "appsscript.json" manifest file in editor, and paste in the contents of appsscript.json, or
    • click Services (+) in the editor, choose YouTube Data API v3 and keep the identifier YouTube.
  4. Save, reload the spreadsheet, then open Extensions → Live Generator → Show Sidebar and authorize as in step 4 above.

If something goes wrong

What you see Likely cause
npm run setup says to turn on the Apps Script API Do step 1 of the quick setup, then run it again.
YouTube is not defined in the sidebar log The YouTube service is not enabled. In the Apps Script editor click Services (+), add YouTube Data API v3 and keep the identifier YouTube.
The sidebar shows the wrong channel You authorized the script with a different Google account. Open the spreadsheet signed in as the account that owns your YouTube channel and authorize again.

Usage

  1. Open the sidebar and check that your email and channel are shown at the top.
  2. Click Update Stream Keys to load your stream keys into YT Keys. Run this again whenever you create or change a key on YouTube.
  3. In YT Schedule, fill in your rows. Use the ID column from YT Keys for Key ID.
  4. Select the rows you want to schedule, then click Schedule Selected Rows.
  5. Check the Broadcast ID column and the sidebar log. Broadcasts also appear in YouTube Studio under Content → Live.

[!TIP] Select several rows at once to schedule a whole week of streams in one click.

Sheet columns

The tabs are created for you; this is what each column means.

YT Schedule has one broadcast per row, with these headers in row 1:

Column Required Description
Title Yes Broadcast title shown on YouTube.
Year No 2000-2100. Defaults to the current year.
Month No 1-12. Defaults to the current month.
Day No 1-31. Defaults to the current day.
Hour No 0-23. Defaults to the current hour plus 2.
Minute No 0-59. Defaults to 0.
Visibility Yes public, unlisted or private.
Key ID Yes The stream ID from the YT Keys tab.
DVR No true or false. Enables DVR (rewind) for viewers. Defaults to false.
Auto Start No true or false. Starts the broadcast when the stream begins.
Auto Stop No true or false. Ends the broadcast when the stream stops.
Latency No normal, low or ultraLow.
Broadcast ID Auto Leave empty. Filled in by the script. A row that already has one is rejected with an error.

YT Keys is filled in by the Update Stream Keys button, with these columns:

A B C D
ID Channel ID Title Key

Limitations

  • Main channel only. Only the YouTube channel tied to the signed-in Google account is supported. Brand Accounts are not, even if you have access to them (see below).
  • Time zone is fixed to IST. Start times are sent with a +05:30 offset and appsscript.json sets the project time zone to Asia/Kolkata. To use another zone, change the offset in insertBroadcast() in YouTube.js and the timeZone in appsscript.json.
  • Parallel live streams are capped by YouTube. At the time of writing, YouTube allows a channel to have at most 10 live streams active at the same time, and at most 3 active streams per stream key. This limits how many broadcasts can be live simultaneously, not how many you can schedule, so plan overlapping events accordingly. See YouTube's live streaming help for the current numbers.
  • Up to 50 stream keys are fetched per refresh.
  • API quota. Scheduling is subject to your YouTube Data API daily quota.

Which YouTube channel is used

The script calls the YouTube API as the Google account that authorizes it, and Apps Script's YouTube advanced service always acts on that account's own main channel. It cannot switch to a branded channel, and it does not offer a channel picker.

  • Works: the channel that was created automatically with your Google account (the sidebar shows its name as Channel).
  • Does not work: a branded channel that you can switch to in YouTube, such as a channel created for an organization or event and shared with you as a manager or owner.

If your streams live on a branded channel, this tool cannot schedule them. Check the Channel name in the sidebar: if it is not the channel you expect, you are signed in with the wrong account.

Project structure

Path Purpose
src/Code.js Menu, sidebar, sheet logic, row validation and formatting.
src/YouTube.js Thin wrappers around the YouTube Data API v3 live endpoints.
src/Sidebar.html Sidebar UI and client-side handlers.
src/appsscript.json Apps Script manifest: runtime, time zone and enabled services.
build-tools/setup.mjs The npm run setup script that creates and updates the project with clasp.

Development

Edit the files in src/, then run npm run setup to upload them. Check formatting with Prettier before committing:

npm run format:check   # or: npm run format

.clasp.json (your script ID) is created by the setup command and is git-ignored, so each person deploys to their own spreadsheet.

Contributing

Issues and pull requests are welcome. If you plan a larger change, please open an issue first to discuss it.

License

Released under the MIT License.