Shopify flow get product data doesn't seem to be working

Topic summary

Problem: A Shopify Flow “Get product data” step returned no products or tags in emails/loops, despite equivalent GraphQL queries working in the Shopify GraphiQL app.

Context: The workflow was triggered on collection creation (as a stand-in for manual trigger). The user tried multiple GraphQL queries (e.g., products(first: 200, query: “tag:subscription-week-2”), sorted lists, and products(first: 1)). Flow emails were empty and a loop-to-tag step processed zero items.

Key clarification: The Flow field accepts only Shopify Query Search Syntax (a search string), not full GraphQL. It corresponds to the GraphQL “query” argument value, not an entire GraphQL query.

Fix: Enter just the search string, e.g., tag:subscription-week-2, in the Flow “Get product data” query field.

Outcome: User confirmed this resolved the issue. Confusion stemmed from examples that appeared to show full GraphQL queries. No further action items; issue resolved.

Notes: Screenshots illustrated queries/results but weren’t necessary to apply the fix.

Summarized with AI on January 24. AI used: gpt-5.

i have a work flow that i want to run where on trigger, it would query all products with a certain tag. to simplify testing, my flow looks like this. since there’s no manual trigger of workflows, i set it up so that on create of a collection, it will query products then send an email with the ids if the queried products

the advanced query looks like this

written out for copy-paste purposes

{
  products(first: 200, query: "tag:subscription-week-2" ) {
    edges {
      node {
        id
        title
        tags
      }
    }
  }
}

i used the Shopify GraphiQL App to test the query above and data is being returned. but when i run my flow, no data is being returned in the email. i simplified my query to then look like this

for copy-paste purposes

{
  products(first: 100, sortKey: CREATED_AT, reverse: true) {
    edges {
      node {
        id
        title
        tags
        createdAt
      }
    }
  }
}

when i tested this in the graphiql app, it returned the products in reverse order of creation but in shopify flow, still no ids in the email being sent

i simplified the query further to look like this

{
  products(first: 1) {
    edges {
      node {
        id
        title
        tags
        createdAt
      }
    }
  }
}

still no email sent with product ids

I set up another workflow that instead of sending an email, it will loop through the products and add a tag. the query is the same as above where it will just query one product and tag it

the result showed that the for loop didn’t process any data. the email was also empty.

i ran the same products(first: 1) query in graphiql and the returned product didn’t have the test-shopify-flow tag. i queried graphiql for products with the test-shopify-flow tag and none were returned

Am i setting up queries correctly because it looks like the get product data action is bugged

thanks

Hi Carl-Mgp,

The field you’re editing is what you’d typically write in the query argument for your first GraphQL example and only works using the Shopify Query Search Syntax. You aren’t able to write full GraphQL queries in that text box.

Using the query value from your first example, you should just need to add tag:subscription-week-2 to get products with that tag.

Hope that helps!

oh i see i will test in a bit but the examples are confusing because they have full graphql queries on the bottom

edit: this was correct. thank you