Automating GTD with Drafts

The first step I took when I revamped my GTD system was how I was capturing and managing my tasks and ideas. In a previous post, I gave an overview of my new GTD system and found the number one problem I had was dumping everything into OmniFocus. OmniFocus became my place for collecting and doing, which caused a drag on my overall system. By allowing myself to mix the two steps together I made a mess of doing a weekly review because I had to think if an OmniFocus entry was an action or an idea that needed further processing on. I’ve changed my habit to collect into Drafts first and defer notes to either OmniFocus, Evernote, Fantastical, or the delete bucket.

Here are some of the steps I’ve taken to automate or streamline my Collection phase.

Drafts setup

The first thing I’ve done is standardize on the tabs I’ve got setup in Drafts. This way I have the same action, on the same tab, regardless of what device I’m using.

  • I - Actions Tab: Any action that would use or manipulate the content of the note. This is where I keep actions like adding an event to Fantastical or a task to OmniFocus.
  • II - Communication Tab: Any action that may be used for dedicated communication actions. This is where I have a dedicated task to email my wife, my Markdown email action, etc.
  • III - Dropbox Tab: Any action that uses a Dropbox type of action. I have actions like dedicated running log files on Dropbox, create a new text file in my overall system notes folder, etc.
  • IIII - Evernote & Send To: Any action that uses Evernote type of action or sending a note to a dedicated app (e.g. Byword or Editorial)
  • Hidden: This is where I’ll keep iterative actions that can’t be run directly. For example, if an action goes out to app, returns some text, and then runs another action. That second action isn’t one I’d run directly, so it stays on the Hidden tab.

If you’re a multiple iOS device user, I have a quick tip on getting multiple iOS devices setup with the same actions and tab settings.

Collecting in iOS

There are several tools I use with Drafts as part of my collection steps in iOS. Listed below is a summary of how each one is set up.

Safari Fav Bar: I’m doing a lot more of my work on my iPad lately and the screen space allows Safari to have a toolbar visible.[1] This means that some of my custom book marklets are now available while browsing.

Web Clipper: One of my regular tools is a book marklet in Safari to call on a Pythonista script to return information back to Drafts. This is useful

Book marklet:

javascript:window.location='pythonista://ImportToDrafts?action=run&argv='+encodeURIComponent(document.title)%20+'&argv='+encodeURIComponent(document.location.href)

Pythonista script:

import webbrowser
import clipboard
import urllib
import sys

title = sys.argv[1]
url = sys.argv[2]
note = clipboard.get()

full_note = ''.join([title,'\n\n', url, '\n\n', note])
full_note = urllib.quote(full_note.encode('utf-8'))

webbrowser.open('drafts://x-callback-url/create?text=' + full_note)

So now when I’m on a web page in Safari, I can highlight some portion of text I want to keep, click my Drafts book marklet, and poof… the clipped text and URL are in Drafts.

Here’s an example of a webpage I’m clipping:

And here’s the corresponding note in Drafts:

Key Drafts Actions

I’ve shared most of my key Drafts actions before, but here are my essential Drafts actions.

Fantastical: I enter all my calendar and reminder events through Fantastical, even though the iPad doesn’t have a native Fantastical app. The natural language processing with Fantastical makes this one of the easiest ways to enter events.

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

Click here to install Drafts Action: Fantastical

OmniFocus: OmniFocus is still my default task/action list management app. The only downside I still have with OmniFocus is that it doesn’t support a full x-callback-url action, so when a note is added to OmniFocus I stay in OmniFocus.

Click here to install Drafts Action: OmniFocus

Evernote: Evernote is has become my idea and digital reference file box. This action uses Drafts [[line|n]] tag to use the first line as the title of the note, line two for the tags I want to apply to the note, and the rest of the Drafts note as the document to be saved in Evernote.

Click here to install Drafts Action: Add to Evernote

Note Management

The next step I took was to turn on note syncing in Drafts. This allows a note created on my iPhone to be available for processing on my iPad later in the day. In addition to note syncing, I turned on the badge count. Now I have a clear way to see if I still have unprocessed information in Drafts when I sit down to do my weekly review. If Drafts shows any unprocessed notes, I know I need to clean that up before doing a my full weekly review.

