https://github.com/googleappsscriptautomation/youtube-live-tracker
Tracks YouTube channels for new livestreams and records that into Google Sheets, grouped by channel. New livestreams are also added into individual playlists, grouped by the broadcaster name.
https://github.com/googleappsscriptautomation/youtube-live-tracker
excel google-apps-script google-sheets google-sheets-api playlist spreadsheet spreadsheets video youtube youtube-api youtube-api-playlist youtube-api-v3 youtube-api-v3-2025 youtube-playlist youtube-video
Last synced: about 2 months ago
JSON representation
Tracks YouTube channels for new livestreams and records that into Google Sheets, grouped by channel. New livestreams are also added into individual playlists, grouped by the broadcaster name.
- Host: GitHub
- URL: https://github.com/googleappsscriptautomation/youtube-live-tracker
- Owner: GoogleAppsScriptAutomation
- License: mit
- Created: 2025-08-10T21:38:34.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-10T22:09:17.000Z (10 months ago)
- Last Synced: 2025-08-22T16:39:34.703Z (10 months ago)
- Topics: excel, google-apps-script, google-sheets, google-sheets-api, playlist, spreadsheet, spreadsheets, video, youtube, youtube-api, youtube-api-playlist, youtube-api-v3, youtube-api-v3-2025, youtube-playlist, youtube-video
- Language: JavaScript
- Homepage: https://github.com/raymelon/youtube-live-tracker
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YouTube Live Tracker
A Google Apps Script that automatically discovers and logs live streams from multiple YouTube channels to Google Sheets, with playlist integration.
## What It's For
This tool helps you:
- Monitor multiple YouTube channels for live streams simultaneously
- Automatically log discovered live streams to organized spreadsheets
- Build playlists of live content from your favorite channels
- Keep a historical record of all live streams from tracked channels
- Never miss a live stream from channels you follow
## How It Works
The script operates by:
1. **Reading** a list of YouTube channel IDs from a main "Channels" sheet
2. **Searching** each channel for currently live videos using YouTube Data API
3. **Creating** a dedicated sheet for each channel (named after the channel)
4. **Logging** new live streams with video ID, title, URL, and timestamp
5. **Adding** videos to specified playlists (optional per channel)
6. **Preventing** duplicate entries by checking existing logs
## Setup
### Prerequisites
- Google account with Google Sheets access
- YouTube Data API v3 enabled in Google Cloud Console
- Channel IDs of YouTube channels you want to track
### Installation
1. **Create the Spreadsheet Structure**
```
- Create a new Google Sheet
- Rename the first sheet to "Channels"
- Add headers: Channel ID | Playlist ID (optional)
- Add channel IDs you want to track (one per row)
```
2. **Add the Script**
- Go to Extensions → Apps Script
- Delete any default code
- Paste the [`Code.gs`](Code.gs) content
- Save the project with a name like "YouTube Live Tracker"
3. **Enable YouTube API**
- In Apps Script editor, click Services (+)
- Find and add "YouTube Data API v3"
- Click OK to enable
4. **Set Up Automation**
- In Apps Script, click Triggers (clock icon)
- Add Trigger → Choose function: `trackAllChannels`
- Select time-based trigger (e.g., every 10 minutes)
- Save
5. **First Run**
- Run `trackAllChannels()` manually once
- Authorize the required permissions
- Check that channel sheets are created
### Usage
Once configured:
- The script runs automatically at your set interval
- Each tracked channel gets its own sheet with live stream history
- New live streams are automatically logged with timestamps
- Optional: Videos are added to playlists if playlist IDs are provided
### Sheet Structure
**Channels Sheet (Main):**
| Channel ID | Playlist ID |
|------------|-------------|
| UCxxxxxx | PLxxxxxx |
**Individual Channel Sheets (Auto-created):**
| Video ID | Title | URL | Date Added |
|----------|-------|-----|------------|
| xxxxxxxxxxx | Stream Title | https://youtube.com/watch?v=xxx | 2024-01-15 10:30:00 |
## LICENSE
MIT License