YouTube Automation via Rube MCP
Automate YouTube operations through Composio's YouTube toolkit via Rube MCP.
Prerequisites
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- Active YouTube connection via
RUBE_MANAGE_CONNECTIONS with toolkit youtube
- Always call
RUBE_SEARCH_TOOLS first to get current tool schemas
Setup
Get Rube MCP: Add https://rube.app/mcp as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
- Verify Rube MCP is available by confirming
RUBE_SEARCH_TOOLS responds
- Call
RUBE_MANAGE_CONNECTIONS with toolkit youtube
- If connection is not ACTIVE, follow the returned auth link to complete Google OAuth
- Confirm connection status shows ACTIVE before running any workflows
Core Workflows
1. Upload and Manage Videos
When to use: User wants to upload a video or update video metadata
Tool sequence:
YOUTUBE_UPLOAD_VIDEO - Upload a new video [Required]
YOUTUBE_UPDATE_VIDEO - Update title, description, tags, privacy [Optional]
YOUTUBE_UPDATE_THUMBNAIL - Set a custom thumbnail [Optional]
Key parameters:
title: Video title (max 100 characters)
description: Video description (max 5000 bytes)
tags: Array of keyword tags
categoryId: YouTube category ID (e.g., '22' for People & Blogs)
privacyStatus: 'public', 'private', or 'unlisted'
videoFilePath: Object with {name, mimetype, s3key} for the video file
Pitfalls:
- UPLOAD_VIDEO consumes high quota; prefer UPDATE_VIDEO for metadata-only changes
- videoFilePath must be an object with s3key, not a raw file path or URL
- Tags total must not exceed 500 characters including separators
- Angle brackets
< > in tags are automatically stripped
- Description limit is 5000 bytes, not characters (multibyte chars count more)
2. Search YouTube Content
When to use: User wants to find videos, channels, or playlists
Tool sequence:
YOUTUBE_SEARCH_YOU_TUBE - Search for content [Required]
YOUTUBE_VIDEO_DETAILS - Get full details for a specific video [Optional]
YOUTUBE_GET_VIDEO_DETAILS_BATCH - Get details for multiple videos [Optional]
Key parameters:
q: Search query (supports exact phrases, exclusions, channel handles)
type: 'video', 'channel', or 'playlist'
maxResults: Results per page (1-50)
pageToken: For pagination
Pitfalls:
- Search endpoint only returns 'snippet' part; use VIDEO_DETAILS for statistics
- Search results are capped at 500 total items
- Search has higher quota cost (100 units) vs list endpoints (1 unit)
- BATCH video details practical limit is ~50 IDs per call; chunk larger sets
3. Manage Playlists
When to use: User wants to create playlists or manage playlist contents
Tool sequence:
YOUTUBE_LIST_USER_PLAYLISTS - List user's existing playlists [Optional]
YOUTUBE_CREATE_PLAYLIST - Create a new playlist [Optional]
YOUTUBE_ADD_VIDEO_TO_PLAYLIST - Add a video to a playlist [Optional]
YOUTUBE_LIST_PLAYLIST_ITEMS - List videos in a playlist [Optional]
Key parameters:
playlistId: Playlist ID ('PL...' for user-created, 'UU...' for uploads)
part: Resource parts to include (e.g., 'snippet,contentDetails')
maxResults: Items per page (1-50)
pageToken: Pagination token from previous response
Pitfalls:
- Do NOT pass channel IDs ('UC...') as playlist IDs; convert 'UC' to 'UU' for uploads
- Large playlists require pagination via pageToken; follow nextPageToken until absent
- items[].id is not the videoId; use items[].snippet.resourceId.videoId
- Creating duplicate playlist names is allowed; check existing playlists first
4. Get Channel and Video Analytics
When to use: User wants to analyze channel performance or video metrics
Tool sequence:
YOUTUBE_GET_CHANNEL_ID_BY_HANDLE - Resolve a handle to channel ID [Prerequisite]
YOUTUBE_GET_CHANNEL_STATISTICS - Get channel subscriber/view/video counts [Required]
YOUTUBE_LIST_CHANNEL_VIDEOS - List all videos from a channel [Optional]
YOUTUBE_GET_VIDEO_DETAILS_BATCH - Get per-video statistics [Optional]
YOUTUBE_GET_CHANNEL_ACTIVITIES - Get recent channel activities [Optional]
Key parameters:
channelId: Channel ID ('UC...'), handle ('@handle'), or 'me'
forHandle: Channel handle (e.g., '@Google')
id: Comma-separated video IDs for batch details
parts: Resource parts to include (e.g., 'snippet,statistics')
Pitfalls:
- Channel statistics are lifetime totals, not per-period
- BATCH video details may return fewer items than requested for private/deleted videos
- Response data may be nested under
data or data_preview; parse defensively
- contentDetails.duration uses ISO 8601 format (e.g., 'PT4M13S')
5. Manage Subscriptions and Comments
When to use: User wants to subscribe to channels or view video comments
Tool sequence:
YOUTUBE_SUBSCRIBE_CHANNEL - Subscribe to a channel [Optional]
YOUTUBE_UNSUBSCRIBE_CHANNEL - Unsubscribe from a channel [Optional]
YOUTUBE_LIST_USER_SUBSCRIPTIONS - List subscriptions [Optional]
YOUTUBE_LIST_COMMENT_THREADS - List comments on a video [Optional]
Key parameters:
channelId: Channel to subscribe/unsubscribe
videoId: Video ID for comment threads
maxResults: Results per page
pageToken: Pagination token
Pitfalls:
- Subscribing to an already-subscribed channel may return an error
- Comment threads return top-level comments with up to 5 replies each
- Comments may be disabled on some videos
- Unsubscribe requires the subscription ID, not the channel ID
Common Patterns
Channel ID Resolution
Handle to Channel ID:
1. Call YOUTUBE_GET_CHANNEL_ID_BY_HANDLE with '@handle'
2. Extract channelId from response
3. Use in subsequent channel operations
Uploads Playlist:
1. Get channel ID (starts with 'UC')
2. Replace 'UC' prefix with 'UU' to get uploads playlist ID
3. Use with LIST_PLAYLIST_ITEMS to enumerate all videos
Pagination
- Set
maxResults (max 50 per page)
- Check response for
nextPageToken
- Pass token as
pageToken in next request
- Continue until
nextPageToken is absent
Batch Video Details
- Collect video IDs from search or playlist listings
- Chunk into groups of ~50 IDs
- Call GET_VIDEO_DETAILS_BATCH per chunk
- Merge results across chunks
Known Pitfalls
Quota Management:
- YouTube API has a daily quota limit (default 10,000 units)
- Upload = 1600 units; search = 100 units; list = 1 unit
- Prefer list endpoints over search when possible
- Monitor quota usage to avoid hitting daily limits
ID Formats:
- Video IDs: 11-character alphanumeric strings
- Channel IDs: Start with 'UC' followed by 22 characters
- Playlist IDs: Start with 'PL' (user) or 'UU' (uploads)
- Do not confuse channel IDs with playlist IDs
Thumbnails:
- Custom thumbnails require channel phone verification
- Must be JPG, PNG, or GIF; under 2MB
- Recommended: 1280x720 resolution (16:9 aspect ratio)
Response Parsing:
- Statistics values are returned as strings, not integers; cast before math
- Duration uses ISO 8601 format (PT#H#M#S)
- Batch responses may wrap data under different keys
Quick Reference
| Task |
Tool Slug |
Key Params |
| Upload video |
YOUTUBE_UPLOAD_VIDEO |
title, description, tags, categoryId, privacyStatus, videoFilePath |
| Update video |
YOUTUBE_UPDATE_VIDEO |
video_id, title, description, tags |
| Set thumbnail |
YOUTUBE_UPDATE_THUMBNAIL |
videoId, thumbnailUrl |
| Search YouTube |
YOUTUBE_SEARCH_YOU_TUBE |
q, type, maxResults |
| Video details |
YOUTUBE_VIDEO_DETAILS |
id, part |
| Batch video details |
YOUTUBE_GET_VIDEO_DETAILS_BATCH |
id, parts |
| List playlists |
YOUTUBE_LIST_USER_PLAYLISTS |
maxResults, pageToken |
| Create playlist |
YOUTUBE_CREATE_PLAYLIST |
(check schema) |
| Add to playlist |
YOUTUBE_ADD_VIDEO_TO_PLAYLIST |
(check schema) |
| List playlist items |
YOUTUBE_LIST_PLAYLIST_ITEMS |
playlistId, maxResults |
| Channel statistics |
YOUTUBE_GET_CHANNEL_STATISTICS |
id/forHandle/mine |
| List channel videos |
YOUTUBE_LIST_CHANNEL_VIDEOS |
channelId, maxResults |
| Channel ID by handle |
YOUTUBE_GET_CHANNEL_ID_BY_HANDLE |
channel_handle |
| Subscribe |
YOUTUBE_SUBSCRIBE_CHANNEL |
channelId |
| List subscriptions |
YOUTUBE_LIST_USER_SUBSCRIPTIONS |
(check schema) |
| List comments |
YOUTUBE_LIST_COMMENT_THREADS |
videoId |
| Channel activities |
YOUTUBE_GET_CHANNEL_ACTIVITIES |
(check schema) |
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
1---2name: youtube-automation3description: Automate YouTube tasks via Rube MCP (Composio): upload videos, manage playlists, search content, get analytics, and handle comments. Always search tools first for current schemas.4---5
6# YouTube Automation via Rube MCP
7
8Automate YouTube operations through Composio's YouTube toolkit via Rube MCP.
9
10## Prerequisites
11
12- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
13- Active YouTube connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `youtube`
14- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas
15
16## Setup
17
18**Get Rube MCP**: Add `https://rube.app/mcp` as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
19
20
211. Verify Rube MCP is available by confirming `RUBE_SEARCH_TOOLS` responds
222. Call `RUBE_MANAGE_CONNECTIONS` with toolkit `youtube`
233. If connection is not ACTIVE, follow the returned auth link to complete Google OAuth
244. Confirm connection status shows ACTIVE before running any workflows
25
26## Core Workflows
27
28### 1. Upload and Manage Videos
29
30**When to use**: User wants to upload a video or update video metadata
31
32**Tool sequence**:
331. `YOUTUBE_UPLOAD_VIDEO` - Upload a new video [Required]
342. `YOUTUBE_UPDATE_VIDEO` - Update title, description, tags, privacy [Optional]
353. `YOUTUBE_UPDATE_THUMBNAIL` - Set a custom thumbnail [Optional]
36
37**Key parameters**:
38- `title`: Video title (max 100 characters)
39- `description`: Video description (max 5000 bytes)
40- `tags`: Array of keyword tags
41- `categoryId`: YouTube category ID (e.g., '22' for People & Blogs)
42- `privacyStatus`: 'public', 'private', or 'unlisted'
43- `videoFilePath`: Object with `{name, mimetype, s3key}` for the video file
44
45**Pitfalls**:
46- UPLOAD_VIDEO consumes high quota; prefer UPDATE_VIDEO for metadata-only changes
47- videoFilePath must be an object with s3key, not a raw file path or URL
48- Tags total must not exceed 500 characters including separators
49- Angle brackets `< >` in tags are automatically stripped
50- Description limit is 5000 bytes, not characters (multibyte chars count more)
51
52### 2. Search YouTube Content
53
54**When to use**: User wants to find videos, channels, or playlists
55
56**Tool sequence**:
571. `YOUTUBE_SEARCH_YOU_TUBE` - Search for content [Required]
582. `YOUTUBE_VIDEO_DETAILS` - Get full details for a specific video [Optional]
593. `YOUTUBE_GET_VIDEO_DETAILS_BATCH` - Get details for multiple videos [Optional]
60
61**Key parameters**:
62- `q`: Search query (supports exact phrases, exclusions, channel handles)
63- `type`: 'video', 'channel', or 'playlist'
64- `maxResults`: Results per page (1-50)
65- `pageToken`: For pagination
66
67**Pitfalls**:
68- Search endpoint only returns 'snippet' part; use VIDEO_DETAILS for statistics
69- Search results are capped at 500 total items
70- Search has higher quota cost (100 units) vs list endpoints (1 unit)
71- BATCH video details practical limit is ~50 IDs per call; chunk larger sets
72
73### 3. Manage Playlists
74
75**When to use**: User wants to create playlists or manage playlist contents
76
77**Tool sequence**:
781. `YOUTUBE_LIST_USER_PLAYLISTS` - List user's existing playlists [Optional]
792. `YOUTUBE_CREATE_PLAYLIST` - Create a new playlist [Optional]
803. `YOUTUBE_ADD_VIDEO_TO_PLAYLIST` - Add a video to a playlist [Optional]
814. `YOUTUBE_LIST_PLAYLIST_ITEMS` - List videos in a playlist [Optional]
82
83**Key parameters**:
84- `playlistId`: Playlist ID ('PL...' for user-created, 'UU...' for uploads)
85- `part`: Resource parts to include (e.g., 'snippet,contentDetails')
86- `maxResults`: Items per page (1-50)
87- `pageToken`: Pagination token from previous response
88
89**Pitfalls**:
90- Do NOT pass channel IDs ('UC...') as playlist IDs; convert 'UC' to 'UU' for uploads
91- Large playlists require pagination via pageToken; follow nextPageToken until absent
92- items[].id is not the videoId; use items[].snippet.resourceId.videoId
93- Creating duplicate playlist names is allowed; check existing playlists first
94
95### 4. Get Channel and Video Analytics
96
97**When to use**: User wants to analyze channel performance or video metrics
98
99**Tool sequence**:
1001. `YOUTUBE_GET_CHANNEL_ID_BY_HANDLE` - Resolve a handle to channel ID [Prerequisite]
1012. `YOUTUBE_GET_CHANNEL_STATISTICS` - Get channel subscriber/view/video counts [Required]
1023. `YOUTUBE_LIST_CHANNEL_VIDEOS` - List all videos from a channel [Optional]
1034. `YOUTUBE_GET_VIDEO_DETAILS_BATCH` - Get per-video statistics [Optional]
1045. `YOUTUBE_GET_CHANNEL_ACTIVITIES` - Get recent channel activities [Optional]
105
106**Key parameters**:
107- `channelId`: Channel ID ('UC...'), handle ('@handle'), or 'me'
108- `forHandle`: Channel handle (e.g., '@Google')
109- `id`: Comma-separated video IDs for batch details
110- `parts`: Resource parts to include (e.g., 'snippet,statistics')
111
112**Pitfalls**:
113- Channel statistics are lifetime totals, not per-period
114- BATCH video details may return fewer items than requested for private/deleted videos
115- Response data may be nested under `data` or `data_preview`; parse defensively
116- contentDetails.duration uses ISO 8601 format (e.g., 'PT4M13S')
117
118### 5. Manage Subscriptions and Comments
119
120**When to use**: User wants to subscribe to channels or view video comments
121
122**Tool sequence**:
1231. `YOUTUBE_SUBSCRIBE_CHANNEL` - Subscribe to a channel [Optional]
1242. `YOUTUBE_UNSUBSCRIBE_CHANNEL` - Unsubscribe from a channel [Optional]
1253. `YOUTUBE_LIST_USER_SUBSCRIPTIONS` - List subscriptions [Optional]
1264. `YOUTUBE_LIST_COMMENT_THREADS` - List comments on a video [Optional]
127
128**Key parameters**:
129- `channelId`: Channel to subscribe/unsubscribe
130- `videoId`: Video ID for comment threads
131- `maxResults`: Results per page
132- `pageToken`: Pagination token
133
134**Pitfalls**:
135- Subscribing to an already-subscribed channel may return an error
136- Comment threads return top-level comments with up to 5 replies each
137- Comments may be disabled on some videos
138- Unsubscribe requires the subscription ID, not the channel ID
139
140## Common Patterns
141
142### Channel ID Resolution
143
144**Handle to Channel ID**:
145```
1461. Call YOUTUBE_GET_CHANNEL_ID_BY_HANDLE with '@handle'
1472. Extract channelId from response
1483. Use in subsequent channel operations
149```
150
151**Uploads Playlist**:
152```
1531. Get channel ID (starts with 'UC')
1542. Replace 'UC' prefix with 'UU' to get uploads playlist ID
1553. Use with LIST_PLAYLIST_ITEMS to enumerate all videos
156```
157
158### Pagination
159
160- Set `maxResults` (max 50 per page)
161- Check response for `nextPageToken`
162- Pass token as `pageToken` in next request
163- Continue until `nextPageToken` is absent
164
165### Batch Video Details
166
167- Collect video IDs from search or playlist listings
168- Chunk into groups of ~50 IDs
169- Call GET_VIDEO_DETAILS_BATCH per chunk
170- Merge results across chunks
171
172## Known Pitfalls
173
174**Quota Management**:
175- YouTube API has a daily quota limit (default 10,000 units)
176- Upload = 1600 units; search = 100 units; list = 1 unit
177- Prefer list endpoints over search when possible
178- Monitor quota usage to avoid hitting daily limits
179
180**ID Formats**:
181- Video IDs: 11-character alphanumeric strings
182- Channel IDs: Start with 'UC' followed by 22 characters
183- Playlist IDs: Start with 'PL' (user) or 'UU' (uploads)
184- Do not confuse channel IDs with playlist IDs
185
186**Thumbnails**:
187- Custom thumbnails require channel phone verification
188- Must be JPG, PNG, or GIF; under 2MB
189- Recommended: 1280x720 resolution (16:9 aspect ratio)
190
191**Response Parsing**:
192- Statistics values are returned as strings, not integers; cast before math
193- Duration uses ISO 8601 format (PT#H#M#S)
194- Batch responses may wrap data under different keys
195
196## Quick Reference
197
198| Task | Tool Slug | Key Params |
199|------|-----------|------------|
200| Upload video | YOUTUBE_UPLOAD_VIDEO | title, description, tags, categoryId, privacyStatus, videoFilePath |
201| Update video | YOUTUBE_UPDATE_VIDEO | video_id, title, description, tags |
202| Set thumbnail | YOUTUBE_UPDATE_THUMBNAIL | videoId, thumbnailUrl |
203| Search YouTube | YOUTUBE_SEARCH_YOU_TUBE | q, type, maxResults |
204| Video details | YOUTUBE_VIDEO_DETAILS | id, part |
205| Batch video details | YOUTUBE_GET_VIDEO_DETAILS_BATCH | id, parts |
206| List playlists | YOUTUBE_LIST_USER_PLAYLISTS | maxResults, pageToken |
207| Create playlist | YOUTUBE_CREATE_PLAYLIST | (check schema) |
208| Add to playlist | YOUTUBE_ADD_VIDEO_TO_PLAYLIST | (check schema) |
209| List playlist items | YOUTUBE_LIST_PLAYLIST_ITEMS | playlistId, maxResults |
210| Channel statistics | YOUTUBE_GET_CHANNEL_STATISTICS | id/forHandle/mine |
211| List channel videos | YOUTUBE_LIST_CHANNEL_VIDEOS | channelId, maxResults |
212| Channel ID by handle | YOUTUBE_GET_CHANNEL_ID_BY_HANDLE | channel_handle |
213| Subscribe | YOUTUBE_SUBSCRIBE_CHANNEL | channelId |
214| List subscriptions | YOUTUBE_LIST_USER_SUBSCRIPTIONS | (check schema) |
215| List comments | YOUTUBE_LIST_COMMENT_THREADS | videoId |
216| Channel activities | YOUTUBE_GET_CHANNEL_ACTIVITIES | (check schema) |
217
218## When to Use
219This skill is applicable to execute the workflow or actions described in the overview.
220
221## Limitations
222- Use this skill only when the task clearly matches the scope described above.
223- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
224- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.