Default parameters with Flow webhooks don't seem to work the same way as with Script Webhooks #6694
Unanswered
phantomato
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I might be missing something, but it seems like there's no way to have Flow webhooks respect the script's default parameters.
Given this simple script

u/admin2/tsscriptwith a default parameter, I'd like to demonstrate a discrepancy between two cases.Case A: A simple script webhook triggered with and without body parameters:
With body
The function's default
xparameter was overridden from the webhook's body as expected.Without body
Without the body, the function's default
"some cool default value"was used, which was also expected.Case B: A new Flow is being created connecting its
inputinput variable with thetsscriptsxvariable.The


inputvariable is nullable, so it doesn't get converted into an empty string.Running the Flow webhook with the body
Running the Flow webhook without the body
Instead of using the
tsscript's defaultxvalue as in Case A it's now being interpreted asnull.To summarize this, Case A interprets missing variables as undefined and lets Typescript use it's default values, where
Case B interprets missing values as null, making Typescript's default values useless.
Is there any way I can trigger Flow webhooks while keeping Typescripts? default values?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions