{}
symbol to the right of it and then use the text input field, specifying the id.
The text input field is a powerful way to specify the function to call because you can use it to specify the function id via a variable like {{$var['my-function-to-call']}}
and then have the flow dynamically decided which function to call based on that variable.
Allow triggering itself
.
To be clear: even when Allow triggering itself
is false, the function is able to call itself but with the difference that it’ll be monitored and aborted early if it becomes to much.
{{$header.secret}}
is present and, if so, to decode and verify the value based on our custom authentication logic.
We then return data in the format of { "authenticated": false, "error": "missing secret" }
or { "authenticated" true }
so that the parent flow can use a simple If Action to check if authenticated
is true.
Now we have to add the Call Function action to an API route, and since the Functions don’t have access to anything from the parent flow, pass the header secret into the function using { "header-secret": "{{$headers.secret}}" }
and access it from within the function with {{$param['header-secret']}}
.