Tutorial: Designing an x-callback-url Action with x-cancel Parameter

When we design an x-callback-url action, we tend to focus on the x-success parameter because we want to get more things done. Yet, when we use these actions, especially the ones that involve two or more chained actions, sometimes we feel the need to cancel the first task and either return to the original app or continue with the second task. Either way, based on our most frequent use cases, we may need to revisit these chained actions and redesign them to include the x-cancel parameter.

This diagram shows how the inter-app routing of Fantastical and Clear action chain.

Cancel and Return

For example, in one of my earlier workflows, I share an action that allows you to add an event in Fantastical and a task item in Clear with a single post in Drafts. When I use it on a regular basis, I often find myself cancelling the event and want to return to Drafts. Either because I want to cancel the intent altogether or because there's a major change I need to make on the entire command structure that I prefer to restart it in Drafts. There has never been a case where I want to cancel the event, but continue to add the task item in Clear.

For this purpose, it's more appropriate if I design the action to return to Drafts on cancellation:


Open this link if you want it installed on your iOS device automatically.

This diagram shows how the inter-app routing of Chrome, Missives and Instapaper action chain.

Cancel and Continue

For this purpose, I will use another workflow I previously shared. It's an action that allows you to share an article from Chrome to a pre-defined group of contacts using Missives, save it on Instapaper and return to Chrome.

Sometimes, I may choose not to send the email, but save it to Instapaper and return to Chrome. Other times, I may choose not to save it to Instapaper, but still want to return to Chrome. Essentially, what I want is to be able to cancel the current task and continue to the next task in chain, regardless whether it's a new app or it's the source app. Hence, I updated my previous action to include these cancel conditions:


Open this link if you want it installed on your iOS device automatically.

You don't need to modify the Chrome bookmarklet because it is invoking a custom URL action in Drafts named "Mail, Instapaper and Chrome". Simply by updating the action to the new version, the bookmarklet will work as expected, i.e. with all the above cancel conditions.


Most of the times, when we design a chain of actions, we don't have a full knowledge of how we're going to use it on a regular basis. Hence, it may not be practical to design the x-cancel parameters from the start, yet it should not hinder us from revisiting the action and adding the x-cancel parameters. Hopefully, after using the action multiple times, we're already familiar with which cancel route we want for each x-callback-url invocation.

To find my other workflows, please visit my Productivity and Workflows blog.