This script will login to gmail and read all emails with a specified label. It will then use regex to find a youtube video ID in the body and then use that ID to post the video to a playlist.
Used to grab all the unlisted patreon video links in my email for KF games.
- Python 3.6+ (uses f strings)
- API Access to gmail and youtube (link below to get started)
- Gmail label set up for emails to be searched
- Youtube playlist created and ID copied
Google API Setup
- Follow the intial setup guide at the Google developers page here: https://developers.google.com/gmail/api/quickstart/python
Note Section