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]>
232 lines
13 KiB
Plaintext
232 lines
13 KiB
Plaintext
---
|
||
title: "Incoming Webhooks"
|
||
---
|
||
<PlanAvailability slug="all-commercial" />
|
||
|
||
**Technical complexity:** [No-code](./faq#no-code)
|
||
|
||
Send or receive real-time data from external tools. Webhooks require minimal coding and are easy to set up with virtually any tool or platform because they use lightweight HTTP POST requests with JSON payloads.
|
||
|
||
Using incoming webhooks in Mattermost requires only basic setup. You generate a webhook URL using the Mattermost interface, then point another service to send data to that address. No coding is required if your external service triggering the events is able to send data via webhooks or HTTP POST requests, which most modern applications and platforms support. Setting this up usually involves pasting the Mattermost webhook URL into the service’s settings and selecting what type of events you want it to send.
|
||
|
||
## Example Use Cases
|
||
|
||
Here are some example use cases for incoming webhooks in Mattermost:
|
||
|
||
**Monitoring alerts**
|
||
|
||
Send real-time alerts from monitoring systems (such as Prometheus or Datadog) into a dedicated Mattermost channel so your team is immediately notified about system issues or downtime.
|
||
|
||
**Build and deployment notifications**
|
||
|
||
Post automated updates from CI/CD pipelines (such as Jenkins or GitLab CI) to a channel, keeping developers informed of build status, test results, and deployment progress.
|
||
|
||
**Customer support updates**
|
||
|
||
Forward new support ticket notifications from systems like Zendesk or ServiceNow into a support channel, ensuring the team can respond quickly to incoming requests.
|
||
|
||
## Create
|
||
|
||
1. In Mattermost, go to **Product Menu \> Integrations**. If you don't have the **Integrations** option, incoming 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 **Incoming Webhooks**.
|
||
|
||
> 
|
||
|
||
3. Select **Add Incoming Webhook**.
|
||
|
||
> 
|
||
|
||
4. Enter a name and description for the webhook, and then select the channel. You can optionally limit bot posts to a specific channel by selecting **Lock to this channel**, or you can allow the webhook to post to any public channel or private channel the incoming webhook creator is a member of. Note that administrators can enforce channel locking for all incoming webhooks through **System Console \> Integrations \> Integration Management**. Select **Save**.
|
||
|
||
> 
|
||
|
||
5\. Select **Done** to confirm. Mattermost generates a unique webhook URL, which will look something like this: `https://your-mattermost-server.com/hooks/xxx-generatedkey-xxx`. Treat this URL as a secret. Anyone who has it will be able to post messages to your Mattermost instance.
|
||
|
||
> 
|
||
|
||
## Use
|
||
|
||
To post a message, your application needs to send an HTTP POST request to the webhook URL with a JSON payload in the request body.
|
||
|
||
``` bash
|
||
curl -i -X POST -H 'Content-Type: application/json' -d '{"text": "Hello, this is some text\nThis is more text. :tada:"}' https://your-mattermost-server.com/hooks/xxx-generatedkey-xxx
|
||
```
|
||
|
||
A successful request will receive an HTTP 200 response with <code>ok</code> in the response body.
|
||
|
||
For compatibility with Slack incoming webhooks, if no `Content-Type` header is set, the request body must be prefixed with `payload=`.
|
||
|
||
### Post Examples
|
||
|
||
Here are some examples of simple messages posted using incoming webhooks:
|
||
|
||
<img src="../images/github-incoming-webhook.png" width="400" alt="Example of a GitHub notification posted to Mattermost using an incoming webhook." />
|
||
|
||
<img src="../images/jira-incoming-webhook.png" width="400" alt="Example of a Jira notification posted to Mattermost using an incoming webhook." />
|
||
|
||
<img src="../images/mattermost-incoming-webhook.png" width="400" alt="Example of a Mattermost notification posted to Mattermost using an incoming webhook." />
|
||
|
||
<img src="../images/fastlane-incoming-webhook.png" width="400" alt="Example of a Fastlane notification posted to Mattermost using an incoming webhook." />
|
||
|
||
<img src="../images/weblate-incoming-webhook.png" width="400" alt="Example of a Weblate notification posted to Mattermost using an incoming webhook." />
|
||
|
||
## Parameters
|
||
|
||
The JSON payload can contain the following parameters:
|
||
|
||
<table>
|
||
<colgroup>
|
||
<col style={{width: '20%'}} />
|
||
<col style={{width: '15%'}} />
|
||
<col style={{width: '65%'}} />
|
||
</colgroup>
|
||
<thead>
|
||
<tr>
|
||
<th>Parameter</th>
|
||
<th>Required</th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td><code>text</code></td>
|
||
<td>Yes (if <code>attachments</code> is not set)</td>
|
||
<td><a href="mm-doc:%2Fend-user-guide%2Fcollaborate%2Fformat-messages">Markdown-formatted</a> message. Use <code>@<username></code>, <code>@channel</code>, and <code>@here</code> for notifications.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>channel</code></td>
|
||
<td>No</td>
|
||
<td>Overrides the default channel. Use the channel's name (e.g., <code>town-square</code>), not the display name. Use <code>@<username></code> to send a Direct Message. The webhook can post to any public channel, and any private channel the creator is a member of.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>username</code></td>
|
||
<td>No</td>
|
||
<td>Overrides the default username. The <a href="mm-ref:administration-guide%2Fconfigure%2Fintegrations-configuration-settings%3Aenable%20integrations%20to%20override%20usernames">Enable integrations to override usernames</a> setting must be enabled.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>icon_url</code></td>
|
||
<td>No</td>
|
||
<td>Overrides the default profile picture URL. The <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> setting must be enabled.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>icon_emoji</code></td>
|
||
<td>No</td>
|
||
<td>Overrides the <code>icon_url</code> with an emoji. Use the emoji name (e.g., <code>:tada:</code>). The <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> setting must be enabled.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>attachments</code></td>
|
||
<td>Yes (if <code>text</code> is not set)</td>
|
||
<td>An array of <a href="https://developers.mattermost.com/integrate/reference/message-attachments/">message attachment</a> objects for richer formatting.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>type</code></td>
|
||
<td>No</td>
|
||
<td>Sets the post type, mainly for use by plugins. If set, must begin with <code>custom_</code>.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>props</code></td>
|
||
<td>No</td>
|
||
<td>A JSON object for storing metadata. The <code>card</code> property can be used to display extra Markdown-formatted text in the post's info panel (RHS). This is available in Mattermost v5.14 and later, and is not yet supported on mobile.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>priority</code></td>
|
||
<td>No</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
|
||
{
|
||
"channel": "town-square",
|
||
"username": "test-automation",
|
||
"icon_url": "https://mattermost.com/wp-content/uploads/2022/02/icon.png",
|
||
"text": "#### Test results for July 27th, 2017\n@channel please review failed tests.\n\n| Component | Tests Run | Tests Failed |\n|:-----------|:-----------:|:-----------------------------------------------|\n| Server | 948 | :white_check_mark: 0 |\n| Web Client | 123 | :warning: 2 [(see details)](https://linktologs) |\n| iOS Client | 78 | :warning: 3 [(see details)](https://linktologs) |"
|
||
}
|
||
```
|
||
|
||
This renders as:
|
||
|
||
<img src="../images/incoming_webhooks_full_example.png" width="400" alt="Example of a webhook post with a custom username, icon, and formatted text." />
|
||
|
||
### Example with Card Prop
|
||
|
||
Using the `card` property inside `props` will display an info icon on the post. Clicking the icon opens the right-hand sidebar to display the content.
|
||
|
||
``` json
|
||
{
|
||
"channel": "town-square",
|
||
"username": "Winning-bot",
|
||
"text": "#### We won a new deal!",
|
||
"props": {
|
||
"card": "Salesforce Opportunity Information:\n\n [Opportunity Name](https://salesforce.com/OPPORTUNITY_ID)\n\n-Salesperson: **Bob McKnight** \n\n Amount: **$300,020.00**"
|
||
}
|
||
}
|
||
```
|
||
|
||

|
||
|
||
## Slack Compatibility
|
||
|
||
Mattermost provides compatibility with Slack's webhook format to make migration easier.
|
||
|
||
### Translating Slack's Data Format
|
||
|
||
Mattermost automatically translates JSON payloads from Slack format:
|
||
|
||
- `[https://mattermost.com/](https://mattermost.com/)` is rendered as a link.
|
||
- `<https://mattermost.com/|Click here>` is rendered as linked text.
|
||
- `<userid>` triggers a user mention.
|
||
- `<!channel>`, `<!here>`, or `<!all>` trigger channel-wide mentions.
|
||
|
||
You can also send a direct message by overriding the channel name with `@username`, e.g., `"channel": "@jim"`.
|
||
|
||
### Using Mattermost Webhooks in GitLab
|
||
|
||
You can use GitLab's built-in Slack integration to send notifications to Mattermost:
|
||
|
||
1. In GitLab, go to **Settings \> Services** and select **Slack**.
|
||
2. Paste the Mattermost incoming webhook URL.
|
||
3. Optionally, set a **Username**. Leave the **Channel** field blank.
|
||
4. Select **Save** and test the integration.
|
||
|
||
### Known Slack Compatibility Issues
|
||
|
||
- Referencing channels using `<#CHANNEL_ID>` is not supported.
|
||
- `<!everyone>` and `<!group>` are not supported.
|
||
- `*bold*` formatting is not supported; use `**bold**` instead.
|
||
- Webhooks cannot send a direct message to the user who created the webhook.
|
||
|
||
## Troubleshooting
|
||
|
||
To debug incoming webhooks, a System Admin can enable **Webhook Debugging** and set the **Console Log Level** to **DEBUG** in **System Console \> Logging**.
|
||
|
||
Common error messages include:
|
||
|
||
- **Couldn't find the channel**: The channel specified in the `channel` parameter does not exist.
|
||
- **Couldn't find the user**: The user specified does not exist.
|
||
- **Unable to parse incoming data**: The JSON payload is malformed.
|
||
|
||
If your integration posts the JSON payload as plain text instead of a rendered message, ensure the request includes the `Content-Type: application/json` header.
|
||
|
||
## Do More with Incoming Webhooks
|
||
|
||
Transform basic message posts into rich, interactive notifications by including buttons, menus, and other interactive elements in your webhook messages, making them more engaging and useful for your team.
|
||
|
||
- [Message Attachments](https://developers.mattermost.com/integrate/reference/message-attachments/): Present rich, structured summaries such as status, priority, fields, links, or images for faster triage and comprehension. (Slack‑compatible schema.)
|
||
- [Interactive Messages](https://developers.mattermost.com/integrate/plugins/interactive-messages): Make notifications actionable with buttons or menus such as Acknowledge, Assign, or Escalate that enable an immediate user response without switching tools or context.
|
||
- [Interactive Dialogs](https://developers.mattermost.com/integrate/plugins/interactive-dialogs/): Guide users to successful outcomes when interactions need structured input or confirmation (for example, “Acknowledge with note” or “Assign to user”). Improve data quality with required fields, minimum/maximum input lengths, server‑driven user/channel pickers, validated defaults, inline field errors, placeholders, and help text that help users enter the right data the first time.
|
||
- [Message Priority](https://developers.mattermost.com/integrate/reference/message-priority/): Set `priority` to elevate critical posts and optionally request acknowledgements or persistent notifications.
|
||
|
||
<Tip>
|
||
|
||
- 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 system later needs to call Mattermost APIs (e.g., post follow-ups, open dialogs), 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.
|
||
|
||
</Tip>
|