iOS Actions

Update: Page was updated on 2014-10-28.


This post will be duplicated as a running page as an archive of my key x-callback-url actions for various iOS apps. Each action has an install link or a text copy of the x-callback-url snippet.

Drafts Actions

Drafts

paste_draft: This action will paste whatever text is in the current note into the clipboard. Install

drafts://x-callback-url/create?text=[[clipboard]]

URL Encode: This action will percent encode the current note.1 Install

drafts://x-callback-url/create?text={{[[draft]]}}

Markdown Email: The Action will create an email, using the note as the basis for the message. The first line of the note will be the email's subject and the rest of the note as the email's body. The action will also process the note for any Markdown markups. This allows the Action to send email with italic or bold text. Install

Dropbox

Prepend Running File: This action will take the text in the note and prepend a file on Dropbox. Each note will include the date and time the note was pretended to the file. Note: This action requires an internet connection to work. Install

Editorial

Note to Uppercase: This is more of an example of the syntax used to call upon Editorial, trigger a workflow inside Editorial, and then return the text output back to a new note in Drafts. In this example the Action will open Editorial, run the UPPERCASE workflow that is saved in Editorial, and return the output to a new note in Drafts. If the UPPPERCASE workflow doesn't exist the process will stop. Install

editorial://?input=[[draft]]&command={{UPPERCASE}}&x-success={{drafts://x-callback-url/create?text=[[output]]}}

Fantastical 2:

Fantastical: This Action takes the first line of a note and parses that in Fantastical 2 as a new event. The Action then takes any remaining text in the Drafts note and adds it to the Notes section of the Fantastical event. Using a line like Remind me to will create a reminder instead. Install

fantastical2://x-callback-url/parse/?sentence=[[line|1]]&notes=[[line|2..]]&add=1&x-source=Drafts&x-success={{drafts://}}&x-cancel={{drafts://}}

OmniFocus

New Task in OmniFocus: The Action will use the first line of a note to create the task description and then use the rest of the note as the task note. Because OmniFocus doesn't support a full x-callback-url, the Action doesn't return you back to Drafts. Install

omnifocus:///add?name=[[title]]&note=[[body]]

OmniFocus Mail Drop: The Email Action will use an OmniFocus maildrop address to send a note in the background to create a new OmniFocus task. Like the previous Action, it will use the first line of the note to create the email subject line, which ends up being the task description in OmniFocus. The rest of the note is used as the email body, which ends up being the task note. Install

Note: This Action requires an internet connection and utilizes Agile Tortoise's email account. Do not use this action for any sensitive information.

TextTool:

All actions listed in this section require the user to have TextTool installed on their iOS device.

Encode Note: The Action will take the text of the note and run it through TextTool's 'Encode' action. The encoded text is then returned to a new note in Drafts. Install

texttool://x-callback-url/transform?text=[[draft]]&method=encode&x-success={{drafts://x-callback-url/create?text=[[output]]}}

Decode Note: This Action will run the note through TextTool's Decode action. After the text is processed it will return the decoded text to a new note in Drafts. Install

texttool://x-callback-url/transform?text=[[draft]]&method=decode&x-success={{drafts://x-callback-url/create?text=[[output]]}}&x-cancel={{drafts://}}

Outlook Regex: This is a very task specific Action, but does a good job showing nested actions using TextTool. The first part of the Action takes a distribution list from Outlook and strips out the email addresses to give just a list of names. From there it passes the text block of names to a second action to split the text block into individual lines. Install

Decoded version to see regex in Action:

texttool://x-callback-url/transform?text=[[draft]]&method=regex&search=(\W\<\w+\.\w+\@\w+\.\w+\>\;)|(\W\<\w+\@\w+\.\w+\>\;)|(\W\<\w+\@\w+\.\w+\>)|(\W\<\w+\.\w+\@\w+\.\w+\>)&replace=|&x-success={{drafts://x-callback-url/create?text=[[output]]&action=Texttool_Outlook_Split}}

Encoded version as used in Drafts:

texttool://x-callback-url/transform?text=[[draft]]&method=regex&search=%28%5CW%5C%3C%5Cw%2B%5C.%5Cw%2B%5C%40%5Cw%2B%5C.%5Cw%2B%5C%3E%5C%3B%29%7C%28%5CW%5C%3C%5Cw%2B%5C%40%5Cw%2B%5C.%5Cw%2B%5C%3E%5C%3B%29%7C%28%5CW%5C%3C%5Cw%2B%5C%40%5Cw%2B%5C.%5Cw%2B%5C%3E%29%7C%28%5CW%5C%3C%5Cw%2B%5C.%5Cw%2B%5C%40%5Cw%2B%5C.%5Cw%2B%5C%3E%29&replace=%7C&x-success={{drafts://x-callback-url/create?text=[[output]]&action=Texttool_Outlook_Split}}

Split Outlook List: This is a second part of the Outlook Regex Action and splits the text block into new lines. Install

texttool://x-callback-url/transform?text=[[draft]]&method=split&delimiter=%7C%20&x-success={{drafts://x-callback-url/create?text=[[output]]}}

Launch Center Pro

All actions listed in this section require the user to have either Launch Center Pro or Launch Center Pro for iPad installed on their iOS device.

Communications Button: This action will creates a button in Launch Center Pro and gives you a series of options to contact someone - telephone, email, iMesage, etc. The action utilizes the list function in LCP.

launch://?url=[list:Sofia|Call iPhone=tel:+628113453018|Call Home=tel:+62315027927|Call Office=tel:+62318431700,21409|Email=mailto:sofia%40gmail.com|iMessage=sms:sofia%40gmail.com|FaceTime=facetime://sofia@gmail.com|FaceTime Audio=facetime-audio://sofia@gmail.com]

Search in Google Chrome: This action will give the use a prompt to enter the text they want to search on and then pass that text to Google Chrome as a search term.

googlechrome://google.com/search?q=Tip%20for%20[prompt-num:Query]

Reference

A lot of the ideas for these actions came from the work of others. This is a running list of informative articles related to x-callback-url schemes.

iOS Automation and Workflows with Drafts - Federico Viticci (@viticci) summary on using URL schemes with Drafts for iOS. Great primer on creating your own actions in Drafts.

Automating iOS: A Comprehensive Guide to URL Schemes and Drafts Actions - Alex Guyot takes Federico's previous article and gives a great background guide on chaining together multiple actions in Drafts.

How the New Line Tag in Drafts 3.0.6 Can Improve Your Existing Workflows - Eric Pramono has quite a few articles on geekswithjuniors site. This post give a good explanation on using the [[line|n]] tag in Drafts.

iOS URL Schemes - Another post by Eric at geekswithjuniors, this is an older post giving some background on iOS URL schemes, aka x-callback-url.


Got any questions? Feel free to hit me up on Twitter at @MyGeekDaddy.


  1. Note: This is my preferred method over other methods listed here. 

Top