Two-step publishing: Instagram requires creating a container first, then publishing it as a separate call. Connect media/createContainer to media/publish via {{ $output.instagram.creationId }}.
When to Use
- Automated product launches: When a product is added to your e-commerce platform, generate an image on CDN, then create a container with a pre-written caption and location tag before publishing.
- Scheduled content calendar: A content team approves posts in a CMS; a workflow creates containers for approved items, stores the
creationId, and publishes at the scheduled time.
- Carousel album creation: Build multi-image posts by creating individual item containers with
isCarouselItem: true, then passing all container IDs to the parent carousel container.
- UGC republishing pipeline: When user-generated content is approved for resharing, re-host the media publicly and create a container with attribution credit in the caption.
- Reel publishing workflow: Upload an edited video to your CDN, create a REELS container, then publish after video processing completes.
Configuration
Connection
| Field | Required | Description |
accessToken | Required | Long-lived Instagram access token stored in BizFirst Credentials Manager. |
igUserId | Required | Your Instagram Business/Creator account ID (numeric string). |
Operation
| Field | Required | Description |
resource | Required | Must be media. |
operation | Required | Must be create-container. |
mediaType | Required | IMAGE, VIDEO, REELS, or CAROUSEL. |
imageUrl | Optional | Publicly accessible HTTPS URL of the image (required for IMAGE type). Minimum 320px on shortest side. |
videoUrl | Optional | Publicly accessible HTTPS URL of the video (required for VIDEO/REELS). MOV or MP4 format. |
caption | Optional | Post caption text (up to 2200 characters). Hashtags and @mentions supported. |
locationId | Optional | Facebook Place ID to tag a location on the post. |
userTags | Optional | JSON array: [{"username":"handle","x":0.5,"y":0.3}]. Coordinates are 0.0–1.0 relative to image dimensions. |
isCarouselItem | Optional | true if this is a child of a CAROUSEL container. Default false. |
Media URL accessibility: The imageUrl or videoUrl must be publicly accessible over HTTPS at container creation time. Instagram's servers fetch the media directly. Pre-signed URLs with short expiry, private CDN URLs, or localhost URLs will fail.
Sample Configuration JSON
{
"resource": "media",
"operation": "create-container",
"accessToken": "{{ $credential.instagram.accessToken }}",
"igUserId": "17841400000000000",
"mediaType": "IMAGE",
"imageUrl": "https://cdn.yourbrand.com/posts/summer-launch-2025.jpg",
"caption": "Our summer collection is live! Shop the link in bio. #fashion #summer2025",
"locationId": "213385402",
"userTags": "[{\"username\":\"partner_brand\",\"x\":0.5,\"y\":0.3}]"
}
Validation Errors
| Error | Cause |
accessToken is required | accessToken field is missing or empty. |
igUserId is required | igUserId field is missing or empty. |
| Graph API error 100 | Invalid or inaccessible imageUrl / videoUrl. |
| Graph API error 2207026 | Caption exceeds 2200 character limit. |
Output
Success Port
| Field | Type | Description |
status | string | "success" |
creationId | string | Container ID. Pass to media/publish as creationId. |
payload | string | Raw JSON response from the Graph API. |
Error Port
| Field | Type | Description |
status | string | "error" |
errorCode | string | Graph API error code. |
errorMessage | string | Error description. |
payload | string | Raw error response. |
Sample Output JSON
{
"status": "success",
"creationId": "17889615814797510",
"payload": "{\"id\":\"17889615814797510\"}"
}
Expression Reference
| Expression | Value |
{{ $output.instagram.creationId }} | Container ID for use in media/publish |
Node Policies & GuardRails
- Container expiry: Media containers expire 24 hours after creation if not published. If the publish step is delayed beyond 24 hours, re-run
media/createContainer.
- Video processing time: Video containers may take several minutes to process. Introduce a delay between create and publish steps, or poll container status via the Graph API before publishing.
- Content policy: Instagram enforces community guidelines on captions and media. Posts with prohibited content fail at container or publish step. Validate content before automation.
- Rate limit: 200 calls per user per hour. For bulk publishing, spread container creation across time windows.
Examples
Image post from workflow data
{
"resource": "media",
"operation": "create-container",
"accessToken": "{{ $credential.instagram.accessToken }}",
"igUserId": "{{ $env.IG_USER_ID }}",
"mediaType": "IMAGE",
"imageUrl": "{{ $output.cdnUpload.publicUrl }}",
"caption": "{{ $input.postCaption }}",
"locationId": "{{ $input.facebookPlaceId }}"
}
Reel container creation
{
"resource": "media",
"operation": "create-container",
"accessToken": "{{ $credential.instagram.accessToken }}",
"igUserId": "17841400000000000",
"mediaType": "REELS",
"videoUrl": "https://cdn.yourbrand.com/reels/product-demo-v2.mp4",
"caption": "Watch how it works in 30 seconds! #productdemo #howto"
}
After success, pass {{ $output.instagram.creationId }} to media/publish.