How the New [[line|n]] Tag in Drafts 3.0.6 Can Improve Your Existing Workflows, Part 2

Last Friday, I wrote three reasons why I believe the new [[line|n]] tag in Drafts 3.0.6 can improve your existing workflows. Today, I will expand it further by taking advantage of how Drafts is resolving the [[line|n]] tags.

Because Drafts translates all unresolved [[line|n]] tags to blank, I can use it as optional parameters to my actions.

Use [[line|n]] tags as optional parameters

As Drafts parses through your post, it will try to put values to the corresponding [[line|n]] tags. If it can't, Drafts will simply put an empty String for each of those tags. For example, if you're trying to parse a post up to its fourth line when the post itself contains only three lines, the [[line|4]] value will simply resolve to blank. No parsing error will be reported by Drafts.

Taking advantage of this behavior, I can expand my Mail Later action to optionally send the email body to Launch Center Pro's in-app email action. To support longer email body, I decided to use the fourth line to the tenth line as a single email body parameter.

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

Using this approach, I can simply write the email body as I would on an email client. The action will preserve any line breaks I put there for readability, and will replace unresolved [[line|n]] tags with a line break. It also works if you decide to skip the email body altogether. And if you think you need to write a longer email body in Drafts, you can always append more [[line|n]] tags to this action.

Note: Thanks to David Gold for inspiring me to extend my Mail Later action to include the email body as well.

Creating a complete Linked List post has never been any easier.

Tweak how the same set of information is shared with different apps

If you're familiar with action chaining, you're probably aware that you're usually relaying the same set of information across different apps. Prior to Drafts 3.0.6, you can only work with the [[title]], [[body]] and [[clipboard]] tags as you're preparing these information in Drafts, before they're sent to other apps. With the new [[line|n]] tags, you can now parse the same set of information into single lines and choose to work only with the ones that are suitable to each app in the chain.

To give you an illustration, I'd like to revisit my Post Link to Tumblr action. This action allows you to post a link from Chrome to Tumblr via the URL Schemes that its iOS app supports. I used a Javascript bookmarklet to capture the page title and the page URL, and send them to Drafts. Using the [[clipboard]] tag in Drafts, I could select a portion of the original article in Chrome, put it into the clipboard, and render it as a Markdown quote in the Tumblr link post.

I took this approach because I could only work with a maximum of three parameters: [[title]], [[body]], and [[clipboard]]. With the new [[line|n]] tags:

  • I can utilize as many parameters as I'd like to.
  • If I want to chain it with other apps, I can pick and choose which parameters I want to use for each app
  • Depending on how each app behaves, the URL scheme can work well even when an empty String is sent to that app's parameters.

With this in mind, I want to be able to chain (at least) Tweetbot and Tumblr. You can modify this workflow to include other apps, such as Riposte, Instapaper, Evernote and Dropbox, if it suits your need. But to keep things simple, I'll stick with these two apps.

I created a new Javascript bookmarklet that would invoke a new URL Action in Drafts entitled Append with Clipboard. This simple action would append the page title and the page URL with the current clipboard content.


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

And here's the Javascript bookmarklet that you can install in Chrome:

Once you trigger this bookmarklet, you would end up in Drafts with a post containing three lines: the page title, the page URL, and the single line of quote that you pulled from the original article and put into the clipboard. If I were to use this only to tweet, I'd have more than enough information to compose my tweet. But, I also want to post it to my Tumblr blog.

To support this, I need to add more information to the post in Drafts. And, here's what I come up with:

the page title
the page URL
the pulled quote (optional)
my personal comment (optional)

Using this structure, the only mandatory information are the page title and the page URL. Both apps need it, and the Javascript bookmarklet is able to provide it. The pulled quote and my personal comment are optional. Tweetbot doesn't need them. Tumblr can use none, either or both of them.

Here's the URL Action that I created and named Tweetbot and Tumblr:


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

The action simply sends the page title and the page URL to Tweetbot and ignore the last two lines. On the other hand, Tumblr will use all four lines as planned. If you want to support longer Tumblr post, you could even extend the action include [[line|5]] and more. Just remember that all these lines are optional and Drafts will simply replace it with an empty line if it can't resolve the tags. And because the Tumblr iOS app doesn't automatically publish the post it receives via URL Schemes, you can still make final adjustments if either or both [[line|3]] and [[line|4]] are not available.


Again, the new [[line|n]] tags prove to be fundamental in improving my existing workflows. Basically, I can now work with more parameters, instead of the default [[title]], [[body]], and [[clipboard]]. The fact that Drafts treats unresolved [[line|n]] tags as blank allows me to take advantage of and consider them as optional parameters to the actions in my workflows.

I can't wait to see how other people would use the new [[line|n]] tags to improve their workflows.

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