Slash commands are shortcuts you type into the message box, starting with /. Tandem App has a set of built-in commands for everyday things like polls, status and do not disturb, and owners and admins can add custom commands that call your own systems. This guide lists the built-in ones and explains how custom commands work.

Built-in commands

  • /help — lists every command available in your workspace, including custom ones.
  • /shrug — adds ¯\_(ツ)_/¯ to your message.
  • /me is having lunch — says what you're doing, in italics.
  • /poll "Question" "Option 1" "Option 2" — starts a poll. See running polls.
  • /mute and /unmute — mute or unmute the conversation you're in.
  • /dnd 30m, 1h, 2h, 4h, tomorrow or off — pauses notifications, or turns them back on.
  • /status 🌴 On holiday — sets your status, shown next to your name. /status clear removes it.
  • /topic followed by text — sets the channel's description. Only people who manage the channel can do this.

Replies from commands like /help and /dnd are shown only to you. If you want to send a message that genuinely starts with a slash, start it with two: //etc/hosts is sent as /etc/hosts.

Custom slash commands

A custom command sends what someone typed to an address of yours, and shows or posts whatever your system sends back. Typical uses are /deploy staging, /stock SKU-1042 or /oncall.

To add one, as an owner or admin:

  1. Open Apps and workflows in the sidebar.
  2. Under Slash commands, fill in the Command (for example /deploy), an App name, the https Address it calls, and What it does, which is shown in /help.
  3. Click Add command.
  4. Copy the signing secret. It is shown only once.

A custom command can't reuse the name of a built-in one. You can turn a command off and on, or remove it, from the same page.

What your system receives

When someone uses the command, Tandem App sends a POST request with a JSON body containing command, text (whatever was typed after the command), user, channel, workspace and thread_id.

Two headers let you check the request is genuine:

  • X-Tandem-Timestamp — when it was sent.
  • X-Tandem-Signature — sha256= followed by an HMAC-SHA256 of the timestamp, a full stop and the raw body, using your signing secret.

Work out the same signature on your side and reject anything that doesn't match.

Answering

Your system has five seconds to reply.

  • To post a message everyone in the conversation sees, answer with {"text": "Deploying staging now", "response_type": "in_channel"}. It appears under your app's name.
  • To reply only to the person who typed the command, answer with {"text": "…"} or just plain text.
  • Send an empty answer if there's nothing to say.

If your system doesn't answer in time, the person sees a short message saying the command didn't answer.

Related tools

Slash commands act from Tandem App. To post into it from other tools, use an incoming webhook. For simple automations that need no code, use workflows.