8 Reasons to Love Drafts 4

In less than 48 hours ago, Drafts 4 was released. It's a major update released as a separate app. I'd suggest you read Alex Guyot's excellent review in MacStories. He covered many things that highlight why Drafts 4 is such a great update.

To keep my review brief, I'd also suggest you to read the official release notes. It should give you an overview of all the new things in Drafts 4. I will briefly mention some of my favorite additions that I won't cover in details here:

  • Markdown syntax highlighting
  • New Markdown processor tag: %%...%%
  • Access to all iOS fonts, including the user-installed ones
  • Arrange mode a la Phraseology
  • Version history for modifications that allows you to rollback to a particular version
  • Location tracking for notes creation and modification - which is also accessible via the new tags: [[longitude]], [[latitude]], [[created_longitude]], [[created_latitude]], [[modified_longitude]], and [[modified_latitude]]
  • iCloud/CloudKit sync covering both drafts and actions
  • Sort notes by last accessed date, created date, or modified date
  • Track the geo-locations for each note
  • Deeper integration with Evernote by generating raw ENML markup
  • The new dark theme
  • iOS 8 Today's View widget
  • iOS 8 Document Picker which allows you to pick documents from Dropbox, iCloud, and other providers (e.g. Box)

With those out of the way, I will now focus on the ones that I will cover in more details.

Watch video showing how to migrate to Drafts 4 on Vimeo

1. Easy Migration Path from Drafts 3

Because Drafts 4 is released as a separate app, it can co-exist with Drafts 3.5. And, I believe this arrangement makes it easy for existing users to migrate their notes and custom actions to the new version.

First, you need to have both apps installed on your device. Then, you can export all or some of your notes. Because Drafts 4 uses Flagged instead of Pinned to keep things more akin to typical email clients, all your pinned notes in Drafts 3 will be exported as flagged notes in Drafts 4.

You can also choose to export all of your custom actions in a single move or export them one at a time - according to your needs. Based on my experience, the migration is really seamless. Nevertheless, make sure you read the full guide before you start the migration.

2. Better Organization for Custom Actions

In previous versions, custom actions are grouped into four groups labeled I, II, III, and IV. In Drafts 4, you can create your own groups. And, you can put an action in more than one groups.

The All group contains all the actions you have created and/or installed. Unlike its previous versions, you can delete the default actions that come pre-built within Drafts 4. You can always install them from the official Action Directory when you need them.

Drafts 4 allows you to set colored icons to make it easier to find and group your actions. One thing that you need to keep in mind: actions are no longer managed inside the Settings menu. Instead, they are managed directly within the action list. Swiping left lets you edit the action while swiping right lets you delete it. And, to create a new one, you need to tap the + button near the Search Action field.

3. Easier to Capture Text with iOS 8 Sharing Extension

Drafts 4 puts the new features in iOS 8 to a great use. With its sharing extension, it's now easier to capture text from other apps that support the iOS share sheet. For example, you can capture a web page in Safari and create a new draft containing the page title, URL, and even the text you select. You can even customize this template and add your own information at runtime.

The new draft will be added the next time you open Drafts. So, you can capture as many texts as you want without having to worry about losing them.

This sharing extension works for web pages, URL, and plain text. For example, you can use it to capture the current episode of a podcast you're listening in Overcast, the URL scheme for a 1Password credential that you want to share with a colleague, or any text from apps that support the iOS share sheet.

Watch video on creating your first action on Vimeo

4. Exposing the UUID for Drafts notes

Drafts is well known for its simplicity in taking notes. A note in Drafts doesn't have any title. Drafts seems to have an internal UUID that it uses to manage the notes.

In the new version, Drafts allows you to gain access to this UUID. Now, it's possible for us to create a permanent link to a note within Drafts and share it with other apps. You can use the new [[draft_open_url]] tag to create an x-drafts4:// URL scheme to open the note, or use the new [[uuid]] tag and append it to any URL you like.

