8
votes

I am interested in writing a Slack bot that will periodically send "ephemeral" messages to users. Ephemeral messages are messages that appear within a channel, but can only be seen by a particular user, like the responses to bot "slash commands" (e.g. "/who").

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

  1. appear within the channel message stream (i.e. not in a DM/private message), and
  2. not in response to any slash command.

How do I use the APIs to create ephemeral messages like this?

2

2 Answers

5
votes

Sending private messages with the "Only visible to you" tag is called "ephemeral" and seems to now be possible through the Slack API.

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

(I'm not sure since when, and why it still says "Mid Term" on their roadmap)

0
votes

I was hoping to pull this off as well. On the Slack roadmap, but as a Mid Term (not Near Term) item... https://trello.com/c/Xs12hGkH