Can I use dynamic response options for ChatOps interactive messages?

Instead of static options, I would like to use a list of strings I got from a prior step as response options in the Slack interactive message.
Is this somehow possible?

image

I know the Button Text doesn’t have a var selector option, but have you tried just copy-pasting a var in there to see if it works? It is an option for the Confirmation Message.

example

Hi Holly!
I didn’t, because I don’t just want the Button to have a variable name I want to create the buttons dynamically.

For example if you received a list of assets and want to offer to show more details:
[“asset1”,“asset2”,“asset3”]

Now I just want to select this list/array to automatically create 3 buttons with the appropriate names.
And if there are only 2 assets, then only 2 buttons…

1 Like

Hmm, so I don’t think there’s a great way to do that right now because of how the Response Options are setup (eg, having to manually add and configure each individual one).

I know there’s a max of 5 you can configure, so initially I was thinking you could just have something like {{["Get Results"].[results][0]}} and manually specify the index for each one, but I think that’ll break since there’s no way of knowing your list length.

I just confirmed with the team that this doesn’t exist right now, but I’ll submit an idea for it so we can keep track of it!

1 Like