Exporting Fulfilled orders data to google sheets

Topic summary

Exporting fulfilled-order data from Shopify Flow to Google Sheets, with a need to map fields (e.g., Name, Email, Currency, Subtotal, Taxes) similar to the standard orders CSV.

Guidance provided:

  • Use Flow’s “Add a variable” picker to insert the correct Liquid placeholders.
  • Variable names follow the Admin GraphQL API (Order object), so the API docs are the authoritative reference.

Key limitation/clarification:

  • Flow cannot loop over nested lists (e.g., Orders → LineItems), so sending one Google Sheets row per line item using a For Each is not supported. High-frequency row writes could also overwhelm the Sheets API, which is part of why this feature isn’t available.

Recommended approach/workarounds:

  • Prefer streaming per-order updates using the Order trigger and add a row per order, instead of scheduled batch jobs.
  • A third-party tool (Coupler.io) can schedule data refreshes (at least every 15 minutes) but isn’t trigger-based.

Status:

  • Users can proceed with per-order rows and map fields via the variable picker/GraphQL docs. Batch weekly exports with per-line-item rows remain unsupported in Flow. The thread concludes with a plan to switch to the per-order trigger.
Summarized with AI on January 23. AI used: gpt-5.

Hi guys, apologies, i’m a bit new here.

I have set up a flow in shopify flow (on plus) as follows:

[Trigger] when order is fulfilled > [Action] add row to a google sheet.

I’m trying to export shipped order line items data to a google sheet for reporting, but i’m finding it difficult to add the correct variables to reflect a standard orders csv export (e.g. Name, Email, Currency, Subtotal, Taxes etc).

I’ve figured a few variables out (e.g. {{order.name}}), but its a bit trial and error.
Does a reference library of order variables exist? I’ve been using Mark Dunkley’s shopify cheat sheet but can’t find anything relating to order variables.

Any help would be much appreciated. thanks so much,

1 Like

Would also love to know the answer to this! Just getting started with Shopify Flow and I also need to append order variables to different parts of the google sheet, but can’t figure out how to do this.

There is a button to “Add a variable”. Click that and choose the variable. It will insert the proper liquid for that variable. Some things like lineItems require looping so it will insert a loop. If you choose another variable for a lineItem, it will insert another loop, so that point you need to just grab the variable name. One thing to keep in mind is that Flow follows the GraphQL Admin API. So if you look at those docs, the names will be exactly the same.

https://shopify.dev/docs/api/admin-graphql/2023-01/objects/order

Finally, if you are trying to send each line item to a row in sheets, I’d recommend using a For Each loop to loop over the line items and call “Add a row” for each line item

Have you considered using a third-party tool for such tasks? For example, Coupler.io might be a perfect solution for you. The only thing, it wouldn’t work by a trigger (like order fulfillment) but by a schedule: Coupler supports automated data refresh feature that can be set up in a way of custom schedule, so you can choose how often your data should be refreshed (minimum every 15 minutes).

“Finally, if you are trying to send each line item to a row in sheets, I’d recommend using a For Each loop to loop over the line items and call “Add a row” for each line item”

I am trying to do just that (Send each line item to a row in sheets). But when I try to add the “For Each” to loop over the line items, the line items list is not showing up as an option in the flow builder. I would think after I have done the getOrderData, I could add a For Each and it would allow me to select the Line Items to loop over. It is not showing that as an option. Am I missing a step? It would be very helpful to have a flow example of a for each over an order’s line items. I can’t find an example of what the flow should look like.

You cannot loop over nested listed yet (like Orders / LineItems). It also may not be advisable to call an API like that…you could end up calling the Sheets API thousands of times in a very short window (which is one of the reasons we don’t have that feature yet).

OK. I can see that, but then what did you mean by : I’d recommend using a For Each loop to loop over the line items and call “Add a row” for each line item"
I don’t see how to do that in the Flow interface.

If you are using an Order trigger, then you don’t need to loop over Orders.

True. My situation is slightly different. I wanted to use a schedule trigger to pull down all order/line items that occurred in the last week (my volumes are low). I can see how using the order trigger for future orders might work better.

I think it’s better to stream these 1x1 than do them in big batches, as long as the trigger works for you.

Thanks so much! Going to set up the by order flow next