Integromat can process and create XML files

Ondřej Gazda
The Glue of the Internet
2 min readFeb 21, 2017

We have added a neat feature for working with XML. The XML package lets you process data in XML format so that Integromat can further work with the data content or even create a new XML content.

In order to process data in XML format, Integromat needs to know the structure of XML data. The data structure describes how the XML data is organized and enables to map individual XML nodes to other modules in your scenario. You can define your own data structure, or you can import structure from existing JSON, XML, Form Data or Query String. More information about data structure can be found here.

Parse XML module

By default, Parse XML module will put attributes in a special collection _attributes as a child of the node, that has these attributes. If the node is a text node and it has attributes, then two special properties will be added: _attributes for attributes and _value for the text content of the node.

Example:

<root attr="1">
<node attr="ABC">Hello, World</node>
</root>

Will be parsed as:

{
"root": {
"_attributes": { "attr1": 1 },
"node" : {
"_attributes": { "attr": "ABC" },
"_value": "Hello, World"
}
}
}

Create XML module

If you want to add attributes to a complex node (a node, that will contain other nodes), you have to add a collection with the name _attributes for this node to your custom data structure, and this collection will be mapped to node attributes. If you want to add attributes to a text node (example: <node attr="1">abc</node>), you have to add a collection _attributes for attributes and a text property _value for the node value for this node to your custom data structure.

Example:

{
"name": "node",
"type": "collection",
"spec": [
{
"name": "_attributes",
"type": "collection"
"spec": [
{
"name": "attr1",
"type": "text"
}
]
},
{
"name": "_value",
"type": "text"
}
]
}

You can add our XML modules to any scenario in Integromat and enhance your integrations, if you need XML processing. Let us know at support@integromat.com if you will need any help.

--

--