How to connect Intercom to an AI Agent
Connect your Flametree AI agent to Intercom the seamless customer service suite to process incoming customer messages via the Intercom Inbox widget, and then respond directly to your customers or with suggested draft messages to human operators based on the configured mode.
Prerequisitesโ
๐ก Note: If necessary, please refer to How to Find the Required Parameters.
Prior to setting up the Intercom Integration, ensure the following prerequisites are met:
- An Intercom account with access to the Developer Hub
- Select the appropriate Intercom API URL/Server for your region
- Available API Servers may be found in the Intercom Developer Docs. Please check under Related Resources
- For example:
https://api.intercom.io/(US)
- An Access Token (I.e. An API key used for authorization)
- An Admin ID, the administrator identifier (Email ID) from which your AI agent is to send messages
What is Intercom?โ
Intercom.com is customer service suite that delivers faster response times, personalized service and a consolidated view of customer services through its Fin AI Agent and Helpdesk.
How to Find the Required Parametersโ
Access Tokenโ
-
In Intercom, Navigate to:
- Settings โ Integrations โ Developer Hub โ Your App โ Authentication โ Access Token
-
Click the Reveal ๐๏ธ and/or Copy to clipboard ๐ icons to view and/or save the token.
Admin IDโ
-
Option A: Intercom Inbox URL
- Via the Intercom Inbox for your app, inspect the Browser URL to find the Admin ID.
- For example:
https://app.intercom.com/a/inbox/<APP_ID>/inbox/admin/<ADMIN_ID>/conversation/<CONVERSATION_ID>(I.e.<ADMIN_ID>)
-
Option B: API Call
- Via CMD (Windows Command Prompt) or Powershell, run the following command replacing
<YOUR_TOKEN>with the Intercom Access Token retrieved earlier.
- Via CMD (Windows Command Prompt) or Powershell, run the following command replacing
curl -i -X GET -H "Authorization: Bearer <YOUR_TOKEN>" -H "Intercom-Version: 2.11" "https://api.intercom.io/me"
Step-by-Step Integration Setupโ
Step 1: Add/Set up the Intercom Integration in Flametreeโ
-
Navigate to Settings
- Go to Settings > Connectivity.
- Open CRM Integrations > Intercom.
- Select Add +.
-
Fill Configuration
| Field | Description | Required | Where to Get Value |
|---|---|---|---|
| Name | Custom integration name. | โ Yes | Your choice |
| Description | Integration description. | โ Yes | Your choice |
| Intercom URL | Intercom API URL/Server based on your region, for example, https://api.intercom.io/. | โ Yes | Intercom Developer Documentation: Related Resources |
| API Key | Intercom Access Token used to access workspace data via the API. | โ Yes | Intercom Developer Hub |
| Admin ID | Admin ID (Email ID) from which an agent should send messages. | โ Yes | Intercom Inbox URL or API call |
| Integration Type (Mode) | Determines how an agent replies to customers and/or human operators. Please refer to Supported Integration Types for more detail. | โ Yes | Enter one of the following: copilot, copilot_private or hybrid |
Supported Integration Typesโ
| Integration Type / Mode | Description |
|---|---|
copilot | If set to copilot, an agent will reply directly to customers. |
copilot_private | Alternatively, if set to copilot_private, an agent will instead reply with suggested draft messages in the conversations of a human operator's Intercom Inbox. |
hybrid | If set to hybrid, an agent is capable of replying both directly to customers and with suggested draft messages to human operators. The manner in which an agent will reply is dependent on it's Copilot Working Hours. |
- Save Integration
- Click Save to create the integration
Step 2: Connect to AI Agentโ
-
Open Agent Configuration
- Navigate to your target AI agent's settings
- Go to the Communication channels section
-
Assign Integration
- Select your Intercom Integration from the list
- Save the agent configuration
-
Restart Agent
- Restart the agent for changes to take effect
- This step is mandatory for the integration to work
โ๏ธ Important: Always restart both the agent and channel after making changes.
Step 3: Configure the Webhook in Intercomโ
- Retrieve the Webhook URL from Your Agent
- Navigate to your target AI agent's settings
- Go to the Communication channels section, find Intercom;
- Click the Show URLs icon ๐
- Click the Copy ๐ icon to save the Webhook URL
๐ก Note: If you donโt see the Show URLs icon, make sure you saved the agent after connecting Intercom.
- Configure the Intercom Webhook
- In the Intercom, navigate to: Settings โ Integrations โ Developer Hub โ Your App โ Webhooks
- Click Edit
- For the Endpoint URL, place the Webhook URL copied from your agent and click Save.
๐ก Note: If successful, a pop-up then appears in Intercom with the following message:
Your webhook settings were successfully updated and a test request was sent successfully. Please refer to Common Issues & Solutions if this does not occur.
- Inspect the Agent's Intercom Logs
- In Flametree, navigate to Agents
- Find your agent, click the vertical ellipsis โฎ and then click Show Logs
- Switch to the Intercom tab. Here (If successful) you'll find the test request sent by Intercom after editing the Webhook
- For example:
{
"type": "notification_event",
"app_id": "<APP_ID>",
"data": {
"type": "notification_event_data",
"item": {
"type": "ping",
"message": "This is a ping notification test message."
}
},
"links": {},
"id": null,
"topic": "ping",
"delivery_status": null,
"delivery_attempts": 1,
"delivered_at": 0,
"first_sent_at": "<FIRST_SENT_AT>",
"created_at": "<CREATED_AT>",
"self": null
}
Step 4: Additional Configurationโ
- Configure the Copilot Working Hours for an Agent
- Navigate to your target AI agent's settings
- Go to the Advanced section
- Click + for one of the days of the week
- Enter the hours from which Copilot workings hours start and end (For example,
7 to 24), and - Repeat for the other necessary days of the week
๐ก Note: This step is optional, however please configure Copilot working hours if the Integration Type / Mode is set to
hybridfor your Intercom Integration and the agent should reply both directly to customers and with suggested draft messages to human operators during specific periods of the day.
- Restart Agent
- Restart the agent for changes to take effect
โ๏ธ Important: Always restart both the agent and channel after making changes.
Configuration Optionsโ
Environment Variablesโ
Configure additional features through Set Environment Variables:
| Variable | Description | Default |
|---|---|---|
INTERCOM_TEAM_ID_FILTER | A comma-separated list of Intercom team IDs from which the agent should accept messages. For example: INTERCOM_TEAM_ID_FILTER=7727961,7727960 | True |
To Configure:
- Go to your agent's Set Environment Variables and click +
- Add the variable name and desired value
- Save and restart the agent (If it is already running)
Testing Your Integrationโ
Quick Test Stepsโ
-
Send Endpoint Test Request
- In the Intercom, navigate to: Settings โ Integrations โ Developer Hub โ Your App โ Webhooks
- Click Send a test request
- Expected Pop-up Message:
Test request sent successfully
-
Send Test Message
- Use the Intercom Inbox widget to send a message
- Verify the AI agent responds appropriately
-
Check Message Delivery
- Confirm messages appear in the Intercom Inbox
- Verify that sessions are created in Flametree
Common Issues & Solutionsโ
Test request sent after editing the Intercom Webhook is unsuccessful
Pop-up Message: Unsuccessful test request. Please check that your Endpoint URL can receive notifications and check for errors.
Possible Causes:
- Invalid Endpoint URL
- Flametree AI agent is not running
Solutions:
- Verify Flametree Agent: Ensure the agent is running
Agent does not reply to messages in Intercom
Possible Causes:
- Agent not restarted after integration setup
- Wrong Admin ID configured
- Incorrect mode (Mode other than
copilot,copilot_private, andhybrid)
Solutions:
- Double-check: Admin ID, integration mode, and restart the agent.
FAQโ
What message types are supported?
Intercom together with Flametree supports:
- โ Text messages
- โ Images
- โ Voice messages
- โ Voice calls
- โ Video calls
Is configuring Copilot working hours mandatory if the Integration Type is set to hybrid?
Configuring Copilot working hours is not mandatory. If working hours are not configured and the Integration Type is set to hybrid, your agent will reply directly to customers similarly to Integration Type copilot.
Security Considerationsโ
API Token Securityโ
- Never share your access tokens publicly
- Rotate tokens regularly for enhanced security
- Use environment variables in production deployments
- Monitor API usage for suspicious activity