Drafts 4 registers two new URL schemes: drafts4:// and x-drafts4://. They work interchangeably. And, they are different from the previous URL scheme: drafts://. Exporting your Drafts 3 actions to Drafts 4 will automatically change these references - alongside other changes.

Because notes are now accessible through their UUIDs, it makes sense now to directly manipulate the notes inside Drafts - similar to how you would manipulate notes/files inside Dropbox and Evernote. That's why Drafts 4 supports four new URL Schemes that are related to direct manipulation of Drafts notes. They are /open, /get, /prepend, and /append. They are quite straightforward too.

This feature enables us to use Drafts as a local storage for a running list. My definition of a running list is a list that you append and open every once in a while.

For example, I use it to keep my prayers list. I set up a Launch Center Pro action to quickly append a new prayer to the list. And, I also set up a reminder in Due to open the prayers in the morning.

You can also use this as a simple shopping list. Set up a Launch Center Pro action to quickly append a new item to the list. And, set up a reminder in Due or Fantastical to open the list for the occasion.

Here's an action in Drafts 4 that you can use to create an Append action in Launch Center Pro using the current note's [[uuid]]:

Open this link to install this action on your iOS device.

And, here's the action that I use to create a reminder in Due to open the list at any given date/time. For example, you can use Pray at 6 AM or Grocery on Fri 5 PM as the note's [[title]].

Open this link to install this action on your iOS device.

5. Run Actions without Creating/Opening a Note

In my usage of Drafts' previous versions, I often find myself creating a new dummy note as a way to execute an action stored in Drafts - and immediately discard the note upon execution. Now, Drafts 4 allows you to run actions without the need to create/open a note. This allows you to keep your notes list clear from dummy notes. Here's the syntax of the new URL Scheme:


The text argument is optional. If you specify its value, Drafts will use it as an input, but will not create a new note for it.

I use this feature to open the clipboard's text in iOS apps that don't support URL Scheme nor the new iOS 8 sharing extension. Using Drafts' built-in Open In... action, I can open any text in the clipboard to apps such as iAWriter Pro. Drafts will automatically create a temporary plain text file, using the current timestamp as its name, and transfer it to any apps that listen to plain text file.

Open this link to install this action on your iOS device.

6. Easier to Create Multi-Step Actions

Over a year ago, I wrote an article on how to chain any combination of built-in Drafts actions without writing new custom actions. I use the [[line|..]] range tags to send the same information through several built-in actions, such as Tweet, Post to Facebook, Post to Google+, Message, and Email.

Drafts 4 makes this use case even easier. All the custom actions in Drafts 4 are multi-step actions. Hence, without the need to know how to write the correct x-callback-url, you can chain several built-in actions. Here are some of the action steps currently supported in Drafts 4:

  1. Clipboard: replaces/appends/prepends text to clipboard
  2. Email: similar to Email Action in Drafts 3
  3. Message: similar to Message Action in Drafts 3
  4. Share: allows other iOS 8 sharing extensions to capture and process the text
  5. Social: triggers iOS Share Sheet including Twitter, Facebook, Sina Weibo
  6. Open In: exports to a plain text file (named [[time]].txt by default) and opens it in another app that listens to plain text data
  7. Event: adds a new entry in Calendar
  8. Reminder/List in Reminders: exchange data with Reminder app
  9. Twitter/Facebook/Google+: posts into these social networks without showing the iOS Share Sheet
  10. Dropbox/Evernote/Google Drive: uses each provider's native API/SDK to manage stored information
  11. HTML Preview: uses the new Markdown and CSS processor in Drafts 4 to preview the text in HTML format
  12. URL: uses the old-fashioned URL Scheme and x-callback-url as the last step of the multi-step action

For more information about these action steps, please refer to the official documentation here.

You can combine these actions in any order and as many as you need. For example, here's an action that I created to cross post [[draft]] to Twitter and Facebook.

This new approach is much more powerful than the hack I created last year. You're not limited to processing the same set of information across the multiple steps.

