Easily add YouTube videos to your Watch Later playlist from Workflow
- Login to the Google Developer Console and create a new project
- Enable the following APIs:
- Create new credentials for your application (Follow the yt gem's instructions, you'll want to create an application that requires user interactions)
- Store the client id and secret for deployment
The server requires 4 environment variables:
YT_CLIENT_ID
- Taken from step 4 aboveYT_CLIENT_SECRET
- Also taken from step 4 aboveRACK_COOKIE_SECRET
- A key you should keep secretREDISTOGO_URL
- A URL to a redis server
The application is a Sinatra app that can run on the Heroku Buildpack for Ruby. Clone the repository and push to heroku (or use the deploy button above) to create your instance. Once launched, be sure to configure your environment variables. You'll also need to add the Redis To Go add-on.
Once running, you can visit https://<application.hostname>/auth/google_oauth2
to authorize your YouTube account. Then add the workflow below and you are ready to roll.
Add the workflow to your Workflow iOS app. At minimum, you'll want to adjust the rootUrl
variable to point it to your web service location. The workflow is designed to run as an Action Extension. Typically I use it by sharing a YouTube URL (or shortlink) and invoking the Workflow from the share menu in iOS. Refer to the usage documentation for a more detailed explanation of how to use it.
Copyright (c) 2016 Steve Agalloco. See LICENSE for details.