GTD Brain Dump to OmniFocus

Hello all,

I recently found Markdown Tasks to OmniFocus and it is going to be a big help for meeting notes in the future.

It got me thinking about my GTD Weekly Review and perhaps creating an Action in Drafts to format a trigger list with markdown headers to signify the various areas of my life/responsibility. From there I can dictate action items onto their own lines under each header and be more satisfied that I have done a thorough review.

Since I will be dictating the action items and navigating to a new line via voice, I don’t think the auto-formatting will work like it does when I am typing meeting notes.

Example

# Weekly Review Brain Dump on [[date]]

## Family
Take down Christmas tree

## Work


### Admin
Order paper

### Teaching
Make Test
Grade Test

## Personal Projects

### Blog Posts

### YouTube Videos

I am struggling with the best way to move the action items (and not the headers) to OmniFocus.

It seems like the line in the Markdown Tasks to OmniFocus action, that I need to modify is this one:

if (line.startsWith('- [ ] ')) {

If I can modify that to search for any letter instead of "- [ ] " I think I am in business. But I don’t know how to do that.

If that can’t be done is there a better way to send lines that do not start with a # to OmniFocus?

If there is not a better way, how do I prepend "-[ ] " to all lines that do not start with # so I can run the Markdown Tasks to OmniFocus?

2 Likes

You might be better off with one of the following two approaches:

  1. Learning Taskpaper format - as it allows for projects and isn’t difficult.
  2. Writing or obtaining some code to transform the above to Taskpaper format.

The reason I say this is because Omnifocus does rather well with Taskpaper format and Drafts has built in support for it.

Thanks for the input! I am a big fan of Taskpaper, but I had not thought about using it here.

To clarify, I do not plan on using this draft for organizing a project, just to help me collect individual action items which I will process in my OmniFocus Inbox. I very much like doing this via dictation so I will have to see if having this as a Taskpaper Draft helps get the items over to OmniFocus while still allowing dictation to drive the creation.

2 Likes

Not tested, but if I understand correctly, I think the below changes would do what you want:

// comment out
//if (line.startsWith('- [ ]')) {
//	taskpaper += line.replace('[ ]', '') + "\n";
//}
// replace with
if (line.length > 0 && !line.startsWith('#')) {
	taskpaper += "- " + line + "\n";
}

That would build the list ignoring empty lines and lines that are headers (start with “#”), and it adds the "- " for you to make the item a TaskPaper style task.

2 Likes

You have some ready made projects right there, BTW. Maybe not your usual ones. And maybe you can adapt what @agiletortoise posted to create project names disjoint from your usual ones.

1 Like

It works exactly as I had hoped, thank you very much!

1 Like

is there a script already made for me to use for the brain dump?
How do I get the brain prompts into drafts to use?

Tess

Yes, there is!

I made a video and a blog post about the whole thing right here:

But if you just want the finished action, it is here:

2 Likes

Great video. Thanks

Tess

If nothing else I’m going to steal your “small words” list. :slight_smile:

Actually I have my own “Process Untagged” Drafts action, that includes some stuff on OmniFocus. I use it weekly - with an OmniFocus task to remind me to do so.

I have moved my task management to Things 3, and I am trying to update this action to perform the same filtering function but send the tasks to Things instead of OmniFocus.

I am trying to prepend the logic you provided for this action to the Todos in Things action you have provided to the Action Directory but my skills fall well short of making this work.

Can you give me any advice?

/*
  Send each line of a draft to Things as a todo
*/
const lines = draft.content.split("\n").forEach(function(line){
	if (line.length > 0 && !line.startsWith('#')) {
var todos = [];
}
});

for (line of lines) {
	var todo = TJSTodo.create();
	todo.title = line;
	todos.push(todo);
}

const container = TJSContainer.create(todos);
var cb = CallbackURL.create();
cb.baseURL = container.url;

if (cb.open()) {
	console.log("Todos created in Things");
}
else {
	console.fail();
}

Couple of ways to do it, but simplest is probably just to filter the lines while looping over them. The below modified version of the original should do that. Added a few comments to explain as well…

// split the draft into an array of lines
const lines = draft.content.split("\n");
// create an array to hold the Things todos
var todos = [];

// loop over the lines of the draft
for (line of lines) {
    // only process this line if it is not empty and does *not* start with #
    if (line.length > 0 && !line.startsWith('#')) {
        var todo = TJSTodo.create();
        todo.title = line;
        todos.push(todo);
    }
}

const container = TJSContainer.create(todos);
var cb = CallbackURL.create();
cb.baseURL = container.url;

if (cb.open()) {
	console.log("Todos created in Things");
}
else {
	console.fail();
}
1 Like

Thank you for the commented code; you solved my problem today and taught me to fish a little too!

Reviving this thread. I have several standard projects in OF:
External follow up
Internal follow up
Work Admin
…

I do my brain dumps into Drafts and then share them into OF via Rosemary Orchard’s scripts.
I would like to automate which projects they go to and bypass the inbox. I don’t know how to set this up (not a programmer). Maybe up a template in Drafts where I could list tasks under a project name that exists in OF and have them append there?
Any ideas how to do this?
Thank you in advance!

Three years after the original post, I have another update for this workflow that I still use every week.

In this version, Drafts will tag action items in the trigger list based on the level 1 and 2 headers before adding them to my Inbox in Things.

You can get the Drafts action here:

You can read the blog post about it here: