Question

XML code characters being auto-removed when posting to google docs

  • 18 August 2023
  • 2 replies
  • 28 views

Userlevel 1
Badge

I am trying to build an xml document containing customer orders to be automatically sent to my manufacturer.

Orders come in from my online shop (Ecwid platform) in a particular format which needs to be reformatted to a different layout for my manufacturer.

I’ve managed to use the formatting tool to arrange them in the layout that my manufacturer needs.

They require it in a text file attached to an email in xml layout like this (partial example file shown);

 

<?xml version="1.0" encoding="UTF-8"?>

 <Orders>

  <Order>

   <SuppliersCodeForBuyer>HBK</SuppliersCodeForBuyer>

   <Order_Date>2023-08-17 12:40:06 +0000</Order_Date>

   <Order_Number>H009999</Order_Number> 

   <SuppliersCodeForCarrier>Courier</SuppliersCodeForCarrier>

   <Name>Joe Bloggs</Name>

   <AddressLine>1 Any Street</AddressLine>

   <AddressLine>AddrLine2</AddressLine>

   <AddressLine>AddrLine3</AddressLine>

   <City>Anytown</City>

   <County>TheShire</County>

   <Postcode>AA1 12AA</Postcode>

   <Country>GB</Country>

   <Email>email@test-email.com</Email>

   <Mobile>+441234123456</Mobile>

   <Carrier/>

   <Products>

 

I’ve successfully built the formatting steps to build this using the Convert to ASCII formatter step, but when it’s passed to google docs all the XML specific code characters and everything in between such < / > are removed and the following is what is created in the google doc;

HBK

2023-08-17 12:40:06 +0000

H009999

Courier

Joe Bloggs

1 Any Street

AddrLine2

AddrLine3

Anytown

TheShire

AA1 12AA

GB

email@test-email.com

+441234123456

 

As the contents of the google doc require it to contain the XML layout codes, I’m stuck. Anyone have any pointers as to what I’m doing wrong or a fix for this?

 

Thanks in advance.

Simon


 

 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 1
Badge

So the conversion and creation of the text content for the google doc works fine, it’s only when the google doc is created that the xml codes are stripped out. Unfortunately I can’t see any options to tell the google doc creation step to treat the output as just text and not formatting codes.

It should be noted that this is just the start of my zap, further stages will append more xml code into the same google doc based on a looping iteration to handle mutiple product lines in the order.

Userlevel 7
Badge +14

Hi @Crawshs 

Good question.

To help us have enough context, please post detailed screenshots with how your Zap steps are configured.