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.
AGI Framework Integration
Adapted for @techwavedev/agi-agent-kit
Original source: antigravity-awesome-skills
Memory-First Protocol
Cache workflow configurations and automation patterns. Retrieve prior pipeline designs to avoid re-building similar flows from scratch.
# Check for prior workflow/automation context before starting
python3 execution/memory_manager.py auto --query "automation patterns and workflow configurations for Youtube Automation"
Storing Results
After completing work, store workflow/automation decisions for future sessions:
python3 execution/memory_manager.py store \
--content "Workflow: automated data pipeline with retry logic, dead-letter queue, and Slack alerts on failure" \
--type technical --project <project> \
--tags youtube-automation workflow
Multi-Agent Collaboration
Share workflow state with other agents so they can trigger, monitor, or extend the automation.
python3 execution/cross_agent_context.py store \
--agent "<your-agent>" \
--action "Workflow automation deployed — pipeline processing 1000+ events/day with 99.9% success rate" \
--project <project>
Playbook Engine
Combine this skill with others using the Playbook Engine (execution/workflow_engine.py) for guided multi-step automation with progress tracking.
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."4risk: unknown5source: community6date_added: "2026-02-27"7---89# YouTube Automation via Rube MCP1011Automate YouTube operations through Composio's YouTube toolkit via Rube MCP.1213## Prerequisites1415- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)16- Active YouTube connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `youtube`17- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas1819## Setup2021**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.2223241. Verify Rube MCP is available by confirming `RUBE_SEARCH_TOOLS` responds252. Call `RUBE_MANAGE_CONNECTIONS` with toolkit `youtube`263. If connection is not ACTIVE, follow the returned auth link to complete Google OAuth274. Confirm connection status shows ACTIVE before running any workflows2829## Core Workflows3031### 1. Upload and Manage Videos3233**When to use**: User wants to upload a video or update video metadata3435**Tool sequence**:361. `YOUTUBE_UPLOAD_VIDEO` - Upload a new video [Required]372. `YOUTUBE_UPDATE_VIDEO` - Update title, description, tags, privacy [Optional]383. `YOUTUBE_UPDATE_THUMBNAIL` - Set a custom thumbnail [Optional]3940**Key parameters**:41- `title`: Video title (max 100 characters)42- `description`: Video description (max 5000 bytes)43- `tags`: Array of keyword tags44- `categoryId`: YouTube category ID (e.g., '22' for People & Blogs)45- `privacyStatus`: 'public', 'private', or 'unlisted'46- `videoFilePath`: Object with `{name, mimetype, s3key}` for the video file4748**Pitfalls**:49- UPLOAD_VIDEO consumes high quota; prefer UPDATE_VIDEO for metadata-only changes50- videoFilePath must be an object with s3key, not a raw file path or URL51- Tags total must not exceed 500 characters including separators52- Angle brackets `< >` in tags are automatically stripped53- Description limit is 5000 bytes, not characters (multibyte chars count more)5455### 2. Search YouTube Content5657**When to use**: User wants to find videos, channels, or playlists5859**Tool sequence**:601. `YOUTUBE_SEARCH_YOU_TUBE` - Search for content [Required]612. `YOUTUBE_VIDEO_DETAILS` - Get full details for a specific video [Optional]623. `YOUTUBE_GET_VIDEO_DETAILS_BATCH` - Get details for multiple videos [Optional]6364**Key parameters**:65- `q`: Search query (supports exact phrases, exclusions, channel handles)66- `type`: 'video', 'channel', or 'playlist'67- `maxResults`: Results per page (1-50)68- `pageToken`: For pagination6970**Pitfalls**:71- Search endpoint only returns 'snippet' part; use VIDEO_DETAILS for statistics72- Search results are capped at 500 total items73- Search has higher quota cost (100 units) vs list endpoints (1 unit)74- BATCH video details practical limit is ~50 IDs per call; chunk larger sets7576### 3. Manage Playlists7778**When to use**: User wants to create playlists or manage playlist contents7980**Tool sequence**:811. `YOUTUBE_LIST_USER_PLAYLISTS` - List user's existing playlists [Optional]822. `YOUTUBE_CREATE_PLAYLIST` - Create a new playlist [Optional]833. `YOUTUBE_ADD_VIDEO_TO_PLAYLIST` - Add a video to a playlist [Optional]844. `YOUTUBE_LIST_PLAYLIST_ITEMS` - List videos in a playlist [Optional]8586**Key parameters**:87- `playlistId`: Playlist ID ('PL...' for user-created, 'UU...' for uploads)88- `part`: Resource parts to include (e.g., 'snippet,contentDetails')89- `maxResults`: Items per page (1-50)90- `pageToken`: Pagination token from previous response9192**Pitfalls**:93- Do NOT pass channel IDs ('UC...') as playlist IDs; convert 'UC' to 'UU' for uploads94- Large playlists require pagination via pageToken; follow nextPageToken until absent95- items[].id is not the videoId; use items[].snippet.resourceId.videoId96- Creating duplicate playlist names is allowed; check existing playlists first9798### 4. Get Channel and Video Analytics99100**When to use**: User wants to analyze channel performance or video metrics101102**Tool sequence**:1031. `YOUTUBE_GET_CHANNEL_ID_BY_HANDLE` - Resolve a handle to channel ID [Prerequisite]1042. `YOUTUBE_GET_CHANNEL_STATISTICS` - Get channel subscriber/view/video counts [Required]1053. `YOUTUBE_LIST_CHANNEL_VIDEOS` - List all videos from a channel [Optional]1064. `YOUTUBE_GET_VIDEO_DETAILS_BATCH` - Get per-video statistics [Optional]1075. `YOUTUBE_GET_CHANNEL_ACTIVITIES` - Get recent channel activities [Optional]108109**Key parameters**:110- `channelId`: Channel ID ('UC...'), handle ('@handle'), or 'me'111- `forHandle`: Channel handle (e.g., '@Google')112- `id`: Comma-separated video IDs for batch details113- `parts`: Resource parts to include (e.g., 'snippet,statistics')114115**Pitfalls**:116- Channel statistics are lifetime totals, not per-period117- BATCH video details may return fewer items than requested for private/deleted videos118- Response data may be nested under `data` or `data_preview`; parse defensively119- contentDetails.duration uses ISO 8601 format (e.g., 'PT4M13S')120121### 5. Manage Subscriptions and Comments122123**When to use**: User wants to subscribe to channels or view video comments124125**Tool sequence**:1261. `YOUTUBE_SUBSCRIBE_CHANNEL` - Subscribe to a channel [Optional]1272. `YOUTUBE_UNSUBSCRIBE_CHANNEL` - Unsubscribe from a channel [Optional]1283. `YOUTUBE_LIST_USER_SUBSCRIPTIONS` - List subscriptions [Optional]1294. `YOUTUBE_LIST_COMMENT_THREADS` - List comments on a video [Optional]130131**Key parameters**:132- `channelId`: Channel to subscribe/unsubscribe133- `videoId`: Video ID for comment threads134- `maxResults`: Results per page135- `pageToken`: Pagination token136137**Pitfalls**:138- Subscribing to an already-subscribed channel may return an error139- Comment threads return top-level comments with up to 5 replies each140- Comments may be disabled on some videos141- Unsubscribe requires the subscription ID, not the channel ID142143## Common Patterns144145### Channel ID Resolution146147**Handle to Channel ID**:148```1491. Call YOUTUBE_GET_CHANNEL_ID_BY_HANDLE with '@handle'1502. Extract channelId from response1513. Use in subsequent channel operations152```153154**Uploads Playlist**:155```1561. Get channel ID (starts with 'UC')1572. Replace 'UC' prefix with 'UU' to get uploads playlist ID1583. Use with LIST_PLAYLIST_ITEMS to enumerate all videos159```160161### Pagination162163- Set `maxResults` (max 50 per page)164- Check response for `nextPageToken`165- Pass token as `pageToken` in next request166- Continue until `nextPageToken` is absent167168### Batch Video Details169170- Collect video IDs from search or playlist listings171- Chunk into groups of ~50 IDs172- Call GET_VIDEO_DETAILS_BATCH per chunk173- Merge results across chunks174175## Known Pitfalls176177**Quota Management**:178- YouTube API has a daily quota limit (default 10,000 units)179- Upload = 1600 units; search = 100 units; list = 1 unit180- Prefer list endpoints over search when possible181- Monitor quota usage to avoid hitting daily limits182183**ID Formats**:184- Video IDs: 11-character alphanumeric strings185- Channel IDs: Start with 'UC' followed by 22 characters186- Playlist IDs: Start with 'PL' (user) or 'UU' (uploads)187- Do not confuse channel IDs with playlist IDs188189**Thumbnails**:190- Custom thumbnails require channel phone verification191- Must be JPG, PNG, or GIF; under 2MB192- Recommended: 1280x720 resolution (16:9 aspect ratio)193194**Response Parsing**:195- Statistics values are returned as strings, not integers; cast before math196- Duration uses ISO 8601 format (PT#H#M#S)197- Batch responses may wrap data under different keys198199## Quick Reference200201| Task | Tool Slug | Key Params |202|------|-----------|------------|203| Upload video | YOUTUBE_UPLOAD_VIDEO | title, description, tags, categoryId, privacyStatus, videoFilePath |204| Update video | YOUTUBE_UPDATE_VIDEO | video_id, title, description, tags |205| Set thumbnail | YOUTUBE_UPDATE_THUMBNAIL | videoId, thumbnailUrl |206| Search YouTube | YOUTUBE_SEARCH_YOU_TUBE | q, type, maxResults |207| Video details | YOUTUBE_VIDEO_DETAILS | id, part |208| Batch video details | YOUTUBE_GET_VIDEO_DETAILS_BATCH | id, parts |209| List playlists | YOUTUBE_LIST_USER_PLAYLISTS | maxResults, pageToken |210| Create playlist | YOUTUBE_CREATE_PLAYLIST | (check schema) |211| Add to playlist | YOUTUBE_ADD_VIDEO_TO_PLAYLIST | (check schema) |212| List playlist items | YOUTUBE_LIST_PLAYLIST_ITEMS | playlistId, maxResults |213| Channel statistics | YOUTUBE_GET_CHANNEL_STATISTICS | id/forHandle/mine |214| List channel videos | YOUTUBE_LIST_CHANNEL_VIDEOS | channelId, maxResults |215| Channel ID by handle | YOUTUBE_GET_CHANNEL_ID_BY_HANDLE | channel_handle |216| Subscribe | YOUTUBE_SUBSCRIBE_CHANNEL | channelId |217| List subscriptions | YOUTUBE_LIST_USER_SUBSCRIPTIONS | (check schema) |218| List comments | YOUTUBE_LIST_COMMENT_THREADS | videoId |219| Channel activities | YOUTUBE_GET_CHANNEL_ACTIVITIES | (check schema) |220221## When to Use222This skill is applicable to execute the workflow or actions described in the overview.223224---225226<!-- AGI-INTEGRATION-START -->227228## AGI Framework Integration229230> **Adapted for [@techwavedev/agi-agent-kit](https://www.npmjs.com/package/@techwavedev/agi-agent-kit)**231> Original source: [antigravity-awesome-skills](https://github.com/sickn33/antigravity-awesome-skills)232233### Memory-First Protocol234235Cache workflow configurations and automation patterns. Retrieve prior pipeline designs to avoid re-building similar flows from scratch.236237```bash238# Check for prior workflow/automation context before starting239python3 execution/memory_manager.py auto --query "automation patterns and workflow configurations for Youtube Automation"240```241242### Storing Results243244After completing work, store workflow/automation decisions for future sessions:245246```bash247python3 execution/memory_manager.py store \248 --content "Workflow: automated data pipeline with retry logic, dead-letter queue, and Slack alerts on failure" \249 --type technical --project <project> \250 --tags youtube-automation workflow251```252253### Multi-Agent Collaboration254255Share workflow state with other agents so they can trigger, monitor, or extend the automation.256257```bash258python3 execution/cross_agent_context.py store \259 --agent "<your-agent>" \260 --action "Workflow automation deployed — pipeline processing 1000+ events/day with 99.9% success rate" \261 --project <project>262```263264### Playbook Engine265266Combine this skill with others using the Playbook Engine (`execution/workflow_engine.py`) for guided multi-step automation with progress tracking.267268<!-- AGI-INTEGRATION-END -->