Autocomplete user data in Slack commands

Just playing with my first slack team. Is there a way to add user data from an external API to autocomplete. So, what works right now, calls the /assign command plus a weak user (both will be autocomplete, nice!). What I want / need is a list of elements that I would get from a remote endpoint that can be selected by autocomplete.

Is this even possible?

 /assign @userX to [data_by_autocomplete] 

Or I need to solve this by talking completely, for example:

 => /assign user @userX => BOT: Which task? Here is a list: ... => /assign taskY => BOT: Assigned TaskY to @userX 

But this seems very cumbersome (and wrong). So basically I want to get a remote list for autocomplete in the same command.

PS: Command and functionality is a simplified example illustrating the point.

+5
source share
1 answer

No, you cannot use custom autocomplete on the command line, but you can use custom autocomplete with the new interactive message menu .

Therefore, I would suggest dividing it into two steps.

  • Enter a slash command and specify a username
  • Show AutoFill Interactive Menu
+6
source

Source: https://habr.com/ru/post/1267098/


All Articles