Overview
This node parses JSON strings from SOAP responses and transforms them into structured data for use in n8n workflows. It is useful when working with SOAP APIs that return complex nested JSON as string fields, allowing you to convert these strings into usable JSON objects or arrays.
Common scenarios include:
- Extracting multiple records from a SOAP response and processing each record individually.
- Keeping all parsed objects grouped in an array field for further batch processing.
- Quickly accessing only the first item from a parsed array when only one result is needed.
Practical examples:
- Parsing a SOAP response containing a list of orders and creating separate workflow items for each order.
- Storing all parsed customer details in a single array field for aggregation or filtering.
- Extracting the first error message or status object from a SOAP response array.
Properties
| Name | Meaning |
|---|---|
| Response Field | The name or expression of the field containing the JSON string to parse (e.g., response). |
| Output Mode | How to handle the parsed data: - Separate Items: Create separate items for each parsed object. - Array Field: Keep parsed objects inside a single array field. - First Item Only: Extract only the first item from the parsed array. |
| Parsed Field Name | (Only for "Array Field" mode) The name of the field where the parsed array will be stored. |
Output
The output consists of JSON objects derived from parsing the specified JSON string field:
- Separate Items: Outputs one item per parsed object, each enriched with
_itemIndex(index within the parsed array) and_totalItems(total number of parsed objects). - Array Field: Outputs a single item with a field (name configurable) containing the entire parsed array.
- First Item Only: Outputs a single item containing only the first parsed object.
If parsing fails or the specified field is missing, the output may contain an error field describing the issue (if "Continue On Fail" is enabled).
No binary data output is produced by this node.
Dependencies
- No external services or API keys are required.
- The node depends on receiving input data containing a field with a JSON string to parse.
- No special environment variables or credentials are necessary.
Troubleshooting
- Field Not Found Error: If the specified response field does not exist in the input data, the node throws an error unless "Continue On Fail" is enabled. Verify the field name or expression matches the input data structure.
- JSON Parse Errors: If the content of the response field is not valid JSON, parsing will fail. Ensure the field contains properly formatted JSON strings.
- Unknown Output Mode: An error occurs if an unsupported output mode is selected. Use one of the provided options.
- To avoid workflow failures, enable "Continue On Fail" to capture errors in output items instead of stopping execution.