YouTube
Read a channel, its videos, statistics and playlists, read comments, and update a video's details.
A YouTube connection comes in two providers, both from the YouTube Data API and a document Auto ships for each, and both sign in to Google. YouTube reads: a channel's details, its videos and their statistics, and its playlists and their items, with the read-only scope alone. YouTube management reads the comments on a channel's videos and their replies, and updates a video's title, description, tags, category, language, privacy, publish time, licence, embedding, audience, synthetic media label, recording date and translations, with the one scope YouTube takes for comments and updates.
Available on Auto Cloud and on self-hosted runtimes.
What a playbook can do with YouTube
- Read a channel's details, its videos and their view, like and comment counts, and its playlists and their items.
- Read the comments on a channel's videos and their replies.
- Update a video's details. An update sends a whole part, such as
snippet, and clears what it leaves out of it, so a function reads the video first and sends the part back whole.
Nothing is uploaded, and no video, comment or playlist is deleted. For views, watch time, audience and revenue reports, see YouTube Analytics.
The tools of YouTube, as the connection lists them
Tools that read: youtube.channels.list, youtube.playlists.list, youtube.playlistItems.list and youtube.videos.list.
The tools of YouTube management, as the connection lists them
Tools that read: youtube.commentThreads.list and youtube.comments.list.
Tools that act: youtube.videos.update.
An example workflow
Comment moderation and reply drafts, every two hours. A schedule trigger runs the workflow. A lookup function reads the new comment threads on the channel's last ten videos through the management provider. A reasoning function sorts each thread with the channel's guidelines in its prompt: a question to answer, feedback to thank, spam to ignore, and drafts a reply for the first two kinds in the creator's voice. An interaction function sends the drafts to the creator in a Slack direct message through a Slack connection and waits for approval. Replies are posted by the creator; this connection posts no comment. A second workflow, when the YouTube Analytics connection shows a video's first week beat the channel's median, asks the creator whether to refresh the title and description, and on a yes an interaction function updates them with youtube.videos.update, the snippet read and sent back whole. The run's history in Studio keeps every comment read, every draft and every update.
How to connect YouTube
YouTube
- Sign in to Google and allow YouTube to be read. The consent screen shows the permissions listed below.
YouTube management
- Sign in to Google and allow YouTube management. The consent screen shows the permissions listed below.
Then:
- Ask your agent to connect YouTube to Auto, or open Settings, Agents, Connections in Auto Studio and choose YouTube or YouTube management.
- On the Studio page, check the service and its access, choose which playbooks may use the connection, and approve it.
- Have your agent check one small read through the connection before a function depends on it.
What it needs
- A Google account that owns or manages the channel, for comments and updates; reading a public channel's videos and playlists needs only an account.
- Your agent connected to Auto and signed in as you, with permission to change your organization, if your agent adds the connection.
- On a self-hosted runtime, a Google Cloud project of your own with the YouTube Data API enabled and an OAuth client registered for the runtime, as Let people add connections sets out.
YouTube takes one scope for listing comments and updating a video, which names deleting as well; the management connection's operations delete nothing. A playbook that only reads a channel keeps to the youtube provider and never holds that scope.
Permissions Auto asks for
YouTube:
- See the YouTube account, its channel, videos, playlists and their statistics.
YouTube management:
- See, change and permanently delete YouTube videos, ratings, comments and captions.
Good to know
The YouTube Data API has a daily quota of units per project, and listing comment threads and updating videos cost more units than listing videos; a workflow that runs every two hours over ten videos stays well within it, one that runs every minute does not. What a function reads, comments included, is kept in the run's history, where people with access to the playbook can read it.