For example, I created an action that uses the quotes captured using Drafts 4's new Sharing Extension, tweets it, and saves it in Quotebook. Based on the default Web Capture Template settings in Drafts, I enclose the [[selection]] with double quotes, embed the [[URL]] and a #quote hashtag into the tweet template. And then, I use Quotebook's URL Scheme to save the quote and its source into the app.

Open this link to install this action on your iOS device.

7. JavaScript Action Steps and Custom Tags

One of the most interesting additions in Drafts 4 is its ability to run JavaScript as action steps. Even though it's not a full fledged scripting environment, it's still a very powerful tool - made available for iOS automation geeks.

JavaScript is great for text/date manipulation and math computation. It also allows us to perform if and for logic. It even includes the ability to perform regular expression search and replace.

Drafts 4 allows you to define a block of JavaScript code to be executed as one of the action steps. It can be executed at the start, in the middle, or at the end of the action. Hence, it needs to find a way to communicate with the other action steps.

First, you can have access to note's content via the draft object. You can make changes to the note by invoking commit(draft). You can also have access to the clipboard, showing alert messages, and even stop the entire chain of actions if a condition is met.

Then, you can pass information to the next step by changing the draft.content. You can also pass them in the form of custom tags. These custom tags act as variables which hold the values for the next step to evaluate. Hence, you can generate more than one output, store them into different custom tags, and access them in the subsequent steps.

Federico Viticci tweeted a good example of this. He reused the script that Greg Pierce made to collect all the valid links from a note and store it in a custom [[links]] tag, and append them to his "MacStories Weekly Links" note in Evernote.

For a complete documentation on what you can do with the JavaScript action steps, please refer to this official page

Watch video trailer of JavaScript Keyboard Extensions on Vimeo

8. Customizable Extended Keyboard

Finally, the one feature that makes Drafts 4 feels very personal is the customizable extended keyboard. Unlike most other writing apps, the extended keyboard in Drafts 4 is customizable. You can reorder the keys, organize them with labels, and even create new ones. Simply swipe left to get to the end of the extended keyboard, and tap on the pencil icon to change the keys.

Here are the kinds of keys available in the extended keyboard:

  • Label keys: They do nothing, but as a separator marker for organizing the keys
  • Text keys: They insert a snippet of text, similar to TextExpander or the iOS keyboard shortcut.
  • Command keys: They run predefined commands such as moving the cursor, inserting a Tab character, or undoing the last changes.
  • Script keys: They allow you to run JavaScript code on the current note.

I love both the text keys and the script keys. Even though TextExpander has been updated to include its own custom keyboard for iOS 8, it's still a lot faster to use Drafts 4's text keys for simple text expansions. It's only a tap away.

These are some of the text keys I have created:

  • D for drafts4://x-callback-url/create?text=
  • X for &x-success=
  • {{ for {{
  • }} for }}
  • [[ for [[ - Install Link
  • ]] for ]] - Install Link
  • FT for (╯°□°)╯︵ ┻━┻

Two other keys that I have created are script keys for encoding and decoding the selected text in the note - without having to rely on other apps such as TextTool or Launch Center Pro. Again, it's only a tap away.

Open this link to install this action on your iOS device.

Open this link to install this action on your iOS device.


Drafts 4 is a must-have update. With its iOS 8 Sharing Extension, it's now even easier to capture text from other apps. The note's UUID and versioning feature leverage Drafts to accomplish more tasks than just taking short notes.

The templates in multi-step actions are very powerful, because they allow all sorts of combinations that are previously too difficult to perform. The fact that Open In... and Share actions are available as action steps allows us to use Drafts to send data to other apps that provides iOS 8 Sharing Extension and even iOS 7 legacy apps that only listens to plain text file.

And finally, the JavaScript support in Drafts 4 is really great. It may not be the first, but I'd argue it's the most powerful one.

Get it on the App Store: iPhone | iPad