You can build mention-triggered automations, such as bots, notifications, and integrations, without subscribing to high-volume message streams.
Webhook subscribers can now react to @mentions without processing every message in a conversation. The message.sent event payload includes a new mentionedUserIds field, which is an array of the user IDs mentioned in that message.
How it works
mentionedUserIds is always present on message.sent events. It's just an empty array when nobody gets mentioned, so you don't need to check for its existence before reading it. When mentions are present, user IDs appear in the order they occur in the message, with duplicates removed if a user is mentioned more than once.
{
"type": "message.sent",
"data": {
"sender": { ... },
"message": { "text": "@alice @sebastian thanks, @alice!", ... },
"conversation": { ... },
"mentionedUserIds": ["alice", "sebastian"]
}
}Even though @alice is mentioned twice, their ID appears only once in mentionedUserIds, at the position of the first mention.
No new subscription needed
Mention data is available from the existing message.sent event, as mentions are a property of the message itself. This approach avoids adding extra webhook types and subscriptions for something that's already part of the same event. One subscription gets you both the message and its mentions.
Because the field is extracted directly from the message's existing entity tree, there's no added performance overhead.
What this enables
With mentionedUserIds available on an event you may already subscribe to, you can build:
- Mention-based notifications (push, email, Slack) without polling every message
- Bots that respond only when tagged
- Custom routing or escalation workflows triggered by specific mentions
Check out the message.sent webhooks documentation.