Feature Request: API Trigger Optional Variables

Hey Folks,
It would be super cool if we could add optional inputs to the Webhook trigger. This would allow me to extend a workflow (I want to add an automated decision based on the value of a boolean passed to the webhook) while still remaining backwards compatible with current integrations.

Ideally, there would be an “optional” checkbox when creating webhook inputs, and a field that allows me to specify the default value to use if the field is not present.

I’ll pass this on to the internal teams for consideration. I like the idea of default values, so we’ll see where that goes.

However, there’s a couple of ways to do this. You can create an artifact and dynamically set it contents, or you could do a decision step.

So right after your API trigger, create an artifact that has something like this in it:

{{#if ["Test Trigger"].[Message]}}
{{["Test Trigger"].[Message]}}
A default value

Test Trigger in this case is an API trigger, and it’s set up with Message as string variable.

If Message has anything in it, the contents of the artifact will now be that variable.

If it doesn’t, you end up with the default value.

You can then call it later like

{{[“Artifact Name”].[content]"}}


You can do something like this (note the decision step called “A join example”:

I configured the decision like this:

Then when you rejoin at the bottom define the default.

1 Like