0

I want to post an "ephemeral" message to a user after a modal is submitted via a global shortcut. But in Slack, global shortcuts don't have the context of the channel the user had focused when the shortcut was invoked. The API body on the interactivity endpoint doesn't contain any channel information.

Yet there is this example from the Asana shortcut:

Example of Slack ephemeral message from global shortcut

How are they able to respond with an ephemeral message to the channel that the user had focused when they invoked the global shortcut?

devlord
  • 4,054
  • 4
  • 37
  • 55
  • Can you confirm this is a global shortcut and NOT message shortcut? Are there some links/details to elaborate this issue in detail? – Suyash Gaur Jul 23 '21 at 15:43
  • I can confirm this is a global shortcut. The documentation says that doing this is not possible. I have no _other_ links because nothing can be found on Google about how to do this. – devlord Jul 23 '21 at 15:45
  • The other way I can think of is that you have a dedicated channel and you post the ephemeral message to that channel, or DM it to the user directly. – Suyash Gaur Jul 23 '21 at 15:47

1 Answers1

1

As per slack, this functionality may be coming soon:

We are exploring options to add channel context to global shortcut payloads where appropriate, with user opt-in. Please contact us with your desired use case.

https://api.slack.com/interactivity/shortcuts/using#coming-soon

May be they have given early access to Asana, or as mentioned in the comment, they are using some fixed channel work flow.

Suyash Gaur
  • 2,481
  • 2
  • 9
  • 22