Slack modal data update

Hi,

In n8n i’m working on a slack modal with a dropdown, when an option is selected it needs to show a second dropdown underneath the existing one with the child options only corresponding to the first one.

The modal and slack connection works etc.
I have a question if this is possible and/or is there a similar workflow available.

I have tried a lot and i am pretty new to this, also checked the slack documentation with the modal.open/modal.view but nothing seems to work.

Kind regards

Hi @Kevin_de_Groot Welcome! the trick is slack fires a block_actions payload to your interactivity webhook the moment the first dropdown changes — you catch that and call views.update with the new blocks containing the second dropdown filtered by payload.actions[0].selected_option.value.

key bit is dispatch_action: true on the first select — without it slack won’t fire the event, and point your slack app’s Interactivity URL at this webhook.

Thank you very much @achamm for your response!
For me it’s unclear how i catch the data from the first modal into the second modal, i have `dispatch_action: true` like you mentioned.

because i cannot call the same listener twice (gives an error)

Sorry i’m new here so im figuring out how to paste my workflow

EDIT: i think i know what you mean, i am going to try it out in a subflow. Thank you very much

@JohnHalex @achamm thank you it works perfect now!
i had too much subflows in 1 event listener, and i needed to seperate them, thank you!

It works like this now, exactly how i wanted it to work:

Your welcome!