|
| 1 | +# Intercom Tool |
| 2 | + |
| 3 | +Customer messaging, conversations, and support automation via the Intercom API (v2.11). |
| 4 | + |
| 5 | +## Setup |
| 6 | + |
| 7 | +### 1. Get an Access Token |
| 8 | + |
| 9 | +1. Log in to your [Intercom Developer Hub](https://app.intercom.com/a/apps/_/developer-hub) |
| 10 | +2. Create or select an app |
| 11 | +3. Go to **Authentication** and copy the access token |
| 12 | +4. Ensure the app has the required scopes for the tools you need (e.g., `Read and List conversations`, `Manage conversations`, `Read and Write contacts`) |
| 13 | + |
| 14 | +### 2. Configure the Token |
| 15 | + |
| 16 | +Set the environment variable: |
| 17 | + |
| 18 | +```bash |
| 19 | +export INTERCOM_ACCESS_TOKEN="your-access-token-here" |
| 20 | +``` |
| 21 | + |
| 22 | +Or configure via the Hive credential store. |
| 23 | + |
| 24 | +## Tools (8 Total) |
| 25 | + |
| 26 | +### Conversations (2) |
| 27 | + |
| 28 | +| Tool | Description | |
| 29 | +|------|-------------| |
| 30 | +| `intercom_search_conversations` | Search conversations with filters (status, assignee, tag, date) | |
| 31 | +| `intercom_get_conversation` | Get full conversation details including message history | |
| 32 | + |
| 33 | +### Contacts (2) |
| 34 | + |
| 35 | +| Tool | Description | |
| 36 | +|------|-------------| |
| 37 | +| `intercom_get_contact` | Get a contact by ID or email | |
| 38 | +| `intercom_search_contacts` | Search contacts by email, name, or custom attributes | |
| 39 | + |
| 40 | +### Notes, Tags & Assignment (3) |
| 41 | + |
| 42 | +| Tool | Description | |
| 43 | +|------|-------------| |
| 44 | +| `intercom_add_note` | Add an internal note to a conversation | |
| 45 | +| `intercom_add_tag` | Add a tag to a conversation or contact | |
| 46 | +| `intercom_assign_conversation` | Assign a conversation to an admin or team | |
| 47 | + |
| 48 | +### Teams (1) |
| 49 | + |
| 50 | +| Tool | Description | |
| 51 | +|------|-------------| |
| 52 | +| `intercom_list_teams` | List available teams for conversation routing | |
| 53 | + |
| 54 | +## Usage Examples |
| 55 | + |
| 56 | +```python |
| 57 | +# Search open conversations |
| 58 | +intercom_search_conversations(status="open", limit=10) |
| 59 | + |
| 60 | +# Get full conversation details |
| 61 | +intercom_get_conversation(conversation_id="12345") |
| 62 | + |
| 63 | +# Find a contact by email |
| 64 | +intercom_get_contact(email="jane@example.com") |
| 65 | + |
| 66 | +# Add an internal note |
| 67 | +intercom_add_note(conversation_id="12345", body="Escalating to engineering") |
| 68 | + |
| 69 | +# Tag a conversation |
| 70 | +intercom_add_tag(name="VIP", conversation_id="12345") |
| 71 | + |
| 72 | +# Assign to a team |
| 73 | +intercom_assign_conversation( |
| 74 | + conversation_id="12345", |
| 75 | + assignee_id="67890", |
| 76 | + assignee_type="team", |
| 77 | + body="Routing to billing team" |
| 78 | +) |
| 79 | + |
| 80 | +# List available teams |
| 81 | +intercom_list_teams() |
| 82 | +``` |
| 83 | + |
| 84 | +## Error Handling |
| 85 | + |
| 86 | +All tools return error dictionaries on failure: |
| 87 | + |
| 88 | +```python |
| 89 | +{"error": "Intercom credentials not configured", "help": "Set INTERCOM_ACCESS_TOKEN..."} |
| 90 | +{"error": "Invalid or expired Intercom access token"} |
| 91 | +{"error": "Insufficient permissions. Check your Intercom app scopes."} |
| 92 | +{"error": "Resource not found"} |
| 93 | +{"error": "Intercom rate limit exceeded. Try again later."} |
| 94 | +{"error": "Request timed out"} |
| 95 | +``` |
| 96 | + |
| 97 | +## References |
| 98 | + |
| 99 | +- [Intercom API Documentation](https://developers.intercom.com/docs/references/rest-api/api.intercom.io/) |
0 commit comments