instagram-publish

Publish Images, Reels, and Carousels to Instagram using the MyBrandMetrics API. Supports local file uploads and URLs. Handles single posts and multi-item carousels. Includes options for caption, thumbnail offset, sharing to feed, and polling for status. Triggered when the user asks to "publish to Instagram", "post to IG", or "upload to Instagram".

Audits

Pass

Install

openclaw skills install clawbus-instagram-publish

Instagram Publish Skill

This skill enables publishing content to Instagram via the MyBrandMetrics API.

Usage

Use the provided Python script scripts/publish_instagram.py to publish content.

Arguments

  • --api-key: MyBrandMetrics API Key (check TOOLS.md for current key)
  • --connection-id: Instagram Connection ID
  • --account-id: MyBrandMetrics Account ID
  • --type: Media type (IMAGE, REELS, CAROUSEL)
  • --caption: Text for the post
  • --url: URL for single Image/Reel
  • --path: Local path for single Image/Reel
  • --items: Space-separated list of URLs or paths for Carousel items
  • --thumb-offset: Thumbnail offset in ms (default: 1000)
  • --no-feed: Flag to disable sharing to feed (Reels only)
  • --no-wait: Flag to disable waiting for completion (polls automatically by default)
  • --check-id: Check status of a specific publish ID

Reliability Checklist (Mandatory)

Before running the publish command, verify:

  1. Item Count: Count every single attachment and URL the user provided. Ensure --items includes all of them.
  2. Item Type: The script auto-detects type based on extension, but double-check if a file has no extension.
  3. Caption: Ensure the exact caption is captured.
  4. Local vs URL: The skill handles mixed local/URL carousels by downloading URLs first for reliability.

Examples

Publish a single Image (URL)

python3 scripts/publish_instagram.py --api-key YOUR_KEY --connection-id YOUR_CONN_ID --account-id YOUR_ACC_ID --type IMAGE --url "https://example.com/image.jpg" --caption "Hello World!"

Publish a Reel (Local File)

python3 scripts/publish_instagram.py --api-key YOUR_KEY --connection-id YOUR_CONN_ID --account-id YOUR_ACC_ID --type REELS --path /path/to/video.mp4 --caption "Check this out!" --thumb-offset 1000

Publish a Carousel (Mix of local and URL)

python3 scripts/publish_instagram.py --api-key YOUR_KEY --connection-id YOUR_CONN_ID --account-id YOUR_ACC_ID --type CAROUSEL --items "/path/to/img1.jpg" "https://example.com/vid2.mp4" --caption "My Carousel"

Check Status

python3 scripts/publish_instagram.py --api-key YOUR_KEY --connection-id YOUR_CONN_ID --account-id YOUR_ACC_ID --check-id v_pub_file~...

Security

  • Always refer to TOOLS.md for the current API key.
  • If no key is found in TOOLS.md, ask the user for it.
  • Do not expose the connection ID or account ID in logs if possible, though they are often provided in prompts.