Automate Instagram tasks via Rube MCP (Composio): create posts, carousels, manage media, get insights, and publishing limits. Always search tools first for current schemas.
Add this skill
npx mdskills install sickn33/instagram-automationComprehensive Instagram automation with clear workflows, excellent pitfall guidance, and well-structured tool sequences.
1---2name: instagram-automation3description: "Automate Instagram tasks via Rube MCP (Composio): create posts, carousels, manage media, get insights, and publishing limits. Always search tools first for current schemas."4requires:5 mcp: [rube]6---78# Instagram Automation via Rube MCP910Automate Instagram operations through Composio's Instagram toolkit via Rube MCP.1112## Prerequisites1314- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)15- Active Instagram connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `instagram`16- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas17- Instagram Business or Creator account required (personal accounts not supported)1819## 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 `instagram`263. If connection is not ACTIVE, follow the returned auth link to complete Instagram/Facebook OAuth274. Confirm connection status shows ACTIVE before running any workflows2829## Core Workflows3031### 1. Create a Single Image/Video Post3233**When to use**: User wants to publish a single photo or video to Instagram3435**Tool sequence**:361. `INSTAGRAM_GET_USER_INFO` - Get Instagram user ID [Prerequisite]372. `INSTAGRAM_CREATE_MEDIA_CONTAINER` - Create a media container with the image/video URL [Required]383. `INSTAGRAM_GET_POST_STATUS` - Check if the media container is ready [Optional]394. `INSTAGRAM_CREATE_POST` or `INSTAGRAM_POST_IG_USER_MEDIA_PUBLISH` - Publish the container [Required]4041**Key parameters**:42- `image_url`: Public URL of the image to post43- `video_url`: Public URL of the video to post44- `caption`: Post caption text45- `ig_user_id`: Instagram Business account user ID4647**Pitfalls**:48- Media URLs must be publicly accessible; private/authenticated URLs will fail49- Video containers may take time to process; poll GET_POST_STATUS before publishing50- Caption supports hashtags and mentions but has a 2200 character limit51- Publishing a container that is not yet finished processing returns an error5253### 2. Create a Carousel Post5455**When to use**: User wants to publish multiple images/videos in a single carousel post5657**Tool sequence**:581. `INSTAGRAM_CREATE_MEDIA_CONTAINER` - Create individual containers for each media item [Required, repeat per item]592. `INSTAGRAM_CREATE_CAROUSEL_CONTAINER` - Create the carousel container referencing all media containers [Required]603. `INSTAGRAM_GET_POST_STATUS` - Check carousel container readiness [Optional]614. `INSTAGRAM_POST_IG_USER_MEDIA_PUBLISH` - Publish the carousel [Required]6263**Key parameters**:64- `children`: Array of media container IDs for the carousel65- `caption`: Carousel post caption66- `ig_user_id`: Instagram Business account user ID6768**Pitfalls**:69- Carousels require 2-10 media items; fewer or more will fail70- Each child container must be created individually before the carousel container71- All child containers must be fully processed before creating the carousel72- Mixed media (images + videos) is supported in carousels7374### 3. Get Media and Insights7576**When to use**: User wants to view their posts or analyze post performance7778**Tool sequence**:791. `INSTAGRAM_GET_IG_USER_MEDIA` or `INSTAGRAM_GET_USER_MEDIA` - List user's media [Required]802. `INSTAGRAM_GET_IG_MEDIA` - Get details for a specific post [Optional]813. `INSTAGRAM_GET_POST_INSIGHTS` or `INSTAGRAM_GET_IG_MEDIA_INSIGHTS` - Get metrics for a post [Optional]824. `INSTAGRAM_GET_USER_INSIGHTS` - Get account-level insights [Optional]8384**Key parameters**:85- `ig_user_id`: Instagram Business account user ID86- `media_id`: ID of the specific media post87- `metric`: Metrics to retrieve (e.g., impressions, reach, engagement)88- `period`: Time period for insights (e.g., day, week, lifetime)8990**Pitfalls**:91- Insights are only available for Business/Creator accounts92- Some metrics require minimum follower counts93- Insight data may have a delay of up to 48 hours94- The `period` parameter must match the metric type9596### 4. Check Publishing Limits9798**When to use**: User wants to verify they can publish before attempting a post99100**Tool sequence**:1011. `INSTAGRAM_GET_IG_USER_CONTENT_PUBLISHING_LIMIT` - Check remaining publishing quota [Required]102103**Key parameters**:104- `ig_user_id`: Instagram Business account user ID105106**Pitfalls**:107- Instagram enforces a 25 posts per 24-hour rolling window limit108- Publishing limit resets on a rolling basis, not at midnight109- Check limits before bulk posting operations to avoid failures110111### 5. Get Media Comments and Children112113**When to use**: User wants to view comments on a post or children of a carousel114115**Tool sequence**:1161. `INSTAGRAM_GET_IG_MEDIA_COMMENTS` - List comments on a media post [Required]1172. `INSTAGRAM_GET_IG_MEDIA_CHILDREN` - List children of a carousel post [Optional]118119**Key parameters**:120- `media_id`: ID of the media post121- `ig_media_id`: Alternative media ID parameter122123**Pitfalls**:124- Comments may be paginated; follow pagination cursors for complete results125- Carousel children are returned as individual media objects126- Comment moderation settings on the account affect what is returned127128## Common Patterns129130### ID Resolution131132**Instagram User ID**:133```1341. Call INSTAGRAM_GET_USER_INFO1352. Extract ig_user_id from response1363. Use in all subsequent API calls137```138139**Media Container Status Check**:140```1411. Call INSTAGRAM_CREATE_MEDIA_CONTAINER1422. Extract container_id from response1433. Poll INSTAGRAM_GET_POST_STATUS with container_id1444. Wait until status is 'FINISHED' before publishing145```146147### Two-Phase Publishing148149- Phase 1: Create media container(s) with content URLs150- Phase 2: Publish the container after it finishes processing151- Always check container status between phases for video content152- For carousels, all children must complete Phase 1 before creating the carousel container153154## Known Pitfalls155156**Media URLs**:157- All image/video URLs must be publicly accessible HTTPS URLs158- URLs behind authentication, CDN restrictions, or that require cookies will fail159- Temporary URLs (pre-signed S3, etc.) may expire before processing completes160161**Rate Limits**:162- 25 posts per 24-hour rolling window163- API rate limits apply separately from publishing limits164- Implement exponential backoff for 429 responses165166**Account Requirements**:167- Only Business or Creator Instagram accounts are supported168- Personal accounts cannot use the Instagram Graph API169- The account must be connected to a Facebook Page170171**Response Parsing**:172- Media IDs are numeric strings173- Insights data may be nested under different response keys174- Pagination uses cursor-based tokens175176## Quick Reference177178| Task | Tool Slug | Key Params |179|------|-----------|------------|180| Get user info | INSTAGRAM_GET_USER_INFO | (none) |181| Create media container | INSTAGRAM_CREATE_MEDIA_CONTAINER | image_url/video_url, caption |182| Create carousel | INSTAGRAM_CREATE_CAROUSEL_CONTAINER | children, caption |183| Publish post | INSTAGRAM_CREATE_POST | ig_user_id, creation_id |184| Publish media | INSTAGRAM_POST_IG_USER_MEDIA_PUBLISH | ig_user_id, creation_id |185| Check post status | INSTAGRAM_GET_POST_STATUS | ig_container_id |186| List user media | INSTAGRAM_GET_IG_USER_MEDIA | ig_user_id |187| Get media details | INSTAGRAM_GET_IG_MEDIA | ig_media_id |188| Get post insights | INSTAGRAM_GET_POST_INSIGHTS | media_id, metric |189| Get user insights | INSTAGRAM_GET_USER_INSIGHTS | ig_user_id, metric, period |190| Get publishing limit | INSTAGRAM_GET_IG_USER_CONTENT_PUBLISHING_LIMIT | ig_user_id |191| Get media comments | INSTAGRAM_GET_IG_MEDIA_COMMENTS | ig_media_id |192| Get carousel children | INSTAGRAM_GET_IG_MEDIA_CHILDREN | ig_media_id |193
Full transparency — inspect the skill content before installing.