Mention or push message to another channel from a slash command

In a project (managing tasks/todos per channel) providing mattermost slash command, I would like behind a slash command to be able to:

  • either send a message back to a different channel than the one the slash command was issued from
  • or fire a notification to people belonging to another channel

My need is that, from a given channel in response to a slash command issued in a given channel, I’d like to notify some “admin group” (or list of person) to require them some actions.

This could be achieved by defining a webhook on the “admin” channel ; BUT this solution has several drawbacks the main one being that the server hosting mattermost needs to be visible from the one hosting the slash command code.
If using ‘mention’, as described in the documentation for slash slash-commands (mention-notifications paragraph):

  1. the mentionned people need to be part of the channel which is not possible for admins to be part of every channel
  2. you cannot notify an external channel. @channel notifies the current channel and @town-hall or @other-channel-name does not work

Wouldn’t it be possible to:

  • support to change the destination channel like in incoming webhooks documentation(
  • support multiple answers from a slash command
    “channel”: “administrators”,
    “text”: "User @matthieu.brouillard requested a TODOs admin token.\n###Context:\n- team: France id#eesgbz3nbfgj7dcax1zoxh1e6o\n- channel: Development id#ueeop5ssjjromrkem8n4oamy6a"
    “response_type”: “ephemeral”,
    “text”: “Your request has been send to the ~administrators group”

Of course any other idea is welcome.


1 Like

Hi @McFoggy

Really sorry for the delay here. We discussed this as a team and created two tickets:

  1. Support sending messages to other channels via a slash commands
  2. Support multiple responses

We’d love to get the community’s help adding these two features. If you’re interested, let us know and we’ll guide you through the process.