webhook
Add an API call. Multiple webhooks can be chained. The platform tries them in
order, skipping any whose requireArgs are all absent, and the first webhook it
requests decides the result: if that request fails, the
fallback output
is used and no later webhook is tried.
Parameters
method
HTTP method for the request: "GET" or "POST". It is uppercased.
The platform sends GET and POST requests only. A webhook is sent as a POST when
method is "POST" or when it has params, and as a GET otherwise, so "PUT",
"PATCH", and "DELETE" are sent as GET.
url
API endpoint URL. Supports ${variable} substitutions (use ${enc:args.param}
for URL-encoded values).
opts
Optional configuration.
opts.headers
HTTP headers to include in the request.
opts.formParam
Send the JSON body as a single form parameter with this name.
opts.inputArgsAsParams
Merge function arguments into the request parameters automatically.
opts.requireArgs
Skip this webhook, without a request, unless at least one of the listed arguments is present.
Returns
DataMap — Self for method chaining.
Example
Chain webhooks with requireArgs to pick an endpoint by the arguments the caller
gave. A failed request isn’t retried on the next webhook; it gives the fallback
output: