I have a slack app implemented in node.js where I am dynamically displaying a drop-down menu from an Options Load URL
to a channel on the Slack group.
The drop down is getting displayed correctly based on the options JSON that I am returning form the external URL,
but now the problem is that I need to have separate items in the drop-down menu based on what the user has entered on the slack channel.
For example:
If the user says: give me choices for option 1
: then the value 1
should be passed to the Options Load URL
and the code that I have implemented at that URL will reply with the appropriate JSON based on the input value 1
.
Next, when the User says give me choices for option 2
: then the value 2
should be passed to the Options Load URL
and the code implemented there will reply the options based on the value 2
that it receives.
The code at the Options Load URL
is already implemented. The code for extracting the number 1
or 2
from the user message is also implemented.
The values 1
or 2
... etc. are not constant or fixed. These can by random and the API at Options Load URL
will be able to correctly handle these values.
I just need to figure out a way to send these values to the Options Load URL
somehow.
Is it possible to do this somehow in Slack?