PERS Callback icon

PERS Callback

Send callback response to PERS after workflow completion

PERS Callback

AI-generated

Summary

Sends a POST callback to a PERS callback URL reporting the workflow's final status (Success, Failed, Cancelled) with an optional result payload and error message. The URL is taken from the incoming item's JWT payload or from an override.

Inputs

  • status (required) — SUCCESS, FAILED or CANCELLED. Sent as status in the request body. Default SUCCESS.
  • result — JSON output data to store with the webhook execution. A string is parsed as JSON; if parsing fails it is wrapped as {rawValue: ...}. Included as result only if the object has at least one key.
  • errorMessage — Shown only when status is FAILED. Sent as error in the body when non-empty and status is FAILED.
  • options.callbackUrlOverride — Explicit callback URL. If empty, the URL is read from callbackUrl in the JWT payload on the input item.
  • options.jwtPayloadPath — Dot-notation path in the input item JSON to the JWT payload object (default jwtPayload, e.g. body.jwtPayload).
  • options.skipIfNoCallback — Default true. If no callback URL is found, pass the item through with a skip marker instead of throwing an error.
  • options.timeout — Request timeout in milliseconds (default 30000).

Output shape

One output item per input item. On a sent callback: {success, statusCode, callbackUrl, requestBody, response}, where response is the parsed JSON body or raw text.

If no callback URL is found and skipping is enabled, the original item JSON is returned with _persCallback: {skipped: true, reason}. Non-2xx responses throw an error unless Continue On Fail is enabled, in which case success is false and the status code and response are still returned. With Continue On Fail, request or other errors yield {success:false, error} (plus callbackUrl and requestBody for HTTP failures).

Examples

Example 1: Report success at the end of a webhook-triggered PERS workflow, returning computed data.

Status=SUCCESS, Result={{ JSON.stringify($json.output) }}, leave options default so callbackUrl is read from jwtPayload.

Example 2: Report a failure from an error branch.

Status=FAILED, Error Message='Payment lookup failed', Result={}.

Example 3: Post to a fixed callback URL when the JWT payload is nested under the webhook body.

Options: JWT Payload Path=body.jwtPayload, or Callback URL Override set to the URL, Skip If No Callback URL=false.

Links

Discussion