How to create a flow action endpoint in gadget

https://shopify.dev/docs/apps/build/flow/actions/endpoints#verifying-requests I have a flow action that has to run an api POST endpoint, but when running it it seems like it's not compatible out of the box. Can i configure a route so it will work as a flow endpoint?
No description
6 Replies
Smelvin
Smelvin•2w ago
Hi Thore, would you be able to share your app URL?
thore cardel
thore cardelOP•2w ago
Hi Mark, sure it's themeflow Haven't used the api routes so much. But I just checked in one of my other apps and can see that it doesn't have "/api" in the URL. So maybe it works if I remove that runtime_url = "https://themeflow--development.gadget.app/api/dispatch-workflow" vs runtime_url = "https://themeflow--development.gadget.app/dispatch-workflow"
Smelvin
Smelvin•2w ago
Yeah it should work by removing the /api As well any reply needs to be await-ed
thore cardel
thore cardelOP•2w ago
await reply.code(200).send({
success: true,
result,
});
await reply.code(200).send({
success: true,
result,
});
So like this or something?
Smelvin
Smelvin•2w ago
As well you dont need to use internal on finder unless youre getting encrypted keys
thore cardel
thore cardelOP•2w ago
Ok I'll try it out now then Now it triggers it, thanks 🙂

Did you find this page helpful?