Google sheets/woocommerce: How do I correctly map Variation1 and Variation2 from line item meta?

Can you share a screenshot of your output bundle from the iterator? I need to see what the meta_data array actually looks like — specifically how many entries show up and what the key names are.

Hey!

Is this what youre looking for? (Non IT person here)

It only shows one cariation no matter what I do.

Hey, thanks for the screenshot. I need to see the output from the WooCommerce - Watch Orders module — the raw data before it gets to the iterator.

Run the scenario once, then click the bubble showed in my screenshot, then expand the output section and look for meta_data. Send me a screenshot of that, I need to see if WooCommerce is actually sending multiple attributes or just size. If I have this I can fix the issue for you

Hiya, this is what I see. There is no other meta data in this list.

There literary is, you have 18 items I side in the specified order. You can use the order index to get the specific values you need.

Yay, I think I found what you’re asking for (I hope)

This order successfully pulled out the three variations. Size, Print and Garment. Now how do I put this on my sheet?

I tried this code:

{{get(map(1.lineItems[].meta_data; “value”; “key”; “size”); 1)}}

Butit gave me a blank field on excel

Thanks for the screenshot, try this:

Column H (Size): {{first(map(8.meta_data; "value"; "key"; "size"))}}

Column I (Color): {{first(map(8.meta_data; "value"; "key"; "print"))}}

What this does: map() searches through the meta_data array for the entry where key equals “size” (or “print”), and returns its value. first() grabs the result since map() technically returns an array.

This should works when an order has multiple products because the iterator splits each line item into its own bundle, so the Google Sheets module runs once per product. Each run only sees the meta_data for that specific product, so you’ll get one row per product with the right size and color.

Let me know if it works

Hello!
Its still not working :frowning:

Got blank field

Map the actual output of the iterator instead of 8.meta_data

When a label is white like that, that means make couldn’t find it and you have to map it directly from the mapping panel

YES! That worked! Thank you so much! I’ve been trying to solve this for a long time now. My wokflow is finally flawless. Thank you again!