Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
I'm not experienced with API at all before this but I'm trying to make flow create a collection when a product quantity is changed (a pretty common trigger for me). The flow is getting stuck (not erroring) returning:
Did this...
Send HTTP request
Jan 20, 2023 at 06:15 PMRetrying
Devs told me to use Send HTTP Request to call this API: https://shopify.dev/api/admin-graphql/2023-01/mutations/collectionCreate so I entered that as the The URL of the HTTP request.
My headers are:
Content-Type:application/json
X-Shopify-Access-Token:[hidden]
(I got the token from a private app I created with access to read/write products)
The body is:
mutation { collectionCreateV2(input: { title: "{{product.vendor}}", handle: "{{ product.vendor | downcase | replace: ' ', '-' | remove: '(' | remove: ')' | strip_html }}", ruleSet: { appliedDisjunctively: false, rules: [ { column: "VENDOR", relation: "CONTAINS", condition: "{{product.vendor}}" } ] }, sortOrder: "CREATED_AT_DESC" }, query: "title:{{product.vendor}} AND handle:{{ product.vendor | downcase | replace: ' ', '-' | remove: '(' | remove: ')' | strip_html }}") { collection { id title handle } } }
Any idea's what might be wrong? I've relied almost entirely on chatGPT to get this far!
It's retrying because you got a 500 type message (but will eventually fail with an informative error message). If that is the URL you are using, then you have the wrong URL as a start. I think there are also multiple things wrong in your query, but to be honest this is like trying to fix a car that has all the wrong parts already. I'd recommend when testing an API, you start with an API client like Postman or Insomnia and get the query working. Then you port that over to Flow. And start small by using the smallest number of fields and build on complexity from there.
Thanks. I changed the URL to https://further-records.myshopify.com/admin/api/2023-01/graphql.json and also tried https://further-records.myshopify.com/admin/api/graphql.json
Both returned 400 errors. I've tried a very simple "create-test-collection" to those URLs too but no luck (with either Flow or Postman).
mutation {
collectionCreate(input: {
title: "Test Collection",
handle: "test-collection"
}) {
collection {
id
title
handle
}
}
}
EDIT> Sent a GET request to those URLs and got 404 on both. So I guess either the URL is wrong or I'm not correctly authenticated to access it.
EDIT2> Managed to get a 200 response with a query. Making progress!
EDIT3> Test Collection & Test Collection 2 created. So far no luck with the automated ones.
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025