Auto-flag Omnifocus Items in Inbox

I’m wondering if there’s anyway to use the JS in Omnifocus to flag tasks automatically. Here’s the use case:

  • I get an important email and forward it to the omnifocus inbox
  • Omnifocus receives it and auto-flag’s the item based on some criterion (e.g., two exclamation points at the end of the subject/task line—like “Review project for Jim!!”

Can I get Omnifocus to auto-flag that item in my inbox and then remove the two exclamation points so the title looks cleaner?

Thanks for any help you can give!

1 Like

I don’t know how to do this in JS, but @joebuhlig describes how to do it with applescript here:


1 Like

Thanks, @JKoopmans! This is a good start. I was thinking JS may be the best solution because any device could run it—iPad, iPhone, and Mac. But I think having my Mac parse things would work 80% of the time. So thanks again. Good start. If anyone else knows how to do the same thing in JS, that’d be great. Thanks!

I have my mac parse the inbox every hour (through Keyboard Maestro)
That’s about all I need, I review all items once a day in the morning anyway, and urgent items I put in OF manually to be sure they are in the right place.

If you run the macro on your mac from your iphone/ipad with the remote trigger URL in shortcuts you would be able to do this from all devices

like this: