instagram-automation
通过Rube MCP(Composio)自动化Instagram任务:创建帖子、轮播图,管理媒体内容,获取数据分析及发布限制信息。始终优先搜索工具以获取最新架构。
Instagram Automation via Rube MCP
Automate Instagram operations through Composio's Instagram toolkit via Rube MCP.
Prerequisites
RUBE_MANAGE_CONNECTIONS with toolkit instagramRUBE_SEARCH_TOOLS first to get current tool schemasSetup
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.
RUBE_SEARCH_TOOLS respondsRUBE_MANAGE_CONNECTIONS with toolkit instagramCore 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 postvideo_url: Public URL of the video to postcaption: Post caption textig_user_id: Instagram Business account user IDPitfalls:
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 carouselcaption: Carousel post captionig_user_id: Instagram Business account user IDPitfalls:
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 IDmedia_id: ID of the specific media postmetric: Metrics to retrieve (e.g., impressions, reach, engagement)period: Time period for insights (e.g., day, week, lifetime)Pitfalls:
period parameter must match the metric type4. 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 IDPitfalls:
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 postig_media_id: Alternative media ID parameterPitfalls:
Common Patterns
ID Resolution
Instagram User ID:
1. Call INSTAGRAM_GET_USER_INFO
Extract ig_user_id from response
Use in all subsequent API calls Media Container Status Check:
1. Call INSTAGRAM_CREATE_MEDIA_CONTAINER
Extract container_id from response
Poll INSTAGRAM_GET_POST_STATUS with container_id
Wait until status is 'FINISHED' before publishing Two-Phase Publishing
Known Pitfalls
Media URLs:
Rate Limits:
Account Requirements:
Response Parsing:
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 |