Intercom Webhook¶
Route & Auth¶
| Property | Value |
|---|---|
| Method | POST |
| Path | /webhooks/intercom |
| Auth type | sha1 |
| Header | X-Hub-Signature |
| Secret | INTERCOM_EU_TOOLS_APP_CLIENT_SECRET_EU |
| Service account | intercom-webhook@alan-eu-tools.iam.gserviceaccount.com |
| Response | 200 with {status: "skipped"} or issue details |
Payload¶
| Field | Type | Description |
|---|---|---|
topic |
string |
Event topic (e.g. conversation.admin.noted) |
app_id |
string |
Intercom app identifier |
data.item |
dict |
Conversation details (parts, user, links) |
Topic routing¶
Events are dispatched via a TOPIC_HANDLERS dict. Unrecognized topics return {status: "skipped"}.
| Topic | Handler |
|---|---|
conversation.admin.noted |
ConversationAdminNotedHandler |
ConversationAdminNotedHandler¶
Detects command mentions in admin notes and routes them:
| Command | Target |
|---|---|
@eng |
Engineering oncall |
@coc |
COC team |
@ops |
Ops team |
@security |
Security team |
@prevops |
Prevops team |
@carelegal |
Care Legal team |
Behavior:
- If the Intercom conversation is already linked to a Linear issue → adds a comment to the existing issue (optionally moves to "Todo")
- If the strategy is
RedirectToMarmotton→ leaves a redirect note in Intercom - Otherwise → creates a new Linear issue and attaches the Intercom conversation link
Integrations¶
- Linear API: issue creation, comment posting
- Intercom API: conversation reading, note posting
Code reference¶
{{ package_reference("apps.eu_tools.webhooks.intercom.webhook") }}
{{ package_reference("apps.eu_tools.webhooks.intercom.handlers") }}