Flow/Get Order Data to exclude Archived orders

Topic summary

Shopify Flow email summary for unfulfilled orders older than 2 days needs to exclude both archived and cancelled orders.

  • The user adapted the template “Send email summary with all unfulfilled orders older than 2 days.” Their Get Order Data query filters by created_at (older than 2 days), fulfillment_status: unfulfilled, and excludes status: cancelled.

  • Problem: archived orders still appear in results because they remain unfulfilled even after being archived. The user wants a filter to exclude archived orders in addition to cancelled.

  • A second participant reports the same issue and asks if a solution was found.

  • Central artifact: the Get Order Data query/code is key to the issue.

Status: No solution or workaround was provided in the thread. The question remains open on how to filter out archived orders in Shopify Flow’s query for this use case.

Summarized with AI on December 11. AI used: gpt-5.

I tried to set up a flow with the template “Send email summary witih all unfulfileld orders older than 2 days”, but I’m trying to exclude archived orders as well as cancelled orders, and I cannot get anything to work. Any help with the code on this would be great. Here is what I currently have for the Get Order Data query:

created_at:<=‘{{ scheduledAt | date_minus: “2 days” }}’ AND fulfillment_status:unfulfilled AND NOT status:cancelled

We have orders where the customer either requested us to remove an item or we refunded it before fulfilling it, so these items are showing as unfullfilled, so we’ve archived them, but they still show up on this flow.

Did you ever find an answer? I have the exact same problem.