How to create pop-up after slash command triggered on Slack

Hei team,
I have set up a slash command for a Slack bot - thus every time the slash command is triggered on Slack the workflow in n8n starts.
The next step would be to have a pop-up with certain fields (in Slack) when the slash command is triggered in Slack (such as category 1 with 2 options, category 2 with 2 options and so on).
Do you have any recommendations/suggestions on setting this up?

Hi @GabCo, I believe what you’re looking for is a modal. The folks at Slack describe it here on their website, the required request is in section 3 on that page.

The required trigger ID would come through in the body.trigger_id of your webhook node receiving the request from your slash command.

Hi @MutedJam thanks for the reply :slight_smile:
I’ve created the modal, however I cannot make it interact with user’s submission - meaning adding the submit button and go further with the workflow once the information is submitted.
I’ve read I need to use, any idea where exactly that one should be defined?

Hi @GabCo, I am not sure about the next steps here as I’ve never used the Slack modal. So if the Slack documentation is unclear you might want to check this directly with their community or support team.

I suspect you will need to include any data you want to use in the modal (potentially in fields not visible to a user, such as action_id). In order to handle modal actions in n8n you’d then need to set up an additional webhook node receiving the respective POST requests from Slack . It could make sense to create a separate workflow for this step to simplify debugging.

Hei @MutedJam,
Thanks again for the information provided.
I’ve reached out to Slack and here is their reply:

“It’s possible that n8n is only set up to support posting messages rather than using the endpoint. I would recommend reaching out to their support team to clarify that.”

Basically after getting the trigger_id I would need to post it somewhere so that the modal will be seen as modal and not just as a method (as it is seen right now).

I will add shortly here a workflow with the two steps.

Hey @GabCo, n8n supports posting to any URL, including the one documented here on their website. You can simply use this URL in the HTTP Request node.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.