How to Connect Instagram to AI Agent
Connect your Flametree AI agent to Instagram to automatically respond to Direct Messages (DMs). This integration uses the Meta Graph API and requires an Instagram Professional account linked to a Facebook Page.
Prerequisites
- Instagram Professional Account (Business or Creator). Personal accounts are not supported by the API
- Facebook Page linked to your Instagram account
- Meta Developer Account and a Meta App (Type: Business)
- Manage Queries permission enabled in Instagram settings (Settings > Privacy > Messages > Allow Access to Messages)
Setting Up Meta Infrastructure
Step 1: Link Instagram to Facebook Page
- Open your Facebook Page settings
- Go to Linked Accounts > **Instagram
- Click Connect Account and log in to your Instagram Professional account
Step 2: Configure Meta Developer App
- Go to the Meta for Developers portal
- Select your App (or create a new one with the Business type)
- Click Add Product and select Instagram Graph API
- In the Instagram settings of your app, navigate to Token Generation
- Add your Facebook Page and generate an Access Token
Step 3: Webhook Configuration
- In the Meta App dashboard, go to Webhooks
- Select Instagram from the dropdown menu
- Click Edit Subscription and use the Callback URL and Verify Token provided in the Flametree connector settings (see below)
- Subscribe to the messages field
If the webhook verification fails, ensure the Instagram verify token in the Flametree portal matches Verify Token you entered in the Meta App Webhook settings.
Configuring Flametree Integration
-
Navigate to Settings > Connectivity > Communication Channels
-
Select Instagram from the list and click Add +
-
Fill in the configuration fields using the values from your Meta Developer Console:
Field Description Required Name Custom name for the integration (for example, Main IG Support). ✅ Instagram ID Your Instagram Business Account ID. ✅ Facebook access token The Page Access Token from your Meta App. ✅ Facebook page ID The ID of the Facebook Page linked to Instagram. ✅ Instagram access token Token generated specifically for Instagram Graph API. ✅ Meta app ID The ID of your Meta Developer App. ✅ Instagram app secret Found in App Settings > Basic in Meta Console. ✅ Instagram verify token Any value you make up yourself (for example, my_ig_webhook_2026). Works like a shared password — the same value must be entered in the Meta App webhook settings.✅ Registration delay Delay between registration attempts (in seconds). ❌ Registration count Number of retry attempts for webhook registration. ❌ -
Click Save.
-
Click Start in the upper-right corner to start the channel.
-
Go to your Agent Settings > Communication Channels and add the newly created Instagram connector.
-
Restart the agent: click Stop agent then Start agent to apply the changes.
Testing the Integration
- Log in to a different Instagram account (not the business account itself)
- Send a Direct Message (DM) to your Instagram Business profile
- Verify that the AI Agent responds automatically
- Check the Sessions tab in the portal to see the conversation logs
If the agent is not receiving messages, there can be several causes to that:
- Allow Access to Messages is disabled in the Instagram mobile app settings (Privacy > Messages)
- The Facebook Page is not properly linked to the Instagram account
- The Meta App is still in Development Mode. Switch it to Live Mode