Instagram Automation via Rube MCP
Automate Instagram operations through Composio's Instagram toolkit via Rube MCP.
Prerequisites
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- Active Instagram connection via
RUBE_MANAGE_CONNECTIONS with toolkit instagram
- Always call
RUBE_SEARCH_TOOLS first to get current tool schemas
- Instagram Business or Creator account required (personal accounts not supported)
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 instagram
- If connection is not ACTIVE, follow the returned auth link to complete Instagram/Facebook OAuth
- Confirm connection status shows ACTIVE before running any workflows
Core Workflows
1. Create a Single Image/Video Post
When to use: User wants to publish a single photo or video to Instagram
Tool sequence:
INSTAGRAM_GET_USER_INFO - Get Instagram user ID [Prerequisite]
INSTAGRAM_CREATE_MEDIA_CONTAINER - Create a media container with the image/video URL [Required]
INSTAGRAM_GET_POST_STATUS - Check if the media container is ready [Optional]
INSTAGRAM_CREATE_POST or INSTAGRAM_POST_IG_USER_MEDIA_PUBLISH - Publish the container [Required]
Key parameters:
image_url: Public URL of the image to post
video_url: Public URL of the video to post
caption: Post caption text
ig_user_id: Instagram Business account user ID
Pitfalls:
- Media URLs must be publicly accessible; private/authenticated URLs will fail
- Video containers may take time to process; poll GET_POST_STATUS before publishing
- Caption supports hashtags and mentions but has a 2200 character limit
- Publishing a container that is not yet finished processing returns an error
2. Create a Carousel Post
When to use: User wants to publish multiple images/videos in a single carousel post
Tool sequence:
INSTAGRAM_CREATE_MEDIA_CONTAINER - Create individual containers for each media item [Required, repeat per item]
INSTAGRAM_CREATE_CAROUSEL_CONTAINER - Create the carousel container referencing all media containers [Required]
INSTAGRAM_GET_POST_STATUS - Check carousel container readiness [Optional]
INSTAGRAM_POST_IG_USER_MEDIA_PUBLISH - Publish the carousel [Required]
Key parameters:
children: Array of media container IDs for the carousel
caption: Carousel post caption
ig_user_id: Instagram Business account user ID
Pitfalls:
- Carousels require 2-10 media items; fewer or more will fail
- Each child container must be created individually before the carousel container
- All child containers must be fully processed before creating the carousel
- Mixed media (images + videos) is supported in carousels
3. Get Media and Insights
When to use: User wants to view their posts or analyze post performance
Tool sequence:
INSTAGRAM_GET_IG_USER_MEDIA or INSTAGRAM_GET_USER_MEDIA - List user's media [Required]
INSTAGRAM_GET_IG_MEDIA - Get details for a specific post [Optional]
INSTAGRAM_GET_POST_INSIGHTS or INSTAGRAM_GET_IG_MEDIA_INSIGHTS - Get metrics for a post [Optional]
INSTAGRAM_GET_USER_INSIGHTS - Get account-level insights [Optional]
Key parameters:
ig_user_id: Instagram Business account user ID
media_id: ID of the specific media post
metric: Metrics to retrieve (e.g., impressions, reach, engagement)
period: Time period for insights (e.g., day, week, lifetime)
Pitfalls:
- Insights are only available for Business/Creator accounts
- Some metrics require minimum follower counts
- Insight data may have a delay of up to 48 hours
- The
period parameter must match the metric type
4. Check Publishing Limits
When to use: User wants to verify they can publish before attempting a post
Tool sequence:
INSTAGRAM_GET_IG_USER_CONTENT_PUBLISHING_LIMIT - Check remaining publishing quota [Required]
Key parameters:
ig_user_id: Instagram Business account user ID
Pitfalls:
- Instagram enforces a 25 posts per 24-hour rolling window limit
- Publishing limit resets on a rolling basis, not at midnight
- Check limits before bulk posting operations to avoid failures
5. Get Media Comments and Children
When to use: User wants to view comments on a post or children of a carousel
Tool sequence:
INSTAGRAM_GET_IG_MEDIA_COMMENTS - List comments on a media post [Required]
INSTAGRAM_GET_IG_MEDIA_CHILDREN - List children of a carousel post [Optional]
Key parameters:
media_id: ID of the media post
ig_media_id: Alternative media ID parameter
Pitfalls:
- Comments may be paginated; follow pagination cursors for complete results
- Carousel children are returned as individual media objects
- Comment moderation settings on the account affect what is returned
Common Patterns
ID Resolution
Instagram User ID:
1. Call INSTAGRAM_GET_USER_INFO
2. Extract ig_user_id from response
3. Use in all subsequent API calls
Media Container Status Check:
1. Call INSTAGRAM_CREATE_MEDIA_CONTAINER
2. Extract container_id from response
3. Poll INSTAGRAM_GET_POST_STATUS with container_id
4. Wait until status is 'FINISHED' before publishing
Two-Phase Publishing
- Phase 1: Create media container(s) with content URLs
- Phase 2: Publish the container after it finishes processing
- Always check container status between phases for video content
- For carousels, all children must complete Phase 1 before creating the carousel container
Known Pitfalls
Media URLs:
- All image/video URLs must be publicly accessible HTTPS URLs
- URLs behind authentication, CDN restrictions, or that require cookies will fail
- Temporary URLs (pre-signed S3, etc.) may expire before processing completes
Rate Limits:
- 25 posts per 24-hour rolling window
- API rate limits apply separately from publishing limits
- Implement exponential backoff for 429 responses
Account Requirements:
- Only Business or Creator Instagram accounts are supported
- Personal accounts cannot use the Instagram Graph API
- The account must be connected to a Facebook Page
Response Parsing:
- Media IDs are numeric strings
- Insights data may be nested under different response keys
- Pagination uses cursor-based tokens
Quick Reference
| Task |
Tool Slug |
Key Params |
| Get user info |
INSTAGRAM_GET_USER_INFO |
(none) |
| Create media container |
INSTAGRAM_CREATE_MEDIA_CONTAINER |
image_url/video_url, caption |
| Create carousel |
INSTAGRAM_CREATE_CAROUSEL_CONTAINER |
children, caption |
| Publish post |
INSTAGRAM_CREATE_POST |
ig_user_id, creation_id |
| Publish media |
INSTAGRAM_POST_IG_USER_MEDIA_PUBLISH |
ig_user_id, creation_id |
| Check post status |
INSTAGRAM_GET_POST_STATUS |
ig_container_id |
| List user media |
INSTAGRAM_GET_IG_USER_MEDIA |
ig_user_id |
| Get media details |
INSTAGRAM_GET_IG_MEDIA |
ig_media_id |
| Get post insights |
INSTAGRAM_GET_POST_INSIGHTS |
media_id, metric |
| Get user insights |
INSTAGRAM_GET_USER_INSIGHTS |
ig_user_id, metric, period |
| Get publishing limit |
INSTAGRAM_GET_IG_USER_CONTENT_PUBLISHING_LIMIT |
ig_user_id |
| Get media comments |
INSTAGRAM_GET_IG_MEDIA_COMMENTS |
ig_media_id |
| Get carousel children |
INSTAGRAM_GET_IG_MEDIA_CHILDREN |
ig_media_id |
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: 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.4---5
6# Instagram Automation via Rube MCP
7
8Automate Instagram operations through Composio's Instagram toolkit via Rube MCP.
9
10## Prerequisites
11
12- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
13- Active Instagram connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `instagram`
14- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas
15- Instagram Business or Creator account required (personal accounts not supported)
16
17## Setup
18
19**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.
20
21
221. Verify Rube MCP is available by confirming `RUBE_SEARCH_TOOLS` responds
232. Call `RUBE_MANAGE_CONNECTIONS` with toolkit `instagram`
243. If connection is not ACTIVE, follow the returned auth link to complete Instagram/Facebook OAuth
254. Confirm connection status shows ACTIVE before running any workflows
26
27## Core Workflows
28
29### 1. Create a Single Image/Video Post
30
31**When to use**: User wants to publish a single photo or video to Instagram
32
33**Tool sequence**:
341. `INSTAGRAM_GET_USER_INFO` - Get Instagram user ID [Prerequisite]
352. `INSTAGRAM_CREATE_MEDIA_CONTAINER` - Create a media container with the image/video URL [Required]
363. `INSTAGRAM_GET_POST_STATUS` - Check if the media container is ready [Optional]
374. `INSTAGRAM_CREATE_POST` or `INSTAGRAM_POST_IG_USER_MEDIA_PUBLISH` - Publish the container [Required]
38
39**Key parameters**:
40- `image_url`: Public URL of the image to post
41- `video_url`: Public URL of the video to post
42- `caption`: Post caption text
43- `ig_user_id`: Instagram Business account user ID
44
45**Pitfalls**:
46- Media URLs must be publicly accessible; private/authenticated URLs will fail
47- Video containers may take time to process; poll GET_POST_STATUS before publishing
48- Caption supports hashtags and mentions but has a 2200 character limit
49- Publishing a container that is not yet finished processing returns an error
50
51### 2. Create a Carousel Post
52
53**When to use**: User wants to publish multiple images/videos in a single carousel post
54
55**Tool sequence**:
561. `INSTAGRAM_CREATE_MEDIA_CONTAINER` - Create individual containers for each media item [Required, repeat per item]
572. `INSTAGRAM_CREATE_CAROUSEL_CONTAINER` - Create the carousel container referencing all media containers [Required]
583. `INSTAGRAM_GET_POST_STATUS` - Check carousel container readiness [Optional]
594. `INSTAGRAM_POST_IG_USER_MEDIA_PUBLISH` - Publish the carousel [Required]
60
61**Key parameters**:
62- `children`: Array of media container IDs for the carousel
63- `caption`: Carousel post caption
64- `ig_user_id`: Instagram Business account user ID
65
66**Pitfalls**:
67- Carousels require 2-10 media items; fewer or more will fail
68- Each child container must be created individually before the carousel container
69- All child containers must be fully processed before creating the carousel
70- Mixed media (images + videos) is supported in carousels
71
72### 3. Get Media and Insights
73
74**When to use**: User wants to view their posts or analyze post performance
75
76**Tool sequence**:
771. `INSTAGRAM_GET_IG_USER_MEDIA` or `INSTAGRAM_GET_USER_MEDIA` - List user's media [Required]
782. `INSTAGRAM_GET_IG_MEDIA` - Get details for a specific post [Optional]
793. `INSTAGRAM_GET_POST_INSIGHTS` or `INSTAGRAM_GET_IG_MEDIA_INSIGHTS` - Get metrics for a post [Optional]
804. `INSTAGRAM_GET_USER_INSIGHTS` - Get account-level insights [Optional]
81
82**Key parameters**:
83- `ig_user_id`: Instagram Business account user ID
84- `media_id`: ID of the specific media post
85- `metric`: Metrics to retrieve (e.g., impressions, reach, engagement)
86- `period`: Time period for insights (e.g., day, week, lifetime)
87
88**Pitfalls**:
89- Insights are only available for Business/Creator accounts
90- Some metrics require minimum follower counts
91- Insight data may have a delay of up to 48 hours
92- The `period` parameter must match the metric type
93
94### 4. Check Publishing Limits
95
96**When to use**: User wants to verify they can publish before attempting a post
97
98**Tool sequence**:
991. `INSTAGRAM_GET_IG_USER_CONTENT_PUBLISHING_LIMIT` - Check remaining publishing quota [Required]
100
101**Key parameters**:
102- `ig_user_id`: Instagram Business account user ID
103
104**Pitfalls**:
105- Instagram enforces a 25 posts per 24-hour rolling window limit
106- Publishing limit resets on a rolling basis, not at midnight
107- Check limits before bulk posting operations to avoid failures
108
109### 5. Get Media Comments and Children
110
111**When to use**: User wants to view comments on a post or children of a carousel
112
113**Tool sequence**:
1141. `INSTAGRAM_GET_IG_MEDIA_COMMENTS` - List comments on a media post [Required]
1152. `INSTAGRAM_GET_IG_MEDIA_CHILDREN` - List children of a carousel post [Optional]
116
117**Key parameters**:
118- `media_id`: ID of the media post
119- `ig_media_id`: Alternative media ID parameter
120
121**Pitfalls**:
122- Comments may be paginated; follow pagination cursors for complete results
123- Carousel children are returned as individual media objects
124- Comment moderation settings on the account affect what is returned
125
126## Common Patterns
127
128### ID Resolution
129
130**Instagram User ID**:
131```
1321. Call INSTAGRAM_GET_USER_INFO
1332. Extract ig_user_id from response
1343. Use in all subsequent API calls
135```
136
137**Media Container Status Check**:
138```
1391. Call INSTAGRAM_CREATE_MEDIA_CONTAINER
1402. Extract container_id from response
1413. Poll INSTAGRAM_GET_POST_STATUS with container_id
1424. Wait until status is 'FINISHED' before publishing
143```
144
145### Two-Phase Publishing
146
147- Phase 1: Create media container(s) with content URLs
148- Phase 2: Publish the container after it finishes processing
149- Always check container status between phases for video content
150- For carousels, all children must complete Phase 1 before creating the carousel container
151
152## Known Pitfalls
153
154**Media URLs**:
155- All image/video URLs must be publicly accessible HTTPS URLs
156- URLs behind authentication, CDN restrictions, or that require cookies will fail
157- Temporary URLs (pre-signed S3, etc.) may expire before processing completes
158
159**Rate Limits**:
160- 25 posts per 24-hour rolling window
161- API rate limits apply separately from publishing limits
162- Implement exponential backoff for 429 responses
163
164**Account Requirements**:
165- Only Business or Creator Instagram accounts are supported
166- Personal accounts cannot use the Instagram Graph API
167- The account must be connected to a Facebook Page
168
169**Response Parsing**:
170- Media IDs are numeric strings
171- Insights data may be nested under different response keys
172- Pagination uses cursor-based tokens
173
174## Quick Reference
175
176| Task | Tool Slug | Key Params |
177|------|-----------|------------|
178| Get user info | INSTAGRAM_GET_USER_INFO | (none) |
179| Create media container | INSTAGRAM_CREATE_MEDIA_CONTAINER | image_url/video_url, caption |
180| Create carousel | INSTAGRAM_CREATE_CAROUSEL_CONTAINER | children, caption |
181| Publish post | INSTAGRAM_CREATE_POST | ig_user_id, creation_id |
182| Publish media | INSTAGRAM_POST_IG_USER_MEDIA_PUBLISH | ig_user_id, creation_id |
183| Check post status | INSTAGRAM_GET_POST_STATUS | ig_container_id |
184| List user media | INSTAGRAM_GET_IG_USER_MEDIA | ig_user_id |
185| Get media details | INSTAGRAM_GET_IG_MEDIA | ig_media_id |
186| Get post insights | INSTAGRAM_GET_POST_INSIGHTS | media_id, metric |
187| Get user insights | INSTAGRAM_GET_USER_INSIGHTS | ig_user_id, metric, period |
188| Get publishing limit | INSTAGRAM_GET_IG_USER_CONTENT_PUBLISHING_LIMIT | ig_user_id |
189| Get media comments | INSTAGRAM_GET_IG_MEDIA_COMMENTS | ig_media_id |
190| Get carousel children | INSTAGRAM_GET_IG_MEDIA_CHILDREN | ig_media_id |
191
192## When to Use
193This skill is applicable to execute the workflow or actions described in the overview.
194
195## Limitations
196- Use this skill only when the task clearly matches the scope described above.
197- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
198- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.