Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
I can easily create a custom trigger but I can't figure out how to test it once it has been created. I have tried multiple variations of using the flowTriggerReceive mutation on the GraphQL API but nothing is working.
Following the documentation, I tried the unstable API version where you pass in handle and payload. But I received an error saying that the handle was invalid. Then I tried the 2023-07 API version where you pass the trigger_id and properties. But then I got an error saying that the trigger_id was invalid. Additionally, if I create the extension using the CLI, it seems that I don't have access to the trigger_id. I have doubled checked the handles and trigger_id (where available). I have also published the extensions and made them available in my development store. I can't think of anything else to try.
I have been going in circles for days over this and I can't seem to find consistent documentation. Can someone please help?
Hi, sorry about that. I would stick with the newer API as it's the path going forward anyway.
For the trigger to work, I think you need the following to be true:
You may have also run into a current limitation with handles in that you cannot change them after a certain point.
Any thoughts based on that? If not, it might help to share your TOML file with us, as well as the API mutation you are sending. You can also use flow-connectors-dev@shopify.com if you need to keep some details private.
Thank you for your response. If I created the app in the Shopify Partner Site, and I ALSO have an API key from the store Admin, can I use the Admin API? Or do I have to use oauth to validate?
Hello,
Can you confirm that the following is true?
Do I have that right?
Thank you!
Hi there - sorry for the late reply. What you have there is right - you can then call the Admin API with the access token sent to your server during app installation.
Thanks,
Ryan
I call from postman mutation flowTriggerReceive($body: String!) but return
If you are calling from Postman and got that error most likely you have the right trigger_id but the wrong API key.
Do you mean X-Shopify-Access-Token? I have used this access-token for other apis and it still works fine.
Any luck with this - getting the same error
I get the same error for our app and we have used the correct API key and trigger id
Just to confirm, you are using the result of OAuth authentication as the value for the `X-Shopify-Access-Token` key for both 1. the app that the Flow trigger extension belongs to and 2. the shop that the token was generated for?
In my case, the issue was that the client that I was working with did not have Shopify plus. So even though it worked in my test store, it did not work on the live store due to the client not having a shopify plus account. I did not get any error message. I just eventually figured it out after several days of trying.
I fixed it, you have to use token from partner (custom app) instead token shopify.
Yes, I am using the admin API access token. What I found out is that the flow created via extensions doesn't work yet. We need to make this via the app portal only, and once we release them seems to work.
In order to build a Flow trigger you must call the API with the token provided to your app via OAuth and not another token. For example, if you are working with a merchant, you cannot create merchant custom app and use that token.
Assuming you have the right token, to Alicianu's point, to create a Trigger or Action for all merchant plans you must use a listed or unlisted public app. If your app is a partner "custom" (meant for 1:1 partner to merchant), it is currently only enabled for Plus merchants.
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024