When to Use
- Post performance audit: After publishing a campaign post, retrieve its engagement metrics (like count, comments count) to feed into a reporting workflow or update a CRM record with the post's performance data.
- Content syndication: Fetch the media URL and caption of a specific Instagram post to reuse or cross-post its content to another channel or internal content library.
- Permalink generation: Retrieve the permanent Instagram post link (
permalink) to embed in email newsletters, landing pages, or automated social proof widgets.
- Moderation trigger: After a webhook event fires for a specific media ID, use
media/get to retrieve full post details before deciding whether to escalate for manual review.
- Archive workflows: Periodically fetch known post IDs to snapshot their engagement state into a database, tracking like and comment growth over time.
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 (maps to Graph API media edge). |
operation | Required | Must be get. |
mediaId | Required | The Instagram media object ID to retrieve (e.g. 17855590000000000). |
fields | Optional | Comma-separated field list. Defaults include id,caption,media_type,media_url,timestamp,like_count,comments_count,permalink. Add thumbnail_url for videos. |
Sample Configuration JSON
{
"resource": "media",
"operation": "get",
"accessToken": "{{ $credential.instagram.accessToken }}",
"igUserId": "17841400000000000",
"mediaId": "17855590000000001",
"fields": "id,caption,media_type,media_url,timestamp,like_count,comments_count,permalink"
}
Validation Errors
| Error | Cause |
accessToken is required | accessToken field is missing or empty. |
mediaId is required | mediaId field is missing or empty. |
invalid_input | General config validation failure from base class. |
Output
Success Port
| Field | Type | Description |
status | string | "success" |
id | string | Media object ID. |
caption | string | Post caption text (up to 2200 characters). |
mediaType | string | IMAGE, VIDEO, CAROUSEL_ALBUM, or REEL. |
mediaUrl | string | URL to the media file. Expires after a set period for CDN-hosted content. |
timestamp | string | ISO 8601 publish timestamp. |
likeCount | number | Total like count at time of request. |
commentsCount | number | Total comment count at time of request. |
permalink | string | Permanent public URL to the Instagram post. |
payload | string | Raw JSON response from the Graph API. |
Error Port
Fires on authentication failure, invalid media ID, expired token, or rate limit exceeded.
| Field | Type | Description |
status | string | "error" |
errorCode | string | Graph API error code (e.g. 100, 190) or BizFirst validation code. |
errorMessage | string | Human-readable error description. |
payload | string | Raw error response from the Graph API. |
Sample Output JSON
{
"status": "success",
"id": "17855590000000001",
"caption": "Excited to announce our summer collection! #fashion #summer2025",
"mediaType": "IMAGE",
"mediaUrl": "https://scontent.cdninstagram.com/v/t51.29350-15/...",
"timestamp": "2025-06-15T14:30:00+0000",
"likeCount": 842,
"commentsCount": 37,
"permalink": "https://www.instagram.com/p/ABC123xyz/",
"payload": "{\"id\":\"17855590000000001\",\"caption\":\"...\"}"
}
Expression Reference
| Expression | Value |
{{ $output.instagram.id }} | Media object ID |
{{ $output.instagram.caption }} | Post caption text |
{{ $output.instagram.mediaType }} | Media type string |
{{ $output.instagram.mediaUrl }} | Direct media file URL |
{{ $output.instagram.permalink }} | Public post URL |
{{ $output.instagram.likeCount }} | Like count integer |
{{ $output.instagram.commentsCount }} | Comment count integer |
Node Policies & GuardRails
- Rate limit: 200 Graph API calls per user per hour. A high-frequency polling workflow that calls
media/get every minute will exhaust the quota in 3.3 hours. Use webhook triggers instead of polling where possible.
- Media URL expiry: The
mediaUrl field contains a CDN URL that expires. Do not store it long-term; store the permalink or id instead and re-fetch when needed.
- Token storage: The
accessToken must be stored in the BizFirst Credentials Manager. Never embed raw tokens in workflow configuration.
- GDPR: Caption text and media URLs may contain personal data. Apply data retention policies when persisting output to databases.
Examples
Fetch post and log to database
{
"resource": "media",
"operation": "get",
"accessToken": "{{ $credential.instagram.accessToken }}",
"igUserId": "{{ $env.IG_USER_ID }}",
"mediaId": "{{ $trigger.body.mediaId }}",
"fields": "id,caption,media_type,like_count,comments_count,permalink,timestamp"
}
Used in a webhook-triggered workflow. The incoming event contains the mediaId; this node fetches full details before writing to a reporting database.
Cross-post content to internal CMS
{
"resource": "media",
"operation": "get",
"accessToken": "{{ $credential.instagram.accessToken }}",
"igUserId": "17841400000000000",
"mediaId": "17855590000000002",
"fields": "id,caption,media_url,thumbnail_url,media_type,permalink"
}
Retrieves the media file URL and caption for a Reel. The thumbnail_url field is included to get the video cover image for use in a CMS preview card.