How to send periodic ephemeral ("hidden") messages from Slack Bot

I am interested in writing a Slack bot that will periodically send “ephemeral” messages to users. Ephemeral messages are messages that appear on the channel, but can only be visible to a specific user, for example responses to the “slash command” bot (for example, “/ who”).

The goals here, however, are to make ephemeral messages sent periodically by the bot, and:

  • displayed in the channel message stream (i.e. not in the DM / private message) and
  • not in response to any slash command.

How to use the API to create ephemeral messages like this?

+7
slack-api slack
source share
3 answers

This is currently not possible. Ephemeral messages can only be sent in response to a slash command. Therefore, if you want to send a personal message to the user, it will have to come through a direct message.

+4
source share

Sending private messages with the tag "Only visible to you" is called "ephemeral", and now this is possible thanks to the Slack API.

https://api.slack.com/methods/chat.postEphemeral

(I'm not sure from when and why he still says “Average Term” on their roadmap )

+2
source share

I also hoped to take it off. On the Slack Roadmap, but as an “Average Term” (no closer to the end) ... https://trello.com/c/Xs12hGkH

0
source share

All Articles