A user is experiencing issues with a Shopify Flow automation designed to send daily emails listing orders unfulfilled for 3+ days. The generated emails contain no order data, displaying only empty fields or garbled text.
Key Issues Identified:
The email body shows reversed/corrupted text instead of actual order information
Variables from the GraphQL query aren’t properly displaying in the email output
User lacks familiarity with Liquid templating syntax
Solutions Provided:
Testing the query: Recommendation to validate the GraphQL query independently using the Shopify GraphiQL app to ensure it returns expected data
Proper variable usage: Guidance to use Liquid syntax within the “Send internal email” action’s subject/body fields to include order details (IDs, dates, fulfillment status)
Code structure: Example provided showing how to iterate through query results once using a for loop, outputting multiple fields per order rather than looping separately for each field
Resolution: The user confirmed the guidance was helpful, realizing their query structure was incorrect—it needs to be formatted as a single main query with sub-queries (similar to SQL joins) rather than separate queries.
Summarized with AI on November 4.
AI used: claude-sonnet-4-5-20250929.
The query I’m using in the ‘get order data’ step is:
created_at:<=‘{{ scheduledAt }}’ AND created_at:>‘{{ scheduledAt | date_minus: “3 days” }}’ AND financial_status:paid AND fulfillment_status:unfulfilled AND test:0 AND closed:0 AND cancelled:0
HI @leon99 I can’t really see from the workflow screenshot but are you including the desired information in the subject or body of the email within the Send internal email step? You can use Liquid to include data that’s available to the workflow in the email, such as a list of order IDs and/or relevant customer contact details.
I’ve added in some of the variables into the message body but they don’t seem to tie together well (so I’ve probably done it wrong) and the resulting emails don’t make sense.
I’m unfamiliar with Liquid, would I be able to write a simple query in that to provide order ID, date, fulfillment status?
First, figure out which fields you’re interested in including the email. You can find all the available fields in the API docs. Once you know that, then you can output the relevant values for each item next to each other by iterating through the list once, rather than iterating through each item multiple times for each field. For example:
{% for getFulfillmentOrderData_item in getFulfillmentOrderData %}
{{getFulfillmentOrderData_item.orderName}}
{{getFulfillmentOrderData_item.status}}
{{getFulfillmentOrderData_item.updatedAt}}
{% endfor %}
You’ll probably want to further modify that to include formatting (eg, as a bulleted list). Here are some other examples of using Liquid in Shopify Flow, in case that’s helpful.
I can now see I was putting the query all wrong and that it needs to be one main query with the sub queries coming off it, sort of like a SQL Query with joins.