Search documentation...

K

Mattermost

Sync your warehouse with Mattermost and push business metrics and user activity data to Mattermost in real-time

Overview

With the Mattermost destination, Hightouch can serve as a notifier for various changes. This is a very flexible integration, but here are a few example use cases:
  1. Notify your customer success teams when product usage for a key account suddenly drops
  2. Notify an account executive when product usage surpasses a certain threshold
  3. Send a daily summary of the number of sign ups, compared to the same day last month
  4. Send a daily summary on the adoption of a core feature

Setup

Use personal access tokens to connect to Mattermost. Check with your Mattermost administrator that personal access tokens are enabled.
  1. In Mattermost, click your icon in the top right and go to Profile to access your personal settings
  2. Click the Security tab in the modal that appears
  3. Click Personal Access Tokens and create the token

Sending Mattermost Messages (Added / Changed / Removed)

Hightouch will not send any messages on the initial run to prevent a flood of messages to your channel. Messages will start after the this initial sync.
Hightouch supports sending messages based on rows that have been added, changed, or removed since the last sync run. Each row is sent as an individual message and can be sent to different channels and templated with Liquid.
Message formatting is best when the following conditions are met:
  1. You want to write a query, and have Hightouch detect the added and removed rows
  2. You want a custom message sent per each added and removed rows

Channel Selection

Hightouch supports both sending messages to a specific channel that the Hightouch bot is part of, or by pulling the channel ID each row. Enable the "Use column" toggle in order to dynamically set the target channel.

Added, Changed, and Removed Messages

Hightouch allows you to template the content you would like to send in your message.
  • When a row is added in your query results, Hightouch will send the row added content.
  • When a row is changed in your query results, Hightouch will send the row changed content.
  • When a row is deleted in your query results, Hightouch will send the row deleted content.
This content can be templated.

Sending Mattermost Messages (All Results)

The batch message mode is similar to the normal message mode, except it sends all rows in the query results rather than only added / changed / removed rows since the last sync.
This mode also allows you to specify how many rows are sent per message, which can range from 1 to 20. With 1 row per message, it would be similar to the message mode, whereas 20 rows per message would be similar to a tabular representation.
This format is good for the following scenarios.
  1. You want to write a query, and have Hightouch push a message containing all rows, formatted as a message, to Mattermost
  2. You don't want Hightouch to detect added and removed rows, but instead want to send all rows on each query run

Channel Selection

The batch message only supports sending your messages to a single channel.
For each message, Hightouch allows setting the header, footer, and row content. Only the row content is required. The row content is repeated per row in the message and has access to the row values via templating.
This content can be templated.

Templating Messages

Liquid Templating

For both the message and batch message modes, Liquid templating is supported. The most important implication of this is that columns from the added or removed row can be accessed as part of the message body. Here is an example message making use of Liquid to insert a column into the message.
User with name {{ row["name"] }} and email {{ row["email"] }} has signed up

Tagging Mattermost Users (@...)

Hightouch supports tagging users by either their Mattermost username (if you have it in your warehouse) or by email.
  • Tagging by username: tag by username by writing <@{{ row["username"] }}> where username is the column that contains the user's Mattermost username, just as using Liquid templating. If the username is a static value, you can write something like <@exampleuser>.
  • Tagging by Email: tag by email by writing <@{{ row["email"] | mattermost_user_lookup }}> where email is the column that contains the user's email used in Mattermost. If the email is a static value, you can write something like <@{{ "example@gmail.com" | mattermost_user_lookup }}>.
To tag by email, we require the permission users:read.email.
By default, Mattermost automatically unfurls (displays a preview) URL links in your messages. To prevent automatic unfurling, surround the URL with backticks, for example:
https://www.hightouch.com/
(Note: The backtick is usually located above the tab key on the left-hand side of the keyboard).

Table

Table formatting sends all of your query results formatted as a text table as messages to Mattermost. This mode is recommended only for small sets of data.
This format is good for the following scenarios.
  1. You want to write a query, and have Hightouch push a message containing all rows, formatted as a table, to Mattermost
  2. You don't want Hightouch to detect added and removed rows, but instead want to send all rows on each query run

Channel Selection

The batch message only supports sending your messages to a single channel.

Using webhooks

If you enable the option to use webhooks for sending messages, ensure the user whose access token was used has permissions to create and get webhooks. Using webhooks allows you to set how the sender is displayed when sending the message. This can be configured with the following fields
NameDescription
Icon Image URLURL of 48x48 image of the icon that you wish to use
Icon EmojiMattermost emoji (e.g. :sweat_smile:), this will overwrite icon image URL
Bot NameDisplay name of bot
(Note: Using webhooks for the CSV mode is not supported since files cannot be uploaded using webhooks)

    Need help?

    Our team is relentlessly focused on your success. We're ready to jump on a call to help unblock you.

    • Connection issues with your data warehouse?
    • Confusing API responses from destination systems?
    • Unsupported destination objects or modes?
    • Help with complex SQL queries?

    or

    Feature Requests?

    If you see something that's missing from our app, let us know and we'll work with you to build it!

    We want to hear your suggestions for new sources, destinations, and other features that would help you activate your data.

On this page

OverviewSetupSending Mattermost Messages (Added / Changed / Removed)Channel SelectionAdded, Changed, and Removed MessagesSending Mattermost Messages (All Results)Channel SelectionHeader, Body, and Footer ContentTemplating MessagesLiquid TemplatingTagging Mattermost Users (@...)Unfurling Links and Blocking UnfurlTableChannel SelectionUsing webhooks

Was this page helpful?