mirror of
https://github.com/hanzoai/team.git
synced 2026-09-30 01:57:35 +00:00
* docs: resolve cross-file anchor mismatches from RST-to-MDX migration
The Sphinx-to-Docusaurus migration converted `:ref:`/`{ref}` links using
naive text-slugification, so anchors that pointed to headings in a
different file (e.g. release-summary tables linking into their
respective changelog pages) were emitted as same-page fragments and
silently resolved to nothing.
Built a label registry from the original Sphinx `.. _label:` / `(label)=`
targets to recover the true source file for each cross-reference, then
rewrote the affected links to point at the correct file + heading
anchor. Fixes 282 broken cross-file anchors, primarily in the mobile/
desktop/server release-summary pages, plus assorted same-page anchor
mismatches caught by re-auditing after the prior admonition/anchor fix.
* docs: manually resolve remaining anchor mismatches after cross-file audit
Hand-verified fixes for anchors that fuzzy-matching alone couldn't
safely resolve (confirmed against actual heading text/context, and in a
few cases against the original RST source, before applying):
- Typos and dropped words carried over from the original Sphinx docs
(e.g. "bot-acocunts", "auto-follow-all-new-channel-threads" ->
"follow-all-new-channel-threads").
- Sphinx auto-generated duplicate-heading IDs (#id1/#id3/#id4) resolved
to their real target headings.
- Numbered-step TOC links in enterprise-roll-out-checklist.mdx that
dropped the leading "N. " used in the actual heading slugs.
- Push-notification docs pointing at the wrong file entirely
(environment-configuration-settings instead of
push-notification-server-configuration-settings).
- SAML "saml-enterprise" label resolved to its true cross-file target
(authentication-configuration-settings#saml-2-0), recovered from the
original RST label definition that the automated registry missed
because it sat after an RST transition marker.
- sso-saml-technical references converted from broken same-page/
malformed-path anchors to correct page links.
* docs: fix SAML 2.0 anchor slug (saml-2-0 -> saml-20)
github-slugger strips periods rather than hyphenating them, so "SAML
2.0" slugifies to saml-20, not saml-2-0 as previously fixed.
* docs: fix broken path links found during docs/main migration cleanup
* docs: convert div.tab blocks to Docusaurus Tabs/TabItem components
* docs: restore missing Kubernetes deployment architecture diagrams
The RST-to-MDX migration never copied over the AWS/Azure/Oracle
architecture diagrams referenced by the deployment-architecture-at-scale
page, leaving broken images in each Tabs/TabItem.
* docs: fix 7 anchor mismatches from the fragment/heading audit
Covers three root causes from the anchor mismatch breakdown:
- Fragment repeated the target page's own title instead of a real
heading, so the link is simplified to point at the bare page.
- Heading exists verbatim but lives on a sibling settings page
(experimental-configuration-settings, push-notification-server-
configuration-settings) rather than environment-configuration-settings.
- A page path was mistakenly pasted into a same-page #fragment instead
of being used as a real cross-page link.
* docs: fix 8 anchor slugs that were close but didn't match the real heading
Repoints links whose fragment was a plausible guess (typo, reworded
heading, or wrong section) at the actual auto-generated slug of the
target heading, confirmed by inspecting each target page directly.
* docs: merge split Tabs blocks so tabs render horizontally
The div.tab conversion script split some sibling tab groups into
separate single-item Tabs blocks whenever a stray blockquote marker
sat between them, causing them to render stacked instead of as one
horizontal tab bar. Merges the MySQL/PostgreSQL and Team/Enterprise
Edition tab groups back into single Tabs blocks.
* docs: remove Azure tab and restore Kubernetes deploy content
The Mattermost Operator, Azure, and Oracle platform tabs on the
Kubernetes deployment guide were split across two separate Tabs
blocks (rendering stacked instead of as one tab bar) and all three
tab bodies were empty because the migration never flattened the
original RST include directives. Removes the unsupported Azure tab
and restores the Mattermost Operator and Oracle content from the
pre-migration RST sources as a single merged Tabs block.
* addresscoderabbitreview
* docs: unify Linux/Kubernetes/Containers deploy pages and fix FIPS/STIG placement
Kubernetes and Containers duplicated full install content across a top-level
page (Tabs) and orphaned sidebar subpages that nothing linked to. Reworked
both to follow the Linux page's pattern: shared content on the landing page,
platform-specific instructions live once in their own subpage.
Also removed configure-fips-at-install-time.mdx, which claimed FIPS is
available for native Linux installs — FIPS/STIG in Mattermost is a container
image property (Chainguard-based build), not available outside Docker/
Kubernetes. Consolidated all FIPS/STIG references onto
containers/fips-stig.mdx and pointed the Mattermost Operator subpage (not
Oracle OKE, which doesn't expose image selection) at it.
* docs: fix review findings — image alt text, Important callout markup, typo
- Replace generic alt="image" on scaling diagrams with descriptive text
identifying cloud provider and user scale.
- Convert raw div.important markup in deploy-containers.mdx to the
repo's <Important> component, matching usage elsewhere in the file.
- Fix "Matermost" typo in manage-your-display-options.mdx.
---------
Co-authored-by: Hanzo Dev <[email protected]>
243 lines
12 KiB
Plaintext
243 lines
12 KiB
Plaintext
---
|
|
title: "Outgoing Webhooks"
|
|
---
|
|
<PlanAvailability slug="all-commercial" />
|
|
|
|
**Technical complexity:** [Low-code](./faq#low-code)
|
|
|
|
Outgoing webhooks can be used to create rich, interactive experiences in Mattermost by letting external services respond with rich message attachments, such as structured fields, buttons, and menus. Additionally, these responses can trigger interactive dialog forms where users provide additional input directly in Mattermost, or interactive messages that update dynamically based on user actions. Together, these capabilities turn simple keyword triggers into powerful in-product workflows that streamline how teams interact with external systems, all with minimal coding required.
|
|
|
|
Outgoing webhooks require no coding to configure on in Mattermost, however the external service that receives the HTTP POST request needs to process the data, and then format and send a respond with a message back to Mattermost. This usually requires light coding to parse the request and format a JSON response payload, though many [automation platforms](/integrations-guide/integrations-guide-index#build-and-automate-workflows) handle this without writing custom code.
|
|
|
|
Learn more about [outgoing webhooks](/integrations-guide/outgoing-webhooks).
|
|
|
|
## Example Use Cases
|
|
|
|
Here are some example use cases for outgoing webhooks in Mattermost:
|
|
|
|
**Issue tracking integration**
|
|
|
|
When a user types `bug` in a channel, an outgoing webhook sends the message to an external service that parses the details and responds with an interactive dialog in Mattermost. The user can enter fields like priority, description, and assignee, and submitting the dialog automatically creates a ticket in your ticketing software.
|
|
|
|
**Knowledge base lookup**
|
|
|
|
A keyword like `docs` triggers an outgoing webhook that queries a documentation service and returns a rich interactive message with a list of suggested articles, each with clickable buttons or menus. Users can refine their search or open links without leaving Mattermost.
|
|
|
|
**Security incident enrichment**
|
|
|
|
Typing a keyword like `ioc` (indicator of compromise) in a security channel can trigger an outgoing webhook that queries a threat intelligence platform. The response can return a formatted message attachment with reputation scores, related incidents, and quick-action buttons for escalating, investigating, or dismissing the alert.
|
|
|
|
## Create
|
|
|
|
1. In Mattermost, go to **Product Menu \> Integrations**. If you don't have the **Integrations** option, outgoing webhooks may not be enabled on your Mattermost server or may be disabled for non-admins. A System Admin can enable them from **System Console \> Integrations \> Integration Management**.
|
|
|
|
> 
|
|
|
|
2. From the Integrations page, select **Outgoing Webhooks**.
|
|
|
|
> 
|
|
|
|
3. Select **Add Outgoing Webhook**.
|
|
|
|
> 
|
|
|
|
4. Enter a name and description for the webhook.
|
|
5. Specify the **Content Type** for the request.
|
|
|
|
> - `application/json` will send a JSON object.
|
|
> - `application/x-www-form-urlencoded` will encode the parameters in the URL.
|
|
|
|
6. Specify a **Channel** and/or one or more **Trigger Words**.
|
|
|
|
> - If you specify a channel, the webhook will only fire for messages in that channel.
|
|
> - If you specify trigger words, the webhook will only fire when a message starts with one of those words.
|
|
> - If both are specified, the message must match both conditions.
|
|
> - If you leave the channel blank, the webhook will listen to all public channels in your team.
|
|
> - If you leave the trigger words blank, the webhook will respond to all messages in the selected channel.
|
|
>
|
|
> 
|
|
|
|
7. Set one or more **Callback URLs** that the HTTP POST requests will be sent to. Select **Save**.
|
|
|
|
> 
|
|
|
|
8. Copy the **Token** value. This token is used to verify that the requests are coming from Mattermost.
|
|
|
|

|
|
|
|
## Use
|
|
|
|
When a message triggers the webhook, Mattermost will send an HTTP POST request to the callback URL(s) you specified.
|
|
|
|
### Request Payload
|
|
|
|
The request body will contain the following data (either as JSON or URL-encoded, depending on the content type you selected):
|
|
|
|
<table>
|
|
<colgroup>
|
|
<col style={{width: '25%'}} />
|
|
<col style={{width: '75%'}} />
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th>Parameter</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>token</code></td>
|
|
<td>The token generated when you created the webhook.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>team_id</code></td>
|
|
<td>The ID of the team the message was posted in.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>team_domain</code></td>
|
|
<td>The domain of the team.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>channel_id</code></td>
|
|
<td>The ID of the channel the message was posted in.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>channel_name</code></td>
|
|
<td>The name of the channel.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>timestamp</code></td>
|
|
<td>The time the message was posted.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>user_id</code></td>
|
|
<td>The ID of the user who posted the message.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>user_name</code></td>
|
|
<td>The username of the user who posted the message.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>post_id</code></td>
|
|
<td>The ID of the post.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>text</code></td>
|
|
<td>The full text of the message.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>trigger_word</code></td>
|
|
<td>The trigger word that was matched.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
Your application should validate the `token` to ensure the request is from Mattermost.
|
|
|
|
### Response Payload
|
|
|
|
Your application can respond to the POST request with a JSON object to post a message back to Mattermost.
|
|
|
|
``` json
|
|
{
|
|
"text": "| Component | Tests Run | Tests Failed |\n|:-----------|:----------|:-------------|\n| Server | 948 | :white_check_mark: 0 |"
|
|
}
|
|
```
|
|
|
|
This would render in Mattermost as:
|
|
|
|

|
|
|
|
## Response Parameters
|
|
|
|
The JSON response can contain the following parameters:
|
|
|
|
<table>
|
|
<colgroup>
|
|
<col style={{width: '20%'}} />
|
|
<col style={{width: '80%'}} />
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th>Parameter</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>text</code></td>
|
|
<td>(Required if <code>attachments</code> is not set) <a href="mm-doc:%2Fend-user-guide%2Fcollaborate%2Fformat-messages">Markdown-formatted</a> message.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>response_type</code></td>
|
|
<td>Set to <code>comment</code> to reply to the message that triggered the webhook. Defaults to <code>post</code>, which creates a new message.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>username</code></td>
|
|
<td>Overrides the default username. Requires <a href="mm-ref:administration-guide%2Fconfigure%2Fintegrations-configuration-settings%3Aenable%20integrations%20to%20override%20usernames">Enable integrations to override usernames</a> to be enabled.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>icon_url</code></td>
|
|
<td>Overrides the default profile picture. Requires <a href="mm-ref:administration-guide%2Fconfigure%2Fintegrations-configuration-settings%3Aenable%20integrations%20to%20override%20profile%20picture%20icons">Enable integrations to override profile picture icons</a> to be enabled.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>attachments</code></td>
|
|
<td>(Required if <code>text</code> is not set) An array of <a href="https://developers.mattermost.com/integrate/reference/message-attachments/">message attachment</a> objects.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>type</code></td>
|
|
<td>Sets the post type, mainly for plugins. If set, must begin with <code>custom_</code>.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>props</code></td>
|
|
<td>A JSON object for storing metadata.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>priority</code></td>
|
|
<td>Sets the priority of the message. See <a href="https://developers.mattermost.com/integrate/reference/message-priority/">message priorities</a>.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
### Example with Parameters
|
|
|
|
``` json
|
|
{
|
|
"response_type": "comment",
|
|
"username": "test-automation",
|
|
"icon_url": "https://mattermost.com/wp-content/uploads/2022/02/icon.png",
|
|
"text": "#### Test results for July 27th, 2017\n@channel here are the requested test results.",
|
|
"props": {
|
|
"test_data": {
|
|
"server": 948,
|
|
"web": 123,
|
|
"ios": 78
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
This response would produce a threaded reply to the original message that triggered the webhook.
|
|
|
|
<img src="../images/outgoing_webhooks_full_example.png" width="400" alt="Example of a full response from an outgoing webhook." />
|
|
|
|
You can also include [message attachments](https://developers.mattermost.com/integrate/reference/message-attachments/) and [interactive messages](https://developers.mattermost.com/integrate/plugins/interactive-messages/) in your response to create more advanced workflows.
|
|
|
|
## Do More with Outgoing Webhooks
|
|
|
|
Turn keyword-triggered callbacks into guided, in-channel workflows by returning buttons, menus, and other interactive elements in your webhook responses so users can act immediately.
|
|
|
|
- [Message Attachments](https://developers.mattermost.com/integrate/reference/message-attachments/): Return rich, structured results (IDs, statuses, fields, links, images) for quick confirmation and follow-up.
|
|
- [Interactive Messages](https://developers.mattermost.com/integrate/plugins/interactive-messages/): Present next-step actions (Acknowledge, Assign, Escalate) as buttons/menus directly in your response—no context switching.
|
|
- [Interactive Dialogs](https://developers.mattermost.com/integrate/plugins/interactive-dialogs/): When a button/menu click requires more info (e.g., “Acknowledge with note”, “Assign to user”), open a dialog to collect structured inputs with required fields, min/max lengths, server-driven user/channel pickers, validated defaults, inline field errors, placeholders, and help text.
|
|
- [Message Priority](https://developers.mattermost.com/integrate/reference/message-priority/): Include `priority` in your response to mark critical updates and optionally request acknowledgements or persistent notifications.
|
|
|
|
<Note>
|
|
|
|
- Outgoing webhook responses support attachments and interactive actions. When a user clicks an action, your integration receives a signed trigger ID and can open an interactive dialog via the dialog API. You can also control visibility with the response type (in-channel vs ephemeral).
|
|
- Need a dedicated identity, permissions scoping, or need to post outside of webhook/command flows? Use a [bot account](https://developers.mattermost.com/integrate/reference/bot-accounts/) if you need a more permanent solution than using overrides for simple branding.
|
|
- If your command backend needs to call Mattermost APIs (e.g., posting messages, ephemeral posts, opening interactive dialogs, etc.), authenticate with a bot user [personal access token](https://developers.mattermost.com/integrate/reference/personal-access-token/). We recommend avoiding human/System Admin personal access tokens for automations and rotating and storing tokens securely.
|
|
- Looking to support private channels, direct messages, and autocomplete? Use a [built-in slash command](/integrations-guide/built-in-slash-commands), or create a [custom slash command](https://developers.mattermost.com/integrate/slash-commands/custom/). You can additionally tegrate Mattermost with custom integrations hosted within your internal OAuth infrastructure [using the Client Credentials OAuth 2.0 grant type](https://developers.mattermost.com/integrate/slash-commands/outgoing-oauth-connections/). Mattermost also makes it easy to [migrate integrations written for Slack to Mattermost](https://developers.mattermost.com/integrate/slash-commands/slack/).
|
|
|
|
</Note>
|