Jump to content
rhyd

Search Omnifocus: free text search your Omnifocus data

Recommended Posts

What is this?

 

This is a workflow that allows you to run free text searches against your OmniFocus data.

 

Why would I need this?

 

Well, it's difficult to quickly search for, say, a task using OmniFocus' own search box since OmniFocus restricts the results to the current perspective or selection. Other people have noticed this too.

 

Where can I get it?

 

From Packal or GitHub.

 

How do I use it?

 

The README has full instructions but, here's a starter for 10. Search for all tasks within OmniFocus (irrespective of status) with .s

search-for-tasks.png

Share this post


Link to post

This is great, most useful and nicely implemented, thanks!

 

Two things on my wishlist:

1) The workflow does not work when searching for words with international characters (in my case Swedish characters Å, Ä and Ö) - could this be fixed?

2) It would be useful to have an option to search also within completed tasks.

Share this post


Link to post

Hi,

 

When I perform a search (using the keyword .s), the result shows only on-hold tasks. I can't find any active tasks. I also tried searching active tasks (using the keyword .sa), but the result are the options to search Google/Amazon/Wikipedia for my search term.

 

I'm not sure if this is an issue with my system or with the workflow. I hope you can help me out because I think your workflow is very useful.

 

Thanks!

 
Louis
Edited by boysbytes

Share this post


Link to post

@boysbytes. Odd. Can you do the following:

 

  1. Open Alfred Preferences
  2. Choose Workflows and choose Search Omnifocus in the workflow list
  3. Toggle debugging mode on (press the bug icon beneath the Help button on the right hand side)
  4. Choose "All information" in the Log dropdown list
  5. Run the Search Omnifocus workflow (.s) and you should see lines of text appear in the blank space beneath the workflow
  6. Press Copy and send me a message via my profile page with the results (don't post the results here)

and I'll look into it.

Share this post


Link to post

@cands - point 1 below fixed in latest version

 

hg8Tblj.png

 

This is great, most useful and nicely implemented, thanks!

 

Two things on my wishlist:

1) The workflow does not work when searching for words with international characters (in my case Swedish characters Å, Ä and Ö) - could this be fixed?

2) It would be useful to have an option to search also within completed tasks.

Share this post


Link to post

Do you have any other Python-based workflows? Do they work?

 

If all your Python workflows have stopped working, reboot.

Share this post


Link to post

The workflow would not show the icons for the items found on my Mac. After some failed troubleshooting attempts I finally realized that the problem was that OmniFocus has to reside directly in /Applications for the icons to load. I prefer to organize my Non-MAS applications in subfolders, which broke that part of the workflow.

 

So if anyone else suffers from missing task icons, move OmniFocus to /Applications. Maybe a note about this in the readme file would be a good idea. Alternatively, the workflow could scan for the location of OmniFocus and adjust the paths accordingly.

 

By the way, I already really liked the workflow before, but now that it is fully working for me, it's absolutely fantastic!

Edited by Blake

Share this post


Link to post

Hi Blake - thanks for the feedback and glad you like workflow!

 

Currently, the workflow looks for icons in these Omnifocus locations:

  • /Applications/OmniFocus.app/
  • /Applications/OmniFocus.localized/OmniFocus.app/

I'd be interested to know where you put Omnifocus originally?

 

Cheers,

Rhyd

Share this post


Link to post

FWIW, you could use an AppleScript to get the path to the application:
 
tell application "Finder" to get (POSIX path of (path to application "OmniFocus"))

 

Not a good primary method (too slow), but perhaps as a fallback?

Share this post


Link to post

 

Hi Blake - thanks for the feedback and glad you like workflow!

 

Currently, the workflow looks for icons in these Omnifocus locations:

  • /Applications/OmniFocus.app/
  • /Applications/OmniFocus.localized/OmniFocus.app/

I'd be interested to know where you put Omnifocus originally?

 

Cheers,

Rhyd

 

 

