Pulling data out of an API response used to mean writing JSONPath expressions by hand, or looking up the path to every field you needed. Now you can build custom outputs straight from the response, without writing any code.
How it works
- Configure your API call and run a test. The JSON response appears in the Test Results section.
- Double-click any field in the response. It's added to your Custom Outputs, with the field name and JSONPath expression filled in for you.
- To grab everything at once, click the + icon at the top of the response body. That pulls out every individual value, however deeply it's nested, plus each array as a single output.
- Click Confirm. Your new outputs are ready to use as variables in any downstream work action.
Why it matters
Mapping outputs is faster, and typos in paths stop breaking workflows. Whether a response has five fields or fifty, you can set up your outputs in seconds instead of mapping them one at a time.
For power users
Every generated output is a real, editable JSONPath expression, so you have the full power of JSONPath inside each work action. Use a click to get the right path, then refine it to do more:
- Use a wildcard to collect a value from every item in a list: $.orders
.id
- Pick out an item by position, or take a range: $.items[0], $.items[0:5]
- Use recursive descent to find a field at any depth: $..email
Read the full documentation: https://support.wrk.com/docs/getting-started/building-a-wrkflow/custom-outputs/