Skip to main content
Integrations

Build a bot for your organization

Make an app that posts into channels, replies in threads, and hears new messages.

Written By Katja Danilina

Last updated About 1 month ago

A bot is an app your organization makes. Installed in a workspace, it gets a token. Added to a channel, it can post there and, if you allow it, receive the channel's new messages at a URL you choose. That makes it two-way: a bot can answer a question, react to a deploy message, or keep a thread up to date.

A bot's posts show the app's name with an APP badge, never the name of the person who installed it.

Tip: if you only need to post into one channel, an incoming webhook is simpler.

Make and install a bot

  1. In Settings → Organization → Developer, open the Apps tab and select New app. Give it the name its posts should show. Organization owners and admins can make apps.

  2. Select the app and, under the workspace, choose what it can do: Post messages, and Hear messages if it should receive new messages from its channels. Select Install. Workspace owners and admins can install apps.

  3. Copy the bot token. Mantle shows it only once, so store it right away in your secret manager.

  4. In each channel the bot should use, open the ··· menu, choose Integrations, then Add source, and select the app under Bots.

A bot can only post to, and hear, the channels it has been added to. If you lose the token, open the app on the Developer page and select Rotate token…; the old token stops working at once.

Build it

The bot uses Mantle's API at api.mantle.chat with its token. Message events are signed, so your bot can check that they really came from Mantle.

Full developer guide with examples, events, limits, and errors: https://docs.mantle.chat/integrations/bots