Question

Shopify Line Items to Google Sheet, Quantities in Multiple Columns

  • 29 March 2023
  • 4 replies
  • 195 views

Hey Zapier community,

 

I am using a Shopify > Google Sheets zap to update a fulfillment sheet for one of our vendors. We are using Shopify for purchasing.

 

I am struggling with breaking out line items so they populate different columns in our sheet based on what people order.

 

This is the Google Sheet. You’ll see that highlighted in green are all the products available:

 

For example, when someone orders a Stickers 500, I want the specific quantity ordered of Stickers 500 to appear in that column. But people will order multiple products in one order, so I want it to populate the corresponding column with the corresponding product quantities.

 

Let’s say Order #1117 ordered:

3 - Stickers 500
1 - Long Divider
4 - Price Stands

 

That means I’d want a 3 to appear in the Stickers 500 column, a 1 to appear in the Long Divider column, etc. etc.

 

Is that even possible to do in one line? I wouldn’t be fussed if it had to be done over multiple rows, so long as the Order ID stayed the same.

 

I tried the Formatter to break out the line items, but I can’t get it to parse correctly when going into the Google Sheets (it comes out as 3,1,4 andddd that would only be in one column, not split across multiple).


Thanks!


4 replies

Sorry, update to this. So I got Formatter to work by spitting out multiple rows, but they are all still in the same column. See here:

 

 

Any way to link those quantities to the corresponding product column?

Userlevel 7
Badge +8

Hey there @Brettrl 👋 -

Okay, okay. I think I’m following here.

First things first, can you please add some screenshots of both you trigger and action set ups for you Zap? I’d like to see what can be mapped over without any extra steps. 

We may need to break this down to some more steps or create another Zap to run simultaneously with this one. 

Hi Brettrl, I am having the same issue, have you found a fix for this?

Userlevel 7
Badge +11

Hi friends! 👋
 

Not sure if you solved this yet, @Brettrl? But I came across this post and thought I’d make a suggestion in case you and @Dincer find it useful. 🙂

We have an article in Community that talks about how to extract specific line item values using a Formatter (Numbers > Spreadsheet-Style Formula) action which I think might get you what you’re after here:

I’m thinking you could use that formula to extract the quantities for specific products output into separate fields that you can then select for each of the relevant columns in Google Sheet. Not sure if you’d be able to run it for multiple products in the same formula so you may need a different formula for each specific product.

Alternatively, you could also handle it using a Code by Zapier action, but it’s a bit more advanced so might not be a viable option if you’re not comfortable with Javascript or Python coding.

Hope that helps, if that Formatter action does the trick, or if you’ve found another solution, please let us know!

Reply