Skip to content

Payload mapping

Hooklane preserves the raw received body in payloadJson and can also create a transformed payload for your workflow.

When defining a mapping, select values from:

  • JSON body — values in application/json request bodies.
  • Form data — URL-encoded and multipart form fields.
  • Query parameters — values supplied in the endpoint URL after ?.

Use paths to select nested JSON values. For example, data.customer.email extracts the email from the object below.

{ "data": { "customer": { "email": "buyer@example.com" } } }

Use JSONata to reshape your incoming JSON into the exact structure your Flow expects. A simple expression can select a field:

data.customer.email

Or build a new object and calculate a total:

{
"customerEmail": data.customer.email,
"orderNumber": "#" & data.order.number,
"total": $sum(data.order.items.(price * quantity))
}

For conditional output, use a JSONata conditional expression:

data.order.paid ? "paid" : "pending"

The editor includes a live preview. Paste a representative payload to verify extraction paths and JSONata output before saving. A failed expression is shown in the preview and does not silently alter your production deliveries.