# Connecting Mattermost

> Add a bot account, paste its token into Nudge, then match reviewers to Mattermost users.

Mattermost works the same way as Slack: a direct message to the reviewer from your Nudge bot, and a post in the repository’s channel for each new pull request. Mattermost support is in beta. A workspace uses one chat tool, Slack or Mattermost.

## Add a bot and connect it

You need to be a Mattermost system admin and a Nudge admin.

1.  **Create a bot account**
    
    In Mattermost, go to Integrations → **Bot Accounts** and add a bot, for example `nudge`. If Bot Accounts is missing, turn on bot account creation in System Console → Integrations → Bot Accounts. Copy the bot’s access token.
    
2.  **Add the bot to your team**
    
    Add the bot to the team Nudge should use, so it can post in that team’s channels.
    
3.  **Paste it into Nudge**
    
    In Nudge, open **Connections**, choose **Mattermost**, and enter your server URL, the bot’s access token and, optionally, the team.
    

When it connects, Nudge adds its CI and review status icons to your server as custom emoji, so posts show the same small icons as in Slack. With custom emoji turned off, it uses standard emoji instead.

## Matching reviewers to Mattermost users

As with Slack, Nudge links a reviewer to a Mattermost user when their email addresses match. The bot only sees emails if it has the System Admin role or your server shows them (System Console → Site Configuration → Users and Teams → Show Email Address). On **Connections** you can link anyone else by hand.

## How Nudge reaches someone

-   **Linked**: a direct message from the bot.
-   **Not linked**: a reply in the pull request’s thread in the repository’s channel, naming them by their git username.
-   **No channel either**: an email.

Each channel can also get a daily digest of what’s still waiting, at a time you pick.

> **Your server must be reachable**
>
> Nudge posts through your server’s API, so it must be reachable from the internet. To disconnect, disconnect Mattermost on **Connections** and delete the bot’s token.

Next: [How chasing works](https://nudgepr.dev/docs/how-chasing-works).
