Skip to main content

I am trying to transform shopify data so that multiple, comma separated values are reformatted as separate rows in a google sheet. 

 

For example a typical order with multiple line items might look like this:

Order Number Line Items Quantity
1001 item 1, item 2, item 3 1,4,1
1002 item 1, item 2 7,1
     

 

I am trying to use the Split Text formatter to out put the following in a google sheet:

 

Order Number Line Items Quantity
1001 item 1 1
1001 item 2 4
1001 item 3 1
1002 item 1  7
1002 item 2 1

 

The closest I’ve gotten is to have the individual items appear on a separate line within the same field. 

 

Any tips, examples, or points in the right direction to address this challenge would be greatly appreciated!

Hi @flowjuggler!

The way you described it, I wasn’t sure if there were multiple orders coming in the same trigger data or if you were giving an example of two different times the Zap would have triggered (once for 1001 and another time for 1002). Assuming you’ve got line items for the things the person bought and the order number would be a separate field (not a line item) here’s how you could do it:

1) Make sure you select this action for Google Sheets:

2) Map the fields like this:

3) You’ll end up with something like this in Google Sheets:

As you’ll notice, the order number is added to each of the rows, while you’ve got one row per line item :)

Would you mind giving that a shot to see if that gets you what you need?


@nicksimard Thank you so very much Nick!  You correctly identified and solved the problem. I hope someday I bump into you at a bar so I can buy you a beer. Until then, enjoy a kitty. :smiley_cat: