Launchpad Cancel Event: API / Flow Action

Launchpad Cancel Event: API / Flow Action

ap5356
Shopify Partner
8 2 1

It would be great if the ability to cancel a specific Launchpad event was added to the Shopify Flow actions, if you have Launchpad installed. 

 

Otherwise, is there a way to cancel the Launchpad event just through an HTTP request? From a quick peek, the only way to currently do this is from within the Launchpad app itself, and it is protected as the submission is accompanied with a CSRF token.

 

Would be great if we could make a GraphQL Admin API call to cancel the Launchpad event. This would take care of the authentication part, as if someone has Admin API access, they should likely be able to cancel Launchpad events. 

 

Does anyone know a current workaround to this?

Replies 2 (2)

Liam
Shopify Staff
2846 311 811

Would it be possible to use the new Run code flow action for this, or do you need to make an external call?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

ap5356
Shopify Partner
8 2 1

I don't think its possible to use the Run Code flow Action, unless there's a direct built-in library or some additional Flow Action that tells a Launchpad event to cancel. 

The only current support for Launchpad in Flow is the two triggers "Event Started" and "Event Ended". There's nothing to make a call back to Launchpad.

Additionally, as I've done before, I could just use the "Send HTTP Request" Flow Action if the external call was available to be made. I currently do this to make some calls to the Shopify GraphQL Admin API in places where Flow doesn't have any native support for the action I need.

However, I don't believe this is an option either. Currently the only way to cancel a Launchpad event is from within the Launchpad app itself. And I don't believe I can make an HTTP request from the Flow action to Launchpad to cancel the event because the requests Launchpad is making (which I would try and emulate) are including a CSRF token.