> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clarityq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Connecting Mattermost

> Install the ClarityQ plugin on your Mattermost server so your team can ask questions and get task results in Mattermost.

Connecting Mattermost lets your team ask ClarityQ questions without leaving Mattermost, and lets ClarityQ post task results and agent approval requests in your Mattermost channels. One ClarityQ organization connects to one Mattermost server, and every workspace in that organization can use it.

## Prerequisites

* Admin rights in your ClarityQ organization.
* System Admin rights on your Mattermost server, to install a plugin.
* Mattermost server version **9.5.0** or later.
* A Mattermost **Site URL** that starts with `https://` and can be reached from the internet. ClarityQ sends answers and task results to that address. A server that only has a private address can't receive them.

## Installing the Plugin

**1. Open the Mattermost card**

In ClarityQ, go to **Organization Settings → Integrations**, find the **Mattermost** card, and click **Connect**. The **Connect Mattermost** dialog opens.

**2. Download the ClarityQ plugin**

Click **Download plugin** in the dialog. If the dialog has no download button, ask ClarityQ support for the plugin.

**3. Upload and enable it in Mattermost**

In Mattermost, go to **System Console → Plugins → Plugin Management**, upload the plugin, and enable it.

**4. Paste the two values**

In Mattermost, open **System Console → Plugins → ClarityQ**. Copy the **ClarityQ URL** and the **Plugin key** from the ClarityQ dialog and paste them there.

The plugin key is shown once. Copy it before you click **Done**.

**5. Add the bot**

Add **@clarityq** to a team, and to every channel ClarityQ should post in.

The Mattermost card shows **Waiting for plugin** until the plugin reaches ClarityQ with the key. It then changes to **Connected**.

## Choosing Channels

ClarityQ can post only in channels the **@clarityq** bot is a member of, public or private. Add the bot to a channel before you pick that channel for a task.

The channel list appears when you create or edit a [task](https://docs.clarityq.ai/automations/creating-and-scheduling-tasks.md). If a channel is missing from the list, add the bot to it in Mattermost.

## Reconnecting and Disconnecting

Two actions are available on the Mattermost card once it is connected:

* **Reconnect** creates a new plugin key. The old key stops working right away, and Mattermost can't reach ClarityQ until you paste the new key in **System Console → Plugins → ClarityQ**.
* **Disconnect** stops ClarityQ from answering in Mattermost. Tasks and agents that post to Mattermost stop posting there.

Linked accounts, default workspaces, and existing question threads are kept when you disconnect, so they still work after you connect the same organization again.

## When Things Go Wrong

* **The card stays on "Waiting for plugin".** The plugin has not reached ClarityQ. Check that the plugin is enabled, and that the **ClarityQ URL** and **Plugin key** in the plugin's settings match the values from the dialog. If you lost the key, click **Reconnect** to get a new one.
* **Questions get no answer, or task results don't arrive.** Check the Site URL of your Mattermost server. It must start with `https://` and be reachable from the internet.
* **A channel is missing from the task's channel list.** Add **@clarityq** to that channel.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.