JSON parser
How-to7 minExpert
Before you start
A JSON parser reads JSON text and makes its fields available to the steps below. Use it when a webhook sends an order, or a field holds a reply you saved earlier.
When should I use the JSON parser?
Section titled “When should I use the JSON parser?”Use it for JSON you already have. If you are calling another system, a REST API step reads the reply for you with the same shape builder. For CSV files, use the CSV parser.
Add a JSON parser
Section titled “Add a JSON parser”- Click + and choose JSON parser. It sits in the Data group.
- Under Read, choose The data the webhook sent or A value. For a value, insert the field that holds the JSON text.
- Under Its shape, click Add a field for each piece you need, or open Paste a sample and click Build the fields from it.
- Under Result, type a name in Name it.
Read chooses where the JSON text comes from.
Its shape lists the fields to keep, with a type for each.
Name it names the result for the steps below.
What do the settings do?
Section titled “What do the settings do?”| Setting | What it does |
|---|---|
| The data the webhook sent | Reads the body of the webhook that started the workflow |
| A value | Reads JSON text from a field or a result |
| Its shape | The fields to keep. Types: Text, Number, Decimal, Date, Yes/No, Object, List of objects, List of values |
| Paste a sample | Paste an example, click Build the fields from it. Objects and lists are picked up |
| Name it | The name later steps use for the result |
Under the shape, a short table shows how later steps reach each kind of field in Insert data.
Worked example: read a vendor webhook
Section titled “Worked example: read a vendor webhook”A vendor portal posts a bid as JSON to Nour’s webhook workflow. She chooses The data the webhook sent, pastes a sample bid and clicks Build the fields from it. She names the result bid. A later Record manager reads bid › Amount.
What should I watch for?
Section titled “What should I watch for?”- The text must be one JSON object.
- Use the Number type only for fields that hold numbers.
- A list of plain values arrives as rows with one field named after the list. In a Loop, each round’s value is Current item › the list’s name.
- An object’s fields arrive as
parent_fieldon the record, and as a one-row list.