Create XML from Google Sheets in a certain xml format

Hello everyone,

I have the following issue. I want to supply an AI with information through a Google Sheets and have it generate a text. This sheet is structured like a data feed. The generation of texts and their association with IDs works well.

However, I am now faced with the problem of generating an XML file from the spreadsheet where the output is located, following a specific XML format.

For clarification, I have 2 workflows. The first for generating the text and to get it into another sheets tab. The second should generate the xml.

My current workflows looks like this:
First workflow:

Second workflow:

However, it only creates the aggregated text and not the XML.

Here is how the XML should look in the end:

And here is how make generates the xml output right now:

Hello again,
after a bit of trying and finding some help in the community I changed the workflow a bit. I’m using now a Aggregator to JSON and a JSON to XML converter.

image

This seems to work better but i still don’t have the right data structure. I’m no developer and have only very rudimentary skills in editing xmls. I also tried to recreate the needed data structure from scratch but there i have the problem that i can’t use “:” or other characters in the name of an array.

So maybe someone can help me to create the right data structure.

Hi :wave:t5:

I believe you could try the combination of the “Array Aggregator” and “XML - Create XML” modules instead.
You can generate the requested XML data structure directly in the XML module (based on the sample XML code) and then select the data structure in the aggregator similarly as in the picture below.




I believe the above logic might help to sort out the issues you encounter.


Cheerio
3 Likes

Thank you very much for your answer!
I was able to solve the problem with your help :slight_smile: