YouTube
The YouTube connector uploads videos to a channel and manages them. It ships with Core Connectors.
Before you rely on it
The connector follows YouTube's published API and is tested against a stand-in that behaves as that documentation says. It has not yet been run against YouTube itself: that takes a Google account and an OAuth client, which each installation brings. Try it with a private video first.
What it does
| Action | What it does | Inputs |
|---|---|---|
| Upload video | Sends a video file to the channel, in pieces of 8 MiB | video (a file record), title, privacyStatus; optional description, tags, categoryId, madeForKids, publishAt |
| Set thumbnail | Sets a video's thumbnail from an image file | image (a file record), videoId |
| Get video | Details, visibility, numbers, and how far processing is | videoId |
| Update video | Changes title, description, tags, category and visibility | videoId, title, categoryId, privacyStatus; optional description, tags |
| Delete video | Deletes a video. It cannot be undone | videoId |
| List my channels | The account's channels | |
| List my videos | The channel's latest 25 videos | |
| List my playlists | The channel's playlists (50 at most) | |
| Add video to playlist | Puts a video at the end of a playlist | playlistId, videoId |
privacyStatus is private, unlisted or public. video and image take the id of a file record of the branch the workflow runs on.
Set it up once per installation
Google signs people in through an OAuth client that belongs to whoever runs CodeKasten. The connector ships without one.
- In the Google Cloud console, make a project and enable YouTube Data API v3.
- Configure the OAuth consent screen, and add the scopes
…/auth/youtube.uploadand…/auth/youtube. - Create an OAuth client of the type Web application. As an authorised redirect URI, give your backend's address followed by
/connectors/oauth/callback(on a development stack:http://127.0.0.1:3009/connectors/oauth/callback). - In CodeKasten, open Core Connectors (
/!core), then YouTube, then Auth methods. Fill in the Client ID, the Client secret and the same Redirect URI, and save. This takes an owner or admin of Core Connectors. - Publish release, so workspaces get the connector with your client.
The client secret is stored encrypted on the server and is never part of a release.
Use it in a workspace
- Marketplace: install or upgrade Core Connectors.
- Integrations: choose YouTube, Add account, and sign in with the Google account that owns the channel.
- In a workflow, add a Connector Action step, choose YouTube and the action, and give it its inputs.
For example, a workflow that publishes a video when a record says so: an Entity Trigger on the record, Upload video with the record's file as video and its name as title, then Update Entity to write the answer's id back.
What to know
- Quota. Google gives a project a daily quota, and an upload costs a large share of it. A project's first uploads may also be locked as private until Google has reviewed the project.
- A failed upload is not started again by itself. A piece that fails is sent again up to three times; after that the step fails and a person decides. See Actions that send a file.
- Processing takes time. A video is not watchable the moment the upload ends. Get video says how far it is.
- Update video sets everything it sends. Leave out the description and it is emptied: send what should stay as well.
- Text is sent as typed. Titles and descriptions may hold quotes and line breaks.