Search code examples
slackslack-apipickerslash

In Slack, is it possible for an app to respond to a slash command by displaying a picker popup?


As example, let's say I wanted to write an app such that when the user types /movie in a channel, a list of popular movies is shown, the user selects one, and as a result a link to that movie in IMDB is inserted into the channel as text. Is something like that possible?

Many thanks.


Solution

  • That's possible! A slash command is the vessel for further interactivity. You can have your slash command trigger a modal (https://api.slack.com/surfaces/modals).Your modal would offer a list of options and once the user submits, your app will be notified with a view_submission payload. You can test modal payloads using the Block Kit Builder which includes options to list items.