> ## Documentation Index
> Fetch the complete documentation index at: https://ai-kb.automationanywhere.com/llms.txt
> Use this file to discover all available pages before exploring further.

# YouTube Toolkit

> Call the YouTube Data API v3 with the connected Google account — manage videos, channels, playlists, and uploads

The **YouTube** toolkit lets agents call the YouTube Data API v3 using the signed-in user's Google OAuth token. Use it for video, channel, playlist, and upload workflows via a flexible custom API tool.

Add it on the agent **Toolkits** tab. The first use prompts the user to connect Google if they have not already. YouTube shares the Google Workspace OAuth connection with Gmail, Drive, Docs, and related Google toolkits.

## Prerequisites

* A Google account with access to the YouTube channel or content the agent should use
* An agent you can edit
* Google OAuth configured for your organization (admin)
* Users who will chat with the agent must complete the Google OAuth connect flow when prompted

## Setup

1. Open the agent → **Toolkits** → add **YouTube**.
2. Save the agent. In **Chat**, connect Google when prompted.
3. `@`-mention YouTube tools in the personality prompt for video or channel tasks.

## Available tools

| Tool                | Description                                                                                                                                                                                                             |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Custom API Call** | Calls any YouTube Data API v3 endpoint (GET, POST, PATCH, PUT, DELETE). The connected user's Bearer token is injected automatically. Supports video upload from a **public** `file_url` and follow-up metadata updates. |

## Use cases

* List or search videos and playlists for a channel
* Update video metadata (title, description, tags, category)
* Upload a video from a publicly reachable file URL, then set metadata
* Inspect channel details for content audits

## Tips

* Prefer documented [YouTube Data API v3](https://developers.google.com/youtube/v3) paths and query params in the custom call.
* After upload, set **categoryId** and other metadata as required by the API.
* Upload source files must be reachable at a **public URL**.
* Access is limited to what the **connected Google / YouTube account** can manage.

## Troubleshooting

| Symptom                        | What to check                                                               |
| ------------------------------ | --------------------------------------------------------------------------- |
| Google OAuth not connected     | Complete the Google connect prompt; reconnect if scopes are missing         |
| 403 / insufficient permissions | Reconnect Google and confirm YouTube scopes were granted                    |
| Upload fails                   | Confirm `file_url` is publicly reachable; check file size and format limits |
| Metadata update fails          | Include required fields such as `categoryId` after upload                   |

## Related

* [Google Drive](/agents/toolkits/google-drive)
* [Gmail](/agents/toolkits/gmail)
* [Toolkits overview](/agents/toolkits/overview)
