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):
- the mentionned people need to be part of the channel which is not possible for admins to be part of every channel
- 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(Redirect)
- support multiple answers from a slash command
[
{
“channel”: “administrators”,
“text”: “User @matthieu.brouillard requested a TODOs admin token.\n###Context:\n- team: Franceid#eesgbz3nbfgj7dcax1zoxh1e6o
\n- channel: Developmentid#ueeop5ssjjromrkem8n4oamy6a
”
},
{
“response_type”: “ephemeral”,
“text”: “Your request has been send to the ~administrators group”
}
]
Of course any other idea is welcome.
Matthieu