Index ¦ Archives ¦ Atom

A Homemade CRM/Task Manager With Evernote And TextExpander

Evernote is one of those applications that get better and better the more you use it. What started as a great way of storing and syncing text notes has slowly grown to be an invaluable daily tool. The one thing that I still struggled with though was the volume of stuff that cluttered up my inbox – I tend to use my inbox as a place to leave messages that still require some kind of attention. I quite like the idea of a GTD tickler file – flag the document for followup at a later date so that you can forget about it and let the system manage it. Since I was using Evernote for pretty much everything else, I had a crack at turning Evernote into a GTD style tickler that I could use as a CRM/task management system.

In it’s basic form, what I wanted was a place to file away a note/document/reminder and then flag it for followup at a later date – scheduling it to be handled/worked on at a later date so that I can concentrate on what needs to be done now.

Evernote has a special search operator tag: that let’s you search for a specific tag within your notes. My system uses TextExpander to define some macro’s that create tags for dates in the future, and then a single macro that creates the search to look for notes with tags of the current date.

My initial thought was to use the built-in date math that comes with TextExpander:

%e %B %Y prints out the current date in full, but if you make it:

%@+1D %e %B %Y

then it gives you the next day in full: 24 October 2010.

This is fine, until you start flagging things for 4 days time and the date then falls on a weekend – unless you’re checking your notes every day you’ll miss the followup flag. Luckily TextExpander lets you create a snippet out of AppleScript, so the code

%@+1D %e %B %Y


set dateTemp to (current date) + (1 * days)
set dayTemp to (weekday of dateTemp as string) as string
if dayTemp = "Saturday" then
set dateTemp to (dateTemp) + (2 * days)
else if dayTemp = "Sunday" then
set dateTemp to (dateTemp) + (1 * days)
end if
set output to (day of dateTemp as string) & " " & (month of dateTemp as string) & " " & (year of dateTemp as string) as string
return output

The trick here is to check if the future date falls on a Saturday or Sunday, and if it does, shift it to the Monday.

Note: If you’re an AppleScript wizard cringing at how I’ve munged the language, feel free to let me know how to make it better. I’ve got the sum total of 13 minutes of AppleScript experience.

So based on this logic I created a set of snippets for 1, 2, 3, 4 days ahead, as well as 1 and 2 weeks ahead, and set them to only expand when used in Evernote.

TextExpander Snippets

The @nextmonth snippet gets the date of the first weekday in the next month. So for November it would be the 1st, but for January 2011 it would be the 3rd (the 1st is a Saturday).

Ok, so how does this work? Well create or open a note in Evernote, click into the Tags field and start typing in the snippet to add some days:

4 days time

which (since today is the 23rd) will expand to:

4 days weekend

Now, to find notes flagged for followup today, you use the @flagged snippet in the Evernote search bar. The @flagged snippet is a lot simpler, since it doesn’t need to do any date math:

tag:"%e %B %Y"

it just creates the Evernote search for the current date as a tag (inside quotes) with the special tag: action.


That expands to

Flagged expanded

And that’s it. A quick and easy way to schedule notes for followup later and then filter in on just what needs to be dealt with today.

As I said earlier, my AppleScript is probably dodgy as all hell, so feel free to amend or correct. Also, if there are snippets that I missed (or you would like) let me know and I’ll add them in. Also credit must go to this post which is where I learned everything I now know about handling dates in AppleScript.

© Allan Kent. Built using Pelican. Original theme by Giulio Fidente on github.