One XML file from different API response

I’m looking for a way to create one xml file with products from several API response files (all have the same structure). Is it best to add products from each response API to a google sheet, then combine several sheets into one and generate an xml file from one?
I’ve been using make.com since yesterday, I searched the forum but unfortunately I didn’t find a similar topic. I will be grateful again for your help and guidance.

Yes. You can put all records in Google Sheet and retrieve it as one array or create a Datastore to save all APIs responses too.

Don’t hesitate to contact us if you require further assistance.

Cheers
//HFBR

2 Likes

Thank you, it was helpful.
I managed to create a datastore where products from several API responses go. The last problem I am trying to solve is to generate one xml file containing all products from the datastore. I created a connection (screen), 4 separate xml files were created for 4 products from the data store. How to generate one xml file with 4 products?

I recommend you aggragate to Json => Convert Json to XML

Don’t hesitate to contact us if you require further assistance.

Cheers
//HFBR

1 Like

I have one more question.
After convert Json to XML I encountered a problem, the received XML does not have the structure I need. I would like to receive xml with structure like below:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<offers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<offer>
		<id></id>
		<code></code>
		<name></name>
	</offer>
	<offer>
		<id></id>
		<code></code>
		<name></name>
	</offer>
</offers>

Json to XML block does not have the option of adding an xml schema.

@Rafael7 Use the “Create XML” module and map the structure you want.

1 Like

Or you can create the json with this structure to convert in xml:

{
“offers”: {
“offer”: [
{
“id”: “”,
“code”: “”,
“name”: “”
},
{
“id”: “”,
“code”: “”,
“name”: “”
}
]
}
}

1 Like