IntegrationsSelf-hosted chat

Brand mentions in your Mattermost

Mattermost is the chat for teams who host their own, which makes it the one chat provider where FishOut cannot know the host in advance. Everything else follows from that: a system admin has to switch webhooks on, and your server has to be reachable from the public internet.

Every alert channel is on every plan, including Free.

[01] WHAT LANDS THERE/ A CHANNEL

A mention, as it arrives in Mattermost

Rendered by the code that sends it, from a sample Hacker News post. Never the post body.
~brand-watch · Acme

FishOutBOTnow

Reply, carefully: a relevant post on Hacker News

Show HN: An open-source shared inbox for teams of under ten

Relevance 78 · Topic · Neutral · by tamsin_k

Hint: Don't include a link

Labels: Announcement, Comparison

Open in FishOut

[02] CONNECT IT/ SETUP

Point FishOut at a channel

4 steps, a few minutes end to end.
  1. 1

    Have a system admin enable incoming webhooks

    In the System Console, under Integrations → Integration Management, turn on incoming webhooks (EnableIncomingWebhooks). While it is off, every incoming webhook on the server is disabled.

  2. 2

    Create the webhook

    From the product menu choose Integrations → Incoming Webhook → Add Incoming Webhook, give it a name, choose the channel, and Add. Mattermost’s documentation says to treat the URL as a secret.

    webhook url

    https://chat.acmemail.com/hooks/xxxxxxxxxxxxxxxxxxxxxxxxxx
  3. 3

    Paste it into FishOut

    Under Settings → Notifications, add a Mattermost channel and paste the URL. Any HTTPS host is accepted, with the path ending in /hooks/ and the 26-character id; on every send FishOut resolves the hostname and refuses it if any address is private.

  4. 4

    Optionally, let it be called FishOut

    FishOut sends the username FishOut. Mattermost only shows it if “Enable integrations to override usernames” is on; otherwise the post appears under the webhook creator’s name, which works but reads oddly.

Then set the floor

Teams who self-host chat tend to have an engineering-heavy audience, and engineers forgive an alert channel for being quiet much faster than for being noisy. Start at 75, put Hacker News and GitHub in the same channel because the same people read both, and keep the threshold the same on both rather than tuning per source.
Settings · Notifications

Mattermost

https://chat.acmemail.com/…

Healthy

Relevance floor75

Eventsmention.scored
Batch bursts5 min
[03] WHAT IS IN IT/ FIELDS

What Mattermost receives, field by field

Built from the event’s envelope and nothing else, so a retry renders exactly the message the first attempt would have.
Field How
HeadlineShownBold Markdown.
Post titleClippedA Markdown link, clipped at 200 characters, with every control character escaped.
Relevance, subject, sentiment, authorShownOne line, escaped.
Reply hint and labelsShownOne line each.
@channel, @all, @hereNeverEvery @ is broken with a zero-width space, so a title cannot notify a team.
Post bodyNeverNever sent: the envelope does not carry it.
[04] TEN PINGS OR ONE/ DIGEST

A burst arrives as one message

Mattermost batches by default. Here 3 posts were held after the first; they arrive together when the window closes, best first.
~brand-watch · Acme · 5-min digest

FishOutBOT+5m

3 new mentions for AcmeMail

  • Ask HN: Self-hosted alternatives to Notchmail? · Hacker News · 90
  • Running a shared inbox on our own Postfix · Hacker News · 83
  • Show HN: Mail rules as code · Hacker News · 74

Open in FishOut

[05] WHAT WILL BITE YOU/ LIMITS

Mattermost’s rules, and ours

The first three are Mattermost’s, checked against its documentation; the last is a rule FishOut applies to every self-hosted destination. Failures are tracked per channel, so one broken destination never stops the others.

Incoming webhooks are off unless a system admin enables them; when the setting is false, every incoming webhook on the server stops. [source]

Overriding the poster’s username or icon needs two more admin settings, both off by default. Without them a FishOut alert shows under the webhook creator’s name. [source]

A post can hold up to 16,383 characters; longer text is split into several posts. A FishOut alert is a few hundred. [source]

FishOut resolves your hostname on every send and refuses private, loopback and link-local addresses. A Mattermost reachable only over a VPN cannot receive alerts directly. [source]

In the channel’s delivery history
You seeIt meansDo this
destination_not_publicYour server’s hostname resolved to a private address at send time.Expose Mattermost on a public HTTPS address, or use a webhook to a relay you run.
destination_unresolvedThe hostname did not resolve. Retried.Check public DNS for your Mattermost host.
http_403 / http_404Webhooks are disabled on the server, or this one was deleted.Ask the admin to enable them, or create the webhook again.
[06] WHERE MENTIONS COME FROM/ ROUTES
[07] OPEN IN FISHOUT/ THE INBOX

From Mattermost to a drafted reply

“Show HN: An open-source shared inbox for teams of under ten”, open in the inbox. You send the reply; FishOut never posts.
Hacker Newstamsin_k
78

Show HN: An open-source shared inbox for teams of under ten

Reply, carefullyAnnouncementComparisonTopic

Draft reply · Don't include a link

Copy and open threadYou send it

Questions