Logging the OmniFocus Tasks You Did Today

Use TextExpander to Summarize Your Accomplishments

It’s important to write down everything you need to do. You won’t forget anything, you free your mind to think about other things, and you get to cross things off a list.

There’s something about crossing things off a list that’s very satisfying. It stimulates the reward centers of your brain, releasing a little dopamine for a job well done. You can see your progress as you progress through the day.

When you complete a task in OmniFocus, it might stay visible until the current view refreshes. Then it disappears. For a while, you can adjust the view settings or check a custom perspective (if you have OmniFocus Pro) to see what you’ve done, but eventually, the tasks will be gone for good.

This is good for focus (hide completed tasks so you only see what you still need to do) but it’s bad for tracking what you’ve done. Here’s a TextExpander macro that will help you keep a more permanent record of your accomplishments in an appropriate place.

Photo courtesy of © Adobe Stock / Ralf Geithe

The following script will build a list of all the tasks you’ve completed today, grouped by project.

Role — Family
 ✔ Have wedding rings cleaned
 ✔ Build a toy box camera

Sharpen the Saw
 ✔ Read for 30 minutes

If a project will be automatically completed when all of its tasks are completed, the number of remaining tasks is included after the project.

February Budget (3 remaining)
 ✔ Balance checkbook
 ✔ Cover overdrawn envelopes

Pay February Rent (completed)
 ✔ Write out check for February rent
 ✔ Drop off rent check

I have this script assigned to the TextExpander macro .ctasks (short for completed tasks). Create a new script, change the content to JavaScript, and paste the following code.

Now, anywhere you’re typing, you’re just a few keystrokes away from a complete list of everything you did today.

  • Conclude your daily planner page in Evernote with everything you got done.
  • Create an end-of-day journal entry in DayOne.
  • Send a status update to coworkers who might be interested in what you got done.
  • Record what you did in a work log.

Tracking what you need to do is essential for short-term productivity. Tracking what you’ve done is key to long-term growth.

Question: What do you learn from tracking what you’ve done? Share your thoughts in the comments, or on Twitter, LinkedIn, or Facebook.


Colter lives in the heart of Silicon Valley with his wife and children. He enjoys golf, sings baritone, and watches mostly British TV shows.

Please note: I reserve the right to delete comments that are offensive or off-topic. For more information, see my comments policy.

  • Pingback: John Beales: Show the OmniFocus Tasks You Did Today on your Desktop()

  • Ed

    Hi. Great script. I started using it right away. Is it possible the text expander update today broke it?

    • Thanks, Ed! I’m using it with 5.1.2 just fine.

      • Ed

        Thanks. I updated to the version you have above and it works again :-). Very cool of you to make this available.

  • stevehahn

    Thanks for this! I’m new to JavaScript, is there a way to limit this so it only pulls tasks/projects from a particular folder in OmniFocus?

    • You should be able to. On line 18, we’re asking the document for all (flattened) tasks that were completed today. Instead, try asking the folder:

      var proj = doc.flattenedProjects.whose({name: {‘=’:’Role — Family’}})()[0];

      var tasks = proj.tasks.whose({completionDate: {‘>=’:thisMorning} })();

      You’ll need to use doc.flattenedProjects or doc.flattenedFolders as appropriate. There is also doc.flattenedContexts.

      • stevehahn

        It looks like you can’t ask a folder directly for its tasks (which jibes with my memory of working with OmniFocus and AppleScript)… I suspect I will have to pull the projects from the folder and then loop through those projects to get completed tasks. Looks like I finally have some incentive to start learning JavaScript. Thanks Colter!

        • stevehahn

          I think I found a workaround. After line 18 where we collect all tasks completed today, we add your line to define the containing folder:

          var folder = doc.flattenedFolders.whose({name: {‘=’:’Role — Family’}})()[0];

          Then we just change line 34 so that instead of grabbing all the projects, we just grab the ones that are in our folder(s):

          var allProjects = folder.flattenedProjects();

          I’m still a JavaScript newb obviously, but if I am understanding the changes I made, we are still grabbing all of the tasks completed today, but then further down we are only reporting on the tasks that are contained in the folder we want.

  • Scott

    Is there a way to set this up to run once a day on it’s own?

    • Should be able to. Just set up a job using a tool like LaunchControl, and you can have it kick off a script to record your tasks at the end of the day.

      I don’t know where the 5 second limit is coming from. If it’s a limit enforced by TextExpander, then running the job on its own through LaunchControl would get you around that.

  • Scott Rychnowski

    Thank you for the script, I started using it right away. Did anyone come up with any ideas on how to include the notes for each item…?

  • LH

    This is awesome! I tried playing around with the script in order to get it to pull the completed tasks from a specific date (for instance if you forgot to run the script at the end of the day yesterday, but wanted to output just those tasks), but since I’ve never done any coding in JavaScript before I couldn’t get it to work. Do you know how to quickly make that change? Thank you!

  • Mukom Akong T.

    Hi Colter, any specific requirements for setting up the script? I pasted the code into TextExpander 5.1.4 (as content = “Javascript” with shortcut ;ctask”. I run OmniFocus Pro 2.8.2. When i use the shortcut other apps, nothing happens. What did i miss?

  • Loving this Colter! I’ve been trying to adjust this to give me yesterday’s completed tasks but haven’t had any luck. Any idea how I can accomplish this? Thank you!

    • This should work, but I took the day off yesterday and didn’t do a thing, so I don’t have any tasks completed yesterday at the moment. Replace lines 16–18 with:

      var thisMorning = startOfDay();
      var yesterdayMorning = thisMorning;
      yesterdayMorning.setDate(thisMorning.getDate() - 1);

      var tasks = doc.flattenedTasks.whose({completionDate: {'>=':yesterdayMorning,'<':thisMorning} })();

      Let me know if that works!