XML to JSON Data Transformation - n8n Workflow

Convert complex XML payloads into standard JSON format quickly and reliably using this efficient n8n workflow template. Ideal for legacy system integration.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Developers who frequently integrate modern applications with legacy systems that output XML.
Technical users looking for reliable data transformation n8n templates.


  • System administrators who need to standardize data formats (e.g., converting SAP IDOC or EDI XML data) before database insertion.

Overview

Integrating disparate systems often involves handling various data formats. Many enterprise and legacy platforms still output critical information in XML. Before this data can be easily consumed by modern REST APIs, databases, or client-side applications, it must be converted to JSON. This specific n8n workflow demonstrates how simple it is to use the dedicated XML n8n node to perform this complex conversion instantly. Using this n8n template streamlines data pipelines, reducing the need for custom coding and ensuring reliable data processing within your overall n8n workflow environment.

How it Works

This automation follows a straightforward three-step process designed for testing data transformation:


  1. Initiation: The n8n workflow starts via the 'On clicking 'execute'' manual n8n trigger, which is perfect for development and testing environments.

  2. Data Input: The 'Set' n8n node is executed next. This node simulates receiving an XML payload by defining a variable named xml containing sample XML data. This acts as the source data input for the subsequent conversion step.

  3. Transformation: The core 'XML' n8n node receives the input data. This n8n node processes the XML string defined in the xml property, performing the necessary parsing and structuring to output a clean, usable JSON object. This resulting JSON can then be utilized by any subsequent n8n node in your expanded n8n workflow.

Installation Guide

To start using this n8n workflow template:


  1. Import: Copy the provided JSON code.

  2. Open n8n: In your n8n instance, click 'New' and select 'Import from JSON'. Paste the copied code.

  3. Review: Review the 'Set' n8n node to understand the sample XML structure being used.

  4. Execute: Since this is a manual n8n trigger, you can click 'Execute Workflow' or click the 'Execute Node' button on the 'On clicking 'execute'' n8n trigger to run the transformation immediately. The output in the 'XML' n8n node will display the resulting JSON data.

Node Details

On clicking 'execute' (Manual Trigger): The essential n8n trigger that initiates the workflow for manual testing and deployment.
Set n8n node: Used here to mock the incoming data stream. Function: Defines a variable named xml which holds the raw XML string that needs processing. Key Configuration: keepOnlySet is enabled to ensure only the necessary XML payload continues down the n8n workflow path.


  • XML n8n node: The primary data transformation component. Function: Converts the string found in the xml property into a structured JSON object. Key Configuration: dataPropertyName is explicitly set to xml to target the input field containing the XML data.

Related n8n Workflows

Free

Nodes: 3 Nodes
Updated: December 26 2025
View all
Created by
mail
mail

Featured*