Portal Community
igUserId discovery: Every Instagram node operation requires an igUserId. If you know your Facebook Page ID but not your Instagram Business account ID, use this operation to look it up. The returned instagramBusinessAccountId becomes the igUserId for all subsequent operations.

When to Use

Configuration

Connection

FieldRequiredDescription
accessTokenRequiredLong-lived page or user access token stored in BizFirst Credentials Manager.

Operation

FieldRequiredDescription
resourceRequiredMust be page.
operationRequiredMust be get-instagram-account.
pageIdRequiredFacebook Page ID to look up. Available in Facebook Page settings or from the Graph API /me/accounts endpoint.

Sample Configuration JSON

{
  "resource": "page",
  "operation": "get-instagram-account",
  "accessToken": "{{ $credential.instagram.accessToken }}",
  "pageId": "123456789012345"
}

Validation Errors

ErrorCause
accessToken is requiredaccessToken field is missing or empty.
pageId is requiredpageId field is missing or empty.
Graph API error 100Facebook Page ID does not exist or the token does not have access to this Page.

Output

Success Port

FieldTypeDescription
statusstring"success"
pageIdstringThe Facebook Page ID that was queried.
pageNamestringFacebook Page display name.
instagramBusinessAccountIdstringInstagram Business account ID linked to this Page. Use as igUserId in other operations.
hasInstagramAccountbooleantrue if an Instagram Business account is linked to this Page.
payloadstringRaw JSON response from the Graph API.

Error Port

FieldTypeDescription
statusstring"error"
pageIdstringThe queried page ID, for error logging.
errorCodestringGraph API error code.
errorMessagestringError description.
payloadstringRaw error response.

Sample Output JSON

{
  "status": "success",
  "pageId": "123456789012345",
  "pageName": "Your Brand Official",
  "instagramBusinessAccountId": "17841400000000000",
  "hasInstagramAccount": true,
  "payload": "{\"id\":\"123456789012345\",\"name\":\"Your Brand Official\",\"instagram_business_account\":{\"id\":\"17841400000000000\"}}"
}

Expression Reference

ExpressionValue
{{ $output.instagram.instagramBusinessAccountId }}Instagram Business account ID (use as igUserId)
{{ $output.instagram.hasInstagramAccount }}Boolean — whether IG account is linked
{{ $output.instagram.pageName }}Facebook Page display name

Node Policies & GuardRails

Examples

Onboarding: discover and store Instagram account ID

{
  "resource": "page",
  "operation": "get-instagram-account",
  "accessToken": "{{ $credential.instagram.accessToken }}",
  "pageId": "{{ $input.facebookPageId }}"
}
// If hasInstagramAccount == true:
// Store instagramBusinessAccountId in tenant config table

Multi-account agency setup

{
  "resource": "page",
  "operation": "get-instagram-account",
  "accessToken": "{{ $loop.current.pageAccessToken }}",
  "pageId": "{{ $loop.current.facebookPageId }}"
}

Iterates over client Facebook Pages to build a lookup table of pageId to instagramBusinessAccountId. After completion, all other Instagram workflows reference this table by client ID instead of hardcoding account IDs.