Overview
The SOAP Response Parser node is designed to parse JSON strings that represent SOAP responses and transform them into structured data for use in n8n workflows. It extracts the JSON string from a specified input field, parses it, and outputs the parsed data according to the selected mode.
This node is useful when working with SOAP APIs that return their responses as JSON strings embedded within other data fields. Instead of manually parsing these strings downstream, this node automates the extraction and structuring process, enabling easier manipulation and integration of SOAP response data.
Practical examples:
- Parsing a SOAP API response stored as a JSON string in an incoming webhook payload.
- Extracting individual records from a SOAP response array to process each item separately.
- Aggregating all parsed 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 after JSON parsing. Options: - Separate Items: Create separate output items for each object in the parsed array. - Array Field: Keep all parsed objects inside a single array field. - First Item Only: Extract only the first object 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 is "parsedData". |
Output
The node outputs items with a json property containing the parsed SOAP response data:
- In Separate Items mode, each item corresponds to one object from the parsed array, enriched with
_itemIndex(index of the item) and_totalItems(total number of parsed items). - In Array Field mode, a single item is output with a field named as per the "Parsed Field Name" property containing the entire array of parsed objects.
- In First Item Only mode, a single item is output containing only the first object from the parsed 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 capabilities available in JavaScript.
- No special environment variables or n8n configurations are necessary beyond typical workflow setup.
Troubleshooting
- Field not found error: If the specified "Response Field" does not exist in the input data, the node will throw an error unless "Continue On Fail" is enabled. Verify that the field name or expression correctly points to the JSON string.
- JSON parsing errors: If the content of the "Response Field" is not valid JSON, parsing will fail. Ensure the field contains well-formed JSON text.
- Unknown output mode: An error will occur if an unsupported output mode is specified. Use one of the provided options.
- To resolve errors, check the input data structure and confirm the correctness of the "Response Field" and "Output Mode" settings.