My OmniFocus application was located at /Applications/-other/OmniFocus.app before I moved it to /Applications. I have a bunch of subfolders (e.g., -audio, -graphics, -tools, etc.) in /Applications that I like to use to organize my applications. I have more than 250 applications on my Mac and this system makes it much easier for me to find those applications/tools that I use very infrequently and which names I often don't remember.

 

Maybe the ideal solution would be for the workflow to search for the location of OmniFocus on first launch using the method outlined by deanishe. This location could then be remembered by the workflow and only when loading the icons failed, the location would need to be determined again.

 

If that is too much trouble for what might be a small group of users, just putting a brief notice in the readme file, that the OmniFocus application needs to reside in /Applications, would already help a lot.

Share this post


Link to post

This workflow is awesome, thanks! I just installed and tried it out, I knew I had a task that I'd set a due date for within a few weeks. I normally live in my "today" perspective in OmniFocus. To find this task I would've had to made OF the active app, changed perspectives, clicked into the search field and typed my search term. Instead I just used this and it found it right away. Great stuff.

Share this post


Link to post

So I took @deanishe's good advice and updated the workflow to use an AppleScript call to find the OmniFocus resources directory if the app isn't installed in the default location.

 

Thanks for everyone's feedback - much appreciated.

Share this post


Link to post

Just wanted to confirm that the updated workflow now works with OmniFocus residing in a subfolder of /Applications.

 

Thanks for all the excellent work!

Share this post


Link to post

I love this workflow, thank you!

 

Is there a way to grab the link to the task, when I find it using this workflow? That would be so awesome since I use the links a lot.

 

 

Share this post


Link to post

Hi - grabbing the link's pretty easy:

 

  1. Open Alfred, type 'alf' and choose 'Show Alfred Preferences'
  2. Choose Workflows and search for Search Omnifocus
  3. In the workflow area, right click and choose Outputs > Copy to Clipboard
  4. In the Copy to Clipboard popup, leave the text {query} as is and hit Save
  5. Drag a link from the Open URL actions to Copy to Clipboard
  6. Done

Hope that helps.

 

Cheers

step 4.png

step 5.png

Share this post


Link to post

Thank you sooo much. That was almost it. I just tweaked it a little bit, so that I don't open the URL, but only copy the link to my clipboard and get a notification. 

That totally made my day! ;-D

 

Screen Shot 2016-10-19 at 21.13.53.png

 

 

Share this post


Link to post

I am having a wierd issue while using this workflow.

I can only use certain aspects of this workflow, while others are not working.

For example when i type '.v' followed by the name of one of mcustom perspectives, it works fine fine.

However when i try any of the other search terms like '.r', '.d', '.sa

 etc, the workflow shoes me an error.

 

I am using macOS Mojave and Alfred 3.7

 

I have already gone into my secruity preference pane and granted Ful Disk Access to Alfred.

Share this post


Link to post

Hi,

 

Are you using OmniFocus v2 or v3? Can you send/attach your workflow log so I can investigate pls?

 

To send these logs:

  • Open Alfred preferences (keyword 'alf')
  • Click 'Workflows' in the tool bar
  • Choose 'Search Omnifocus' from the list of workflows on the left
  • Click on the 'Debug' to toggle debugging mode (see Alfred's help page for more info)
  • Choose 'All information' from the Log dropdown
  • Open Alfred and type the query that's not working
  • Copy the debug output and post it as a response - I'll take a look.

Cheers,

Rhyd

Share this post


Link to post

Thanks for updating the workflow for OmniFocus 3! It works great for me on macOS 10.13.6/Alfred 3.7/OmniFocus 3.0.1. A feature request: The workflow has a lot of options to list all tasks with certain criteria, but there doesn't seem to be a way to just list (as complement to search) all tasks in the inbox. That would be useful when there are not too many tasks in the inbox (personally I normally have less than five inbox items). 

Share this post


Link to post
On 10/3/2018 at 5:54 PM, rhyd said:

No worries, thanks for the feedback. I've updated the workflow so that you can list tasks in the inbox using the keyword:


.li

Let me know how you get on.

 

Cheers,
Rhyd

 

 

Thanks very much, it works perfectly and is very handy! 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...