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.
Add this skill
npx mdskills install sickn33/youtube-automationComprehensive YouTube automation with clear workflows, detailed pitfalls, and quota management guidance
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."4requires:5 mcp: [rube]6---78# YouTube Automation via Rube MCP910Automate YouTube operations through Composio's YouTube toolkit via Rube MCP.1112## Prerequisites1314- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)15- Active YouTube connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `youtube`16- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas1718## Setup1920**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.2122231. Verify Rube MCP is available by confirming `RUBE_SEARCH_TOOLS` responds242. Call `RUBE_MANAGE_CONNECTIONS` with toolkit `youtube`253. If connection is not ACTIVE, follow the returned auth link to complete Google OAuth264. Confirm connection status shows ACTIVE before running any workflows2728## Core Workflows2930### 1. Upload and Manage Videos3132**When to use**: User wants to upload a video or update video metadata3334**Tool sequence**:351. `YOUTUBE_UPLOAD_VIDEO` - Upload a new video [Required]362. `YOUTUBE_UPDATE_VIDEO` - Update title, description, tags, privacy [Optional]373. `YOUTUBE_UPDATE_THUMBNAIL` - Set a custom thumbnail [Optional]3839**Key parameters**:40- `title`: Video title (max 100 characters)41- `description`: Video description (max 5000 bytes)42- `tags`: Array of keyword tags43- `categoryId`: YouTube category ID (e.g., '22' for People & Blogs)44- `privacyStatus`: 'public', 'private', or 'unlisted'45- `videoFilePath`: Object with `{name, mimetype, s3key}` for the video file4647**Pitfalls**:48- UPLOAD_VIDEO consumes high quota; prefer UPDATE_VIDEO for metadata-only changes49- videoFilePath must be an object with s3key, not a raw file path or URL50- Tags total must not exceed 500 characters including separators51- Angle brackets `< >` in tags are automatically stripped52- Description limit is 5000 bytes, not characters (multibyte chars count more)5354### 2. Search YouTube Content5556**When to use**: User wants to find videos, channels, or playlists5758**Tool sequence**:591. `YOUTUBE_SEARCH_YOU_TUBE` - Search for content [Required]602. `YOUTUBE_VIDEO_DETAILS` - Get full details for a specific video [Optional]613. `YOUTUBE_GET_VIDEO_DETAILS_BATCH` - Get details for multiple videos [Optional]6263**Key parameters**:64- `q`: Search query (supports exact phrases, exclusions, channel handles)65- `type`: 'video', 'channel', or 'playlist'66- `maxResults`: Results per page (1-50)67- `pageToken`: For pagination6869**Pitfalls**:70- Search endpoint only returns 'snippet' part; use VIDEO_DETAILS for statistics71- Search results are capped at 500 total items72- Search has higher quota cost (100 units) vs list endpoints (1 unit)73- BATCH video details practical limit is ~50 IDs per call; chunk larger sets7475### 3. Manage Playlists7677**When to use**: User wants to create playlists or manage playlist contents7879**Tool sequence**:801. `YOUTUBE_LIST_USER_PLAYLISTS` - List user's existing playlists [Optional]812. `YOUTUBE_CREATE_PLAYLIST` - Create a new playlist [Optional]823. `YOUTUBE_ADD_VIDEO_TO_PLAYLIST` - Add a video to a playlist [Optional]834. `YOUTUBE_LIST_PLAYLIST_ITEMS` - List videos in a playlist [Optional]8485**Key parameters**:86- `playlistId`: Playlist ID ('PL...' for user-created, 'UU...' for uploads)87- `part`: Resource parts to include (e.g., 'snippet,contentDetails')88- `maxResults`: Items per page (1-50)89- `pageToken`: Pagination token from previous response9091**Pitfalls**:92- Do NOT pass channel IDs ('UC...') as playlist IDs; convert 'UC' to 'UU' for uploads93- Large playlists require pagination via pageToken; follow nextPageToken until absent94- items[].id is not the videoId; use items[].snippet.resourceId.videoId95- Creating duplicate playlist names is allowed; check existing playlists first9697### 4. Get Channel and Video Analytics9899**When to use**: User wants to analyze channel performance or video metrics100101**Tool sequence**:1021. `YOUTUBE_GET_CHANNEL_ID_BY_HANDLE` - Resolve a handle to channel ID [Prerequisite]1032. `YOUTUBE_GET_CHANNEL_STATISTICS` - Get channel subscriber/view/video counts [Required]1043. `YOUTUBE_LIST_CHANNEL_VIDEOS` - List all videos from a channel [Optional]1054. `YOUTUBE_GET_VIDEO_DETAILS_BATCH` - Get per-video statistics [Optional]1065. `YOUTUBE_GET_CHANNEL_ACTIVITIES` - Get recent channel activities [Optional]107108**Key parameters**:109- `channelId`: Channel ID ('UC...'), handle ('@handle'), or 'me'110- `forHandle`: Channel handle (e.g., '@Google')111- `id`: Comma-separated video IDs for batch details112- `parts`: Resource parts to include (e.g., 'snippet,statistics')113114**Pitfalls**:115- Channel statistics are lifetime totals, not per-period116- BATCH video details may return fewer items than requested for private/deleted videos117- Response data may be nested under `data` or `data_preview`; parse defensively118- contentDetails.duration uses ISO 8601 format (e.g., 'PT4M13S')119120### 5. Manage Subscriptions and Comments121122**When to use**: User wants to subscribe to channels or view video comments123124**Tool sequence**:1251. `YOUTUBE_SUBSCRIBE_CHANNEL` - Subscribe to a channel [Optional]1262. `YOUTUBE_UNSUBSCRIBE_CHANNEL` - Unsubscribe from a channel [Optional]1273. `YOUTUBE_LIST_USER_SUBSCRIPTIONS` - List subscriptions [Optional]1284. `YOUTUBE_LIST_COMMENT_THREADS` - List comments on a video [Optional]129130**Key parameters**:131- `channelId`: Channel to subscribe/unsubscribe132- `videoId`: Video ID for comment threads133- `maxResults`: Results per page134- `pageToken`: Pagination token135136**Pitfalls**:137- Subscribing to an already-subscribed channel may return an error138- Comment threads return top-level comments with up to 5 replies each139- Comments may be disabled on some videos140- Unsubscribe requires the subscription ID, not the channel ID141142## Common Patterns143144### Channel ID Resolution145146**Handle to Channel ID**:147```1481. Call YOUTUBE_GET_CHANNEL_ID_BY_HANDLE with '@handle'1492. Extract channelId from response1503. Use in subsequent channel operations151```152153**Uploads Playlist**:154```1551. Get channel ID (starts with 'UC')1562. Replace 'UC' prefix with 'UU' to get uploads playlist ID1573. Use with LIST_PLAYLIST_ITEMS to enumerate all videos158```159160### Pagination161162- Set `maxResults` (max 50 per page)163- Check response for `nextPageToken`164- Pass token as `pageToken` in next request165- Continue until `nextPageToken` is absent166167### Batch Video Details168169- Collect video IDs from search or playlist listings170- Chunk into groups of ~50 IDs171- Call GET_VIDEO_DETAILS_BATCH per chunk172- Merge results across chunks173174## Known Pitfalls175176**Quota Management**:177- YouTube API has a daily quota limit (default 10,000 units)178- Upload = 1600 units; search = 100 units; list = 1 unit179- Prefer list endpoints over search when possible180- Monitor quota usage to avoid hitting daily limits181182**ID Formats**:183- Video IDs: 11-character alphanumeric strings184- Channel IDs: Start with 'UC' followed by 22 characters185- Playlist IDs: Start with 'PL' (user) or 'UU' (uploads)186- Do not confuse channel IDs with playlist IDs187188**Thumbnails**:189- Custom thumbnails require channel phone verification190- Must be JPG, PNG, or GIF; under 2MB191- Recommended: 1280x720 resolution (16:9 aspect ratio)192193**Response Parsing**:194- Statistics values are returned as strings, not integers; cast before math195- Duration uses ISO 8601 format (PT#H#M#S)196- Batch responses may wrap data under different keys197198## Quick Reference199200| Task | Tool Slug | Key Params |201|------|-----------|------------|202| Upload video | YOUTUBE_UPLOAD_VIDEO | title, description, tags, categoryId, privacyStatus, videoFilePath |203| Update video | YOUTUBE_UPDATE_VIDEO | video_id, title, description, tags |204| Set thumbnail | YOUTUBE_UPDATE_THUMBNAIL | videoId, thumbnailUrl |205| Search YouTube | YOUTUBE_SEARCH_YOU_TUBE | q, type, maxResults |206| Video details | YOUTUBE_VIDEO_DETAILS | id, part |207| Batch video details | YOUTUBE_GET_VIDEO_DETAILS_BATCH | id, parts |208| List playlists | YOUTUBE_LIST_USER_PLAYLISTS | maxResults, pageToken |209| Create playlist | YOUTUBE_CREATE_PLAYLIST | (check schema) |210| Add to playlist | YOUTUBE_ADD_VIDEO_TO_PLAYLIST | (check schema) |211| List playlist items | YOUTUBE_LIST_PLAYLIST_ITEMS | playlistId, maxResults |212| Channel statistics | YOUTUBE_GET_CHANNEL_STATISTICS | id/forHandle/mine |213| List channel videos | YOUTUBE_LIST_CHANNEL_VIDEOS | channelId, maxResults |214| Channel ID by handle | YOUTUBE_GET_CHANNEL_ID_BY_HANDLE | channel_handle |215| Subscribe | YOUTUBE_SUBSCRIBE_CHANNEL | channelId |216| List subscriptions | YOUTUBE_LIST_USER_SUBSCRIPTIONS | (check schema) |217| List comments | YOUTUBE_LIST_COMMENT_THREADS | videoId |218| Channel activities | YOUTUBE_GET_CHANNEL_ACTIVITIES | (check schema) |219
Full transparency — inspect the skill content before installing.