Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send a message in a channel "only visible to you"

Tags:

slack-api

I can not see in the slack API documentation the way for a bot to send a message in a channel that response to a user.

The same way slackbot does reply when doing /help.

Anyone can let me know if that is possible?

enter image description here

Notice the "Only visible to you". In the RTM manual they say that the messsage is of the same type as the event message. I don't see any attributes that would say it is visible only to a certain user.

like image 268
mathk Avatar asked Jun 10 '16 14:06

mathk


People also ask

What is ephemeral message in Slack?

Usage info. This method posts an ephemeral message, which is visible only to the assigned user in a specific public channel, private channel, or private conversation. Ephemeral message delivery is not guaranteed — the user must be currently active in Slack and a member of the specified channel .

Can I send an email to a Slack channel?

Click Add to Slack. Next to Post to Channel, click the drop-down menu and select a channel or DM from the list. Click Add Email Integration. Slack will generate a unique email address to send emails to the conversation you specified.

How do I automate messages in Slack?

Schedule a messageClick the compose button or open the conversation where you'd like to send your message. Type your message in the message field. Click the arrow icon to the right of the paper plane icon. Choose a date and time from the list or select Custom time.

How do I forward a message in Slack?

Using the share message icon, you can automatically forward a message to another conversation along with an optional message or note. On your desktop, hover over the message you'd like to share and click the Share message icon on the right.


1 Answers

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

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

(I'm not sure since when)

like image 194
Pangolin Avatar answered Oct 18 '22 21:10

Pangolin