Platforms: Slack

Slack bots allow people and teams who use Slack to make their experience on Slack more useful, customized, and even fun (no guarantees on the fun). Follow the step-by-step instructions found on the Platform configuration page to get started with deploying and launching your Slack bot, and take a look below for some detailed descriptions on concepts.

Your Dexter Bots Only Respond If They Are @-Mentioned

We also think it's pretty annoying when bots interrupt your team's message flow unprompted. If you want to respond with something silly to any keyword in Slack, consider a Slackbot response instead.

Interactive Messages

Slack attachments can include buttons and other interactive menus that lead to more dynamic actions when interacted with. This is needed for usage with buttons in the ^template() and the ^buttonsSlack() shortcodes.

Slack Attachment with Interactive Buttons

In order to make sure that these buttons respond to clicked actions, you must follow these steps to prepare your Slack app:

  1. Venture to the Apps page for Slack and find the App associated with your bot.
  2. In the Interactive Messages section to the left, include the Event Subscription Request URL from your bot page to your left in the text field for Request URL.
  3. Tap Save Changes.

Slack Interactive Messages

User Names

The _userFirstName, _userLastName, and _userFullName namespace variables are automatically populated from the Slack user profile.

+ hello
- Hi <get _userFirstName>! Thanks for messaging me.

Mentioning Other Users In Slack

To have your bot @-mention other people inside of Slack, you can use special syntax:

+ meeting time
- <!here> it's time for our weekly meeting!
+ [*] welcome [*]
- let's all welcome our new teammate <@danny>!
+ coffee time
- <!channel> who wants coffee?


How come my Slack bot doesn't unfurl my media messages?

Slack controls whether or not to expand a link, so sometimes if that link has been displayed recently, or is on a blacklist for your team, it won't expand. Learn more about unfurling on Slack here.

How do I talk to my Slack bot after deploying?

There's a few ways to talk to your bot:

Not Responsive

If your bot is on your team but isn't responding to your script, check the following: