Templates / Convert an XML file to JSON via webhook call

Convert an XML file to JSON via webhook call

Ready for 3.0

by n8n Team ✓ · 4,852 views · created 2024-04-09 · Document Extraction

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 9 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Slack.

How it runs

Trigger: When an HTTP POST request hits its webhook URL.

  1. Switch: routes items into 3 branches
  2. Extract from File: extracts data from a file (xml)
  3. Change Field (Edit Fields (Set)): sets 1 field: xml
  4. Already JSON (Edit Fields (Set)): sets or maps fields
  5. Error Response (Respond to Webhook): sends the response back to the webhook caller
  6. XML: converts between XML and JSON
  7. Success Response (Respond to Webhook): sends the response back to the webhook caller
  8. Send to Error Channel (Slack): uses Slack

Services it uses

Slack

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (7)

From the author

Who this template is for This template is for everyone who needs to work with XML data a lot and wants to convert it to JSON instead. Use case Many products still work with XML files as their main language. Unfortunately, not every software still supports…

Excerpt from n8n Team's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.