Next step

The next post will explore some of the ways I’ve automated my task management processes in OmniFocus.


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


  1. On your iPad, click on Settings -> Safari and turn on the ‘Show Favorites Bar’ setting.  ↩

  2. ----- #### Comments from original WP Post: **[Thomas Tack](#78774 "2014-08-08 07:55:19"):** Dear Jason, Thank you for your inspiring contributions to Automating GTD with Drafts. Now that Fantastical for iPad is around, I just wondered if their is a way to do the other way round, i.e. to integrate all day specific events from Fantastical into Drafts as part of an automated daily planning tool. On the Fantastical page I have found the followeing code snippet, but have to admit that I am not a code geek to see a clue to use it correctly: fantastical2://show?date=yyyy-mm-dd — Jumps to the specified date. You can also use a natural language date such as "Tuesday" or "next month" and Fantastical will do its best to show the date. Do you see a chance to use this approach - or perhaps another walkaround - to integrate Fantatical events into Drafts? Thank you so very much for your opinion in advance Thomas **[http://articleboard.info](#63112 "2014-06-06 05:12:42"):** Hi, I check your blogs regularly. Your writing style is witty, keep up the good work! **[Jason.Verly](#73735 "2014-07-10 22:28:14"):** Let me go through the process again and make sure I don't have a tweak to my setup that isn't captured in the post. I should have time this weekend to go through everything and reply back. **[Jason.Verly](#79512 "2014-08-10 23:06:34"):** I've been looking at something similar to that via Launch Center Pro. It's still cooking but I hope to have a post on it in the next week or so. **[Jason.Verly](#71063 "2014-06-21 16:32:04"):** iOS will occasionally ask if you want to open Pythonista when calling it from a bookmarklet - it's a security feature in iOS. How are you syncing your bookmarklets from Mac to iPad? The steps after getting the bookmarklet in place and the script in Pythonista would be: 1\. Open web page in iOS Safari and highlight/copy text on webpage. 2\. While still in iOS Safari, click the bookmarklet to clip page to Drafts. 3\. iOS may ask if you want to open Pythonista. 4\. The script will run in Pythonista and then open Drafts. 5\. Drafts will open with a new note with the web pages URL and the clipped text. **[Marlisa Post](#76993 "2014-07-31 15:36:50"):** Hi Jason, I'm running into almost the same problem as Joe. When I use the bookmarklet, I get a draft with the correct title and url, but the body is the pythonista code. I did check my quotes to make sure they weren't smart quotes. Any thoughts? Very useful tool! Thank you for sharing it. Thanks for any help, Marlisa **[Jason.Verly](#74904 "2014-07-18 16:27:26"):** I've done testing on a couple of devices from the directions as written. The only hiccup I found was on a device that was locked down by a friend's employer. His device had a custom configuration profile that prevented something with the Pythonista app to work properly. We did some additional testing on his device and found some other weird responses to internet programming and web clipping. **[Joe Lafferty](#70694 "2014-06-19 01:49:13"):** Hi Jason, I tried clipping the website. 1\. installed pythonista 2\. copied the script as you have it above 3\. installed the bookmarklet on my Safari Mac desktop by copying and pasting the code above (I also tried a second time by setting up bookmarkelt directly in iPad safari) 4\. open webpage on iPad & highlight text in webpage 5\. sometimes it asked me if I want to open this in pythonista - then it opens pythonista and says on the same page, or now it tells me 'safari cannot open the page because the address is invalid' I'm pretty good with mac's etc, been a long time since I did any programming! this script/workflow looked just what I was looking for, but can't seem to get past base 1... any ideas? Joe **[Jason.Verly](#75287 "2014-07-21 13:02:54"):** The only thing I'd double check is some the of the single quotes in the code. Depending on how you copy/pasted the text, the code can sometimes come back with a "smart quote" instead of the standard ASCI single quote. I could a mix of them in the code you pasted in your last reply. Otherwise the book marklet and python script are a match. **[Joe Lafferty](#75233 "2014-07-21 04:55:55"):** thanks for attempts Jason. I triple checked your code and found i had missed the last line of the pythonista script! for some reason it did not appear in the text box - so I'm copying and pasting here to double check I'm not missing some other part of the code as i still can't get it to work... First problem I encountered was in cutting and pasting the ' figures were changed into a different format and the code crashed. I cut and pasted via TextWrangler and this seems to be sorted. now it's opening drafts, adding the title and url, but ending with the bookmarklet as body text in drafts but not the highlighted text from the webpage. can i double check that the bookmarklet is correct and the script? i've pasted below incase I'm missing something very simple! thanks for your patience, I programmed in Basic 40 years ago, but done no programming since!! \-- javascript:window.location='pythonista://ImportToDrafts?action=run&argv='+encodeURIComponent(document.title)%20+'&argv='+encodeURIComponent(document.location.href) import webbrowser import clipboard import urllib import sys title = sys.argv[1] url = sys.argv[2] note = clipboard.get() full_note = ''.join([title,'\n\n', url, '\n\n', note]) full_note = urllib.quote(full_note.encode('utf-8')) webbrowser.open('drafts://x-callback-url/create?text=' + full_note) **[Jason.Verly](#79510 "2014-08-10 23:04:54"):** Sorry for the late reply. Joe noticed that he didn't quite capture all of the text from the post: bookmarklet: javascript:window.location='pythonista://ImportToDrafts?action=run&argv;='+encodeURIComponent(document.title)%20+'&argv;='+encodeURIComponent(document.location.href) Pythonista script: import webbrowser import clipboard import urllib import sys title = sys.argv[1] url = sys.argv[2] note = clipboard.get() full_note = ''.join([title,'\n\n', url, '\n\n', note]) full_note = urllib.quote(full_note.encode('utf-8')) webbrowser.open('drafts://x-callback-url/create?text=' + full_note) Make sure you have both completely captured. If you did, let me know if you are getting a specific error or pop message when the process breaks. **[Joe Lafferty](#73591 "2014-07-10 00:21:33"):** Hi Jason, I've copied & pasted the text of both the bookmarklet & pythonista script but still can't get it to work. When I highlight text on safari then touch the 'clip to drafts' bookmarklet, I either get 'no script loaded' or if I then open the 'ImportToDrafts.py' script, return to safari and try again all that happens when I try and clip is pythonista opens up & stays on the script field. Any ideas? Joe **[Joe Lafferty](#65423 "2014-06-08 06:15:22"):** I tried you're pythonista script but I get an error on line six, indexerror list index is out of range-any ideas? Never used python before... **[Candelaria](#65446 "2014-06-08 06:53:15"):** Howdy! I could have sworn I've been to this blog before but after browsing through some of the post I realized it's new to me. Nonetheless, I'm definitely delighted I found it and I'll be bookmarking and checking back often! **[Joe Lafferty](#80086 "2014-08-13 01:39:18"):** Dear Jason, I don't often give up, but I have on this. I've now OT it to work as far as clipping the site opening drafts, but what is captured is part of the script & whatever is in my clipboard! (See example below with last sentence being what was in my clipboard). Thanks anyway, I'm just sorry I wasn't able to get it working... Joe \--clip via bookmarklet below Linn Records - The Mahler Project http://www.linnrecords.com/collection-the-mahler-project.aspx?utm_source=Linn+Email&utm_campaign=f3b8fb14f3-LinnRecords_SFSMahlerCycle8_6_2014&utm_medium=email&utm_term=0_517fad5333-f3b8fb14f3-317339629 I've now OT it to work as far as clipping the site opening drafts, but what is captured is part of the script & whatever is in my clipboard! **[Jason.Verly](#68369 "2014-06-10 16:05:56"):** When you run the bookmarklet it, it assumes you've copied text from the webpage you're viewing. If you don't copy a section of the page then you may get the index error because one of the arguments passed in the python script is empty. **[Joe Lafferty](#73995 "2014-07-12 11:24:45"):** Cheers Jason!

Comments

Top