Overview
The SOAP Response Parser node is designed to parse JSON strings that represent SOAP responses and transform them into structured data usable within n8n workflows. It extracts the JSON string from a specified input field, parses it, and outputs the parsed objects according to the selected output mode.
This node is beneficial when working with SOAP APIs that return responses as JSON strings embedded in workflow data fields. Instead of manually parsing these strings downstream, this node automates the extraction and structuring process, enabling easier access to individual response elements.
Practical examples:
- Parsing a SOAP API response stored as a JSON string in an incoming webhook payload.
- Extracting multiple records from a SOAP response and creating separate workflow items for each.
- Consolidating parsed SOAP response objects into a single array field for batch processing.
Properties
| Name | Meaning |
|---|---|
| Response Field | The name or expression of the field containing the JSON string to parse (e.g., response or {{ $json.response }}). This field must contain valid JSON text representing the SOAP response. |
| Output Mode | How to handle the parsed data. Options are: - Separate Items: Create separate workflow items for each parsed object. - Array Field: Keep all parsed objects inside a single array field. - First Item Only: Extract only the first item from the parsed array. |
| Parsed Field Name | When using "Array Field" output mode, this defines the name of the field that will hold the array of parsed objects (default: parsedData). |
Output
The node outputs workflow items with a json property containing the parsed SOAP response data:
Separate Items mode: Outputs one item per parsed object. Each item’s JSON contains the parsed object fields plus two additional metadata fields:
_itemIndex: The index of the item within the parsed array._totalItems: Total number of parsed items.
Array Field mode: Outputs a single item whose JSON contains one field (named by the user) holding an array of all parsed objects.
First Item Only mode: Outputs a single item containing only the first parsed object from the array.
If the input JSON string cannot be found or parsed, the node either throws an error or, if configured to continue on failure, outputs an item with an error field describing the issue.
The node does not output binary data.
Dependencies
- No external services or API keys are required.
- The node relies on standard JSON parsing available in JavaScript.
- No special environment variables or n8n configurations are needed beyond typical node setup.
Troubleshooting
- Field not found error: Occurs if the specified response field does not exist in the input data. Ensure the field name or expression correctly points to the JSON string.
- Failed to parse JSON error: Happens if the content of the response field is not valid JSON. Verify that the SOAP response string is properly formatted JSON.
- Unknown output mode error: Indicates an invalid output mode was selected. Use one of the provided options: "separate", "array", or "first".
- If the node is set to continue on failure, errors will be included in the output items under an
errorfield instead of stopping execution.