Use JMESPath expressions to map and transform JSON response from webhook action into the desired data structure.
Example of using JMESPath expression in your output attributes mapping Be aware of the following:
If your JMESPath expression is incorrect or points to non-existent fields, the output attribute value will be empty.
If the resulting value of your JMESPath does not match the target attribute type, the attribute value will also be empty.
Resources on JMESPath:
Custom function: json_decode(...)
Webhook V2 supports a custom JMESPath function called json_decode(...).
Use it when an API returns JSON inside a string field and you need to read values from that encoded object.
Without json_decode(...), string fields are treated as plain text and cannot be traversed with dot notation.
Syntax:
You can combine it with normal JMESPath traversal, for example:
If the string is not valid JSON, the result is treated as empty for mapping purposes.
Example: extract values from a JSON-encoded field
Expression:
json_decode(payload).order.tracking.number
Output:
Example: decode and return multiple fields
Expression:
{order_id: json_decode(payload).order.id, order_status: json_decode(payload).order.status}
Output:
Select a Single Field
Access Nested Fields
Expression:
user.profile.location
Output:
Select Multiple Fields
Expression:
{name: name, email: email}
Output:
Select all array element's properties
Expression:
products[*].name
Output:
Filter array by condition
Expression:
items[?inStock == `true`]
Output:
Select root-level array
Use bult-in functions
Expression:
max(products[*].price)
Output:
You can create a from message with dynamic data retrieved from a webhook action. For example:
Expression:
products[*].{key: sku, value: name}
Output:
This can then be used as a data source for your searchable select in a form message.