Skip to content

What it is for

The XML component lets you convert data between JSON and XML in flooows. It is useful when working with systems that only accept or return XML, such as some ERPs, e-invoicing services or SOAP APIs.

The XML component has no triggers: use it as an action inside flows started by other triggers.

Set up the connection

  1. 1No connection is needed: it is a built-in flooows utility.
  2. 2Add a step with "+" and search for XML.
  3. 3Choose Convert JSON to XML, Convert XML to JSON or Create XML.
  4. 4Map the input data and test the step.

Credentials are stored encrypted in your isolated database, in Spain, and are never shown in plain text.

How to use it in a flow

  • Convert XML to JSON: map an API response or file content into "XML"; enable "Keep Leading Zeros" to preserve codes like 00123 and "Ignore Attributes" if you do not need attributes.
  • Convert JSON to XML: pass the object in "JSON" and optionally set the "Attribute field" and "Header".
  • Create XML: gives more control with "Root Element", "List Item Element", "Pretty Print", "Include XML Declaration" and keys for attributes, text or CDATA.
  • Use the result in an HTTP step or save it as a file.

Tips

  • •Shape the object first with Data Mapper so the XML matches the required structure exactly.
  • •Enable "Include XML Declaration" if the target system requires it.
  • •After converting XML to JSON, test the step to see how lists and attributes look before mapping them.

Actions (3)

Operations available as flow steps. Expand each one to see its fields.

Convert JSON to XML3 fields
FieldTypeRequired
JSONJSONYes
Attribute fieldTextNo
HeaderYes / NoNo
Convert XML to JSON3 fields
FieldTypeRequired
XMLLong textYes
Ignore AttributesYes / NoNo
Keep Leading ZerosYes / NoNo
Create XML9 fields
FieldTypeRequired
JSONJSONYes
Root ElementTextNo
List Item ElementTextNo
Pretty PrintYes / NoNo
Include XML DeclarationYes / NoNo
Self-Close Empty ElementsYes / NoNo
Attribute PrefixTextNo
Text KeyTextNo
CDATA KeyTextNo

Common errors

XML parse error

The input is not valid XML; make sure you map the response body, not the whole response.

Leading zeros are lost

Enable "Keep Leading Zeros".

Unwanted element names

Set "Root Element" and "List Item Element" in Create XML.

Field types

"List (from your account)" loads options from your connected account; "Dynamic fields" appear depending on earlier choices; in any field you can insert data from previous steps with the data selector (e.g. {{trigger.email}}). More about data between steps