Slack Slash Commands

Starting version 6.3.0, Metric Insights supports new interaction events triggered by slash commands.

Old- vs. New-Style Commands

Here’s the table of supported commands:

!command /command
!sync /sync
!version /version
!tags /tags
!check /check
!config /config
!stats /stats
!access /access
!help /help
!mute /mute_chatbot
!unmute /unmute_chatbot
!search -

NOTE: /mute and /search are already resolved by Slack.

Creating Command

To support the command, it has to be created.

Here are the basic instructions on how to create a command:

  1. Access the app editor on the Slash Commands tab at https://api.slack.com/apps/<your-app-id>/slash-commands
  2. Click [Create new command]
  3. In the following popup, provide the command name from the table above
  4. Set the request URL to https://<bot-url>$config[“url_path”]/command for each command,
    • where $config[“url_path”] = value of the “url_path” config variable
    • For example, if url_path does not exist or is empty, and the bot DNS name is mi-examle.com, the URL would be https://mi-example.com/command. Respectively, if url_path = /slack, the URL would be https://mi-example.com/slack/command.

5. Provide the description and usage hint

6. Save and reinstall the bot to the workspace