Portal Community

When to Use

Configuration

Connection

FieldRequiredDescription
accessTokenRequiredLong-lived Instagram access token stored in BizFirst Credentials Manager.
igUserIdRequiredInstagram Business/Creator account ID. Pass your own or a discovered account ID.

Operation

FieldRequiredDescription
resourceRequiredMust be ig-user.
operationRequiredMust be get-media.
limitOptionalNumber of media objects per page. Default 25. Max 100. Clamped automatically.
afterOptionalCursor from previous page's paging.after value for forward pagination.
fieldsOptionalComma-separated fields to return per media item. E.g. id,caption,media_type,like_count,permalink,timestamp.

Sample Configuration JSON

{
  "resource": "ig-user",
  "operation": "get-media",
  "accessToken": "{{ $credential.instagram.accessToken }}",
  "igUserId": "17841400000000000",
  "limit": 50,
  "fields": "id,caption,media_type,media_url,like_count,comments_count,permalink,timestamp"
}

Validation Errors

ErrorCause
accessToken is requiredaccessToken field is missing or empty.
igUserId is requiredigUserId field is missing or empty.
invalid_inputGeneral config validation failure.

Output

Success Port

FieldTypeDescription
statusstring"success"
mediaarrayArray of media item objects. Each item contains requested fields.
paging.beforestringCursor for the previous page.
paging.afterstringCursor for the next page. Pass as after in next call.
paging.nextUrlstringFull URL for the next page (Graph API convenience link).
paging.previousUrlstringFull URL for the previous page.
payloadstringRaw JSON response from the Graph API.

Error Port

Fires on authentication failure, invalid user ID, permission error, or rate limit exceeded.

FieldTypeDescription
statusstring"error"
errorCodestringGraph API error code.
errorMessagestringHuman-readable error description.
payloadstringRaw error response.

Sample Output JSON

{
  "status": "success",
  "media": [
    {
      "id": "17855590000000001",
      "caption": "Summer collection launch! #fashion",
      "media_type": "IMAGE",
      "media_url": "https://scontent.cdninstagram.com/v/t51...",
      "like_count": 842,
      "comments_count": 37,
      "permalink": "https://www.instagram.com/p/ABC123/",
      "timestamp": "2025-06-15T14:30:00+0000"
    },
    {
      "id": "17855590000000002",
      "caption": "Behind the scenes at the shoot",
      "media_type": "CAROUSEL_ALBUM",
      "like_count": 651,
      "comments_count": 24,
      "permalink": "https://www.instagram.com/p/DEF456/",
      "timestamp": "2025-06-13T10:00:00+0000"
    }
  ],
  "paging": {
    "before": "QVFIUmJ...",
    "after": "QVFIUmJ2...",
    "nextUrl": "https://graph.facebook.com/v18.0/...",
    "previousUrl": ""
  }
}

Expression Reference

ExpressionValue
{{ $output.instagram.media }}Full media array
{{ $output.instagram.media[0].id }}First item's media ID
{{ $output.instagram.media[0].caption }}First item's caption
{{ $output.instagram.media[0].permalink }}First item's public post URL
{{ $output.instagram.paging.after }}Next-page cursor

Node Policies & GuardRails

Examples

Weekly engagement report — first page

{
  "resource": "ig-user",
  "operation": "get-media",
  "accessToken": "{{ $credential.instagram.accessToken }}",
  "igUserId": "{{ $env.IG_USER_ID }}",
  "limit": 100,
  "fields": "id,media_type,like_count,comments_count,timestamp"
}

Fetches up to 100 posts with minimal fields for an aggregation workflow. The next node iterates the media array and sums like_count and comments_count by media_type.

Paginated feed sync with loop

{
  "resource": "ig-user",
  "operation": "get-media",
  "accessToken": "{{ $credential.instagram.accessToken }}",
  "igUserId": "17841400000000000",
  "limit": 100,
  "after": "{{ $loopState.afterCursor }}",
  "fields": "id,caption,permalink,timestamp,media_type"
}

Used inside a loop node. $loopState.afterCursor starts as empty and is updated from paging.after each iteration. The loop exits when paging.after is empty.