Bridges

For the full list of available bridges and to get help, join #bridges:mbot.ethz.ch. New bridges and updates will be posted in this room.

Webhooks (slack-compatible)

The source code for the bridge is available at turt2live/matrix-appservice-webhooks on Github.

Creating a webhook for your room

  1. Invite webhook (@_webhook:mbot.ethz.ch) to your unencrypted room.
  2. Send the message !webhook
  3. The bridge will send you a URL to use in a private chat alongside simple instructions on how to use it.

Manually send via HTTP POST

Example payload (displayName and avatarUrl are optional):

{"text":"Hello world!","format":"plain","displayName":"Grafana Alert","avatarUrl":"https://grafana.phys.ethz.ch/public/img/apple-touch-icon.png"}

Example using httpie:

http POST "<url>" <<<'<payload>'

Example using curl:

curl --header "Content-Type: application/json" --data '<payload>' "<url>"

Send alerts from Grafana

  1. Create a new notification channel for the room: Alerting > Notification channels
  2. Select Type: Slack
  3. Paste the url received from the bridge bot into the Url field
  4. Disable Notification settings > Include image
  5. Optional: Set Optional Slack settings > Username to Grafana Alert
  6. Optional: Set a Matrix profile picture for the webhook user with a manual HTTP POST using the same username (see above)

Connecting a Slack-compatible application to Matrix

Many apps have options for entering a Slack webhook URL so they can post to your Slack channel. These apps often work with the webhooks bridge too, giving them the ability to post into your Matrix room. Where possible, we recommend using any built-in Matrix support your application may have and only using this as a last resort.

  1. Create a webhook using the above instructions.
  2. Enter the URL into your application for the "Inbound Slack Webhook URL"
  3. Give it a test.

Slack

Talk to rda in #bridges:mbot.ethz.ch if you want to bridge your Slack channels to Matrix. Our integration manager does currently not support bridge provisioning.

A fully functioning bridge can be tested in #isg-slack-bridge:phys.ethz.ch.