Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple parameters in slacks slash command with Zapier

I have a slash command in slack calling into a zapier webhook.

The sample command I've setup is:

/todo [Title] [User]

In Zapier, there is an attribute called text in the incoming webhook that maps [Title] [User] as a string value. The problem is that I want to be able to get access to individual variables and not just a text string representing the entire command.

Is there a way in Slack to split variables such that I can map [Title] to a Title form attribute in the POST command and likewise the [User] to a User attribute?

If not, is it possible to do string parsing / string index in Zapier?

like image 955
Nick Avatar asked Oct 20 '22 03:10

Nick


1 Answers

After reading an article on Zapier for Named Variables, I figured that I had to modify the command format in slack to the following:

/todo title(Item title) assigned(User Name)

Then, Zapier started to show variable names Title and Assigned in the action field.

like image 167
Nick Avatar answered Nov 15 '22 06:11

Nick