To be used with zapier. https://zapier.com/app/assets/zaps This script automatically:
- checks the input playlist and builds up set of video ids
- looks at all subscribed channels and pulls non-shorts videos they published in the last x days
- if the video isn't already in the playlist, adds it
steps
- set up a zap
- set it to trigger every day
- set up a custom action
- copy this script into the custom action
- set the playlist id in the custom action
- let it run every morning
Google Apps Script version (YouTube Advanced Service)
- File:
google_apps_script.js - Setup steps:
- In Apps Script, open
google_apps_script.js(or paste it in). - Services (puzzle-piece icon) → Add “YouTube Data API v3”.
- Set
playlistIdat the top of the script. - Save the project; run once to authorize.
- Triggers (clock icon) → Add Trigger:
- Function:
manageYouTubeSubscriptionsAndPlaylist - Event source: Time-driven → Day timer → pick a daily window.
- Function:
- Save the trigger; the script will run daily.
- In Apps Script, open