Slack ephemeral message

How do I send an ephemeral message response to slack from Rasa? https://api.slack.com/methods/chat.postEphemeral

The Slack channel implementation which is part of Rasa Open Source doesn’t support that.You can either

What’s the use case for the ephemeral? I’m wondering how the bot would decide which response type to choose

The functionality we want is to have a bot listen to a channel and respond directly to that user either on a thread or via ephemeral message. We only want the responses from Rasa to be added to the channel if theyre actually helpful since the channel doesnt solely exist for the rasa bot and there are humans who can handle the question if Rasa is not confident of the answer. So far Ive been playing around with the default slack channel in Rasa and looking at the source code and it looks like a pretty limited implementation. For example, Rasa doesn’t differentiate between users in a channel and just has one conversation ID for everyone so anyone can interrupt the conversation of another user in the channel. So I would also need to figure out how to track each unique user in a channel as a unique conversation id in the tracker. I started my own custom channel using the existing slack.py code as a starting point but the problem is that it relies on the channels/channel.py code which controls what is passed back to send_text_message so I would also need to add custom code to replace the functions in channel.py. Not sure what my question is at this point, I guess its just a lot of work I need to do.

is that it relies on the channels/channel.py code which controls what is passed back to send_text_message so I would also need to add custom code to replace the functions in channel.py.

That shouldn’t be required. E.g. in the current Slack implementation there is a method send_custom_json which sends a JSON to Slack. As your output channel inherits from OutputChannel you could even overwrite send_response which you gives you complete freedom in the implementation.

I’d be curious to see your implementation once it’s done. Maybe we can merge it into rasa or publish it as a separate library :tada: