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
- Initial setup automation: During account onboarding, retrieve the Instagram Business account ID linked to the user's Facebook Page without requiring them to manually find and enter their Instagram account ID.
- Multi-account management: In an agency platform, dynamically retrieve the Instagram account ID for each managed client by their Facebook Page ID when their workflows are triggered.
- Account connection verification: Verify that a Facebook Page has an Instagram Business account linked before attempting Instagram Graph API operations. Use
hasInstagramAccount to gate downstream nodes.
- Token refresh context: When refreshing a page access token, verify the linked Instagram account ID to confirm the token applies to the expected account before updating stored credentials.
- Debugging connection issues: When Instagram API calls fail for unexpected reasons, retrieve the page-to-Instagram mapping to confirm the account linkage is intact.
Configuration
Connection
| Field | Required | Description |
accessToken | Required | Long-lived page or user access token stored in BizFirst Credentials Manager. |
Operation
| Field | Required | Description |
resource | Required | Must be page. |
operation | Required | Must be get-instagram-account. |
pageId | Required | Facebook 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
| Error | Cause |
accessToken is required | accessToken field is missing or empty. |
pageId is required | pageId field is missing or empty. |
| Graph API error 100 | Facebook Page ID does not exist or the token does not have access to this Page. |
Output
Success Port
| Field | Type | Description |
status | string | "success" |
pageId | string | The Facebook Page ID that was queried. |
pageName | string | Facebook Page display name. |
instagramBusinessAccountId | string | Instagram Business account ID linked to this Page. Use as igUserId in other operations. |
hasInstagramAccount | boolean | true if an Instagram Business account is linked to this Page. |
payload | string | Raw JSON response from the Graph API. |
Error Port
| Field | Type | Description |
status | string | "error" |
pageId | string | The queried page ID, for error logging. |
errorCode | string | Graph API error code. |
errorMessage | string | Error description. |
payload | string | Raw 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
| Expression | Value |
{{ $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
- Cache the result: The Instagram Business account ID does not change unless the Instagram account is disconnected from the Page. Store the result in your configuration database and skip this lookup on subsequent workflow runs.
- Gate on hasInstagramAccount: Always check
hasInstagramAccount before proceeding to Instagram operations. If false, the Page has no linked Instagram account and all Instagram operations will fail.
- Token type: A user access token with
pages_show_list and instagram_basic permissions is required. A page-specific access token also works.
- Rate limit: 200 calls per user per hour.
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.