Mentions Extension ​
With Mentions, you can effortlessly tag specific users or groups in Slack, Teams, or Google Chat messages whenever a test fails. This ensures that the right people are promptly notified, improving response times and collaboration. Additionally, Mentions can automatically tag users based on your on-call rotation schedule, streamlining your workflow and ensuring that the appropriate team members are always in the loop.
TIP
In general, tagging users will help to maintain accountability on owning test failures. It also reduces the ambiguity on who needs to look into failures based on a on-call schedule.
Configuration ​
Basic Syntax ​
{
"name": "mentions",
"inputs": {
"users": [
{
"name": "Jon",
"teams_upn": "[email protected]"
}
]
}
}
Parameters ​
users
(object[]) - List of users to mentionname
(string) - Name of the user to displayteams_upn
(string) - User's UPN in Teams (required for Teams)slack_uid
(string) - User's unique ID in Slack (required for Slack)slack_gid
(string) - User group's unique ID in Slackchat_uid
(string) - User's unique ID in Google Chat (required for Chat)enable
(boolean) - Enable or disable user's availability for on-call support
schedule
(object) - On-call schedule configurationlayers
(object[]) - On-call schedule layersstart
(string) - Start time in formatHH:MM:SS
end
(string) - End time in formatHH:MM:SS
user
(object) - Single user for this layerrotation
(object) - Rotation configuration for multiple usersevery
(string) - Rotation schedule:day
orweek
users
(object[]) - Users in rotation
Default Behavior ​
- Hook:
end
- Condition:
fail
Examples ​
Basic User Mention ​
Mention a specific user when tests fail:
{
"targets": [
{
"name": "teams",
"inputs": {
"url": "{TEAMS_WEBHOOK_URL}"
},
"extensions": [
{
"name": "mentions",
"inputs": {
"users": [
{
"name": "Jon",
"teams_upn": "[email protected]"
}
]
}
}
]
}
]
}
Slack User Group Mention ​
Mention a user group in Slack:
{
"name": "mentions",
"inputs": {
"users": [
{
"name": "team-awesome",
"slack_gid": "S0123456789"
}
]
}
}
Special Slack Mentions ​
Mention special groups like @here
, @channel
, or @everyone
:
{
"name": "mentions",
"inputs": {
"users": [
{
"name": "here",
"slack_gid": "here"
},
{
"name": "channel",
"slack_gid": "channel"
},
{
"name": "everyone",
"slack_gid": "everyone"
}
]
}
}
Weekly Rotation ​
Rotate mentions based on week number:
{
"name": "mentions",
"inputs": {
"users": [
{
"name": "Alice",
"slack_uid": "U0123456789"
},
{
"name": "Bob",
"slack_uid": "U9876543210"
}
],
"schedule": {
"layers": [
{
"rotation": {
"every": "week",
"users": [
{
"name": "Alice",
"slack_uid": "U0123456789"
},
{
"name": "Bob",
"slack_uid": "U9876543210"
}
]
}
}
]
}
}
}
Time-Based Layers ​
Different users for different time periods:
{
"name": "mentions",
"inputs": {
"schedule": {
"layers": [
{
"start": "09:00:00",
"end": "17:00:00",
"user": {
"name": "Day Team Lead",
"slack_uid": "U1111111111"
}
},
{
"start": "17:00:00",
"end": "09:00:00",
"user": {
"name": "Night Team Lead",
"slack_uid": "U2222222222"
}
}
]
}
}
}
Multi-Platform Configuration ​
Configure mentions for multiple platforms:
{
"targets": [
{
"name": "slack",
"inputs": {
"url": "{SLACK_WEBHOOK_URL}"
},
"extensions": [
{
"name": "mentions",
"inputs": {
"users": [
{
"name": "DevOps Team",
"slack_gid": "S0123456789"
}
]
}
}
]
},
{
"name": "teams",
"inputs": {
"url": "{TEAMS_WEBHOOK_URL}"
},
"extensions": [
{
"name": "mentions",
"inputs": {
"users": [
{
"name": "DevOps Team",
"teams_upn": "[email protected]"
}
]
}
}
]
}
]
}
Platform-Specific Output ​
Slack ​
- Individual users:
@username
- User groups:
@team-name
- Special mentions:
@here
,@channel
,@everyone
Microsoft Teams ​
- Users mentioned by UPN with Teams-style notifications
- Proper Teams mention formatting and notifications
Google Chat ​
- Users mentioned by unique ID with Chat-style notifications
Finding User IDs ​
Slack User ID ​
Via Slack App:
- Right-click on user → View profile
- Click "More" → Copy member ID
Via API:
bashcurl -H "Authorization: Bearer your-token" \ "https://slack.com/api/users.list"
Slack Group ID ​
Via Slack App:
- Go to usergroup settings
- Copy the ID from the URL
Via API:
bashcurl -H "Authorization: Bearer your-token" \ "https://slack.com/api/usergroups.list"
Teams UPN ​
The UPN is typically the user's email address in your organization.
Google Chat User ID ​
- Via Google Admin Console:
- Users → Select user → User information
- Copy the unique ID
Best Practices ​
On-Call Management ​
- Use rotation schedules to distribute responsibility
- Enable/disable users based on availability
- Layer different time zones for global coverage
- Test your schedule before deploying to production
Notification Strategy ​
- Mention specific users for critical failures
- Use groups for general awareness
- Avoid @everyone except for critical system-wide issues
- Consider time zones when setting up schedules
Multi-Platform Consistency ​
- Keep user lists synchronized across platforms
- Use consistent naming for users across Teams/Slack
- Test mentions on all configured platforms
- Document your mention strategy for the team
Troubleshooting ​
Common Issues ​
User not mentioned:
- Verify user ID is correct
- Check if user is enabled
- Confirm user is in the workspace
Schedule not working:
- Verify time format (
HH:MM:SS
) - Check timezone settings
- Ensure rotation users are properly configured
- Verify time format (
Group mentions not working:
- Verify group ID is correct
- Check group permissions
- Ensure bot has permission to mention groups
Related Documentation ​
- Extensions Overview - Complete extensions reference
- Configuration Guide - General configuration help