Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
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
Solved! Go to the solution
This is an accepted solution.
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!
This is an accepted solution.
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
We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024