Jump to content

Alfred 2.0 and Notes.app


Recommended Posts

I haven't been able to find anything on this so I figure this might be the place to ask.

I want Alfred 2 to be able to search notes in Apple's Notes app on the Mac (I'm using El Capitan).

Is there a way to do that with either a built in setting or some workflow out there?

Thanks!

Link to comment

I haven't been able to find anything on this so I figure this might be the place to ask.

 

 

Here's the workflow I've been using to search for Notes on El Capitan, which allows me to search by title or content of the note:

https://dl.dropboxusercontent.com/u/5818788/Alfred/Search%20for%20Notes.alfredworkflow

 

Use the keyword "note" followed by your search term. As I don't have a whole lot of notes, a single search has been sufficient for me, but you could theoretically add another file filter object and split search for kMDItemDisplayName (Title of note) and kMDItemTextContent (contents of your note) into individual keywords. :)

 

Enjoy!

 

Cheers,

Vero

Link to comment

Here's the workflow I've been using to search for Notes on El Capitan, which allows me to search by title or content of the note:

https://dl.dropboxusercontent.com/u/5818788/Alfred/Search%20for%20Notes.alfredworkflow

 

Use the keyword "note" followed by your search term. As I don't have a whole lot of notes, a single search has been sufficient for me, but you could theoretically add another file filter object and split search for kMDItemDisplayName (Title of note) and kMDItemTextContent (contents of your note) into individual keywords. :)

 

Enjoy!

 

Cheers,

Vero

 

Works perfectly! Thanks @Vero!!

Link to comment

@Vero would you mind if I incorporated this technique into my notes workflow?

 

 

Do anything you like - and let me know if you need a hand with anything :)

 

Also, if you post a link to your workflow when it's done, it'd be useful as I love being able to point users to a few different ones to let them find the one that fits their work flow best.

Link to comment

Do anything you like - and let me know if you need a hand with anything :)

 

Also, if you post a link to your workflow when it's done, it'd be useful as I love being able to point users to a few different ones to let them find the one that fits their work flow best.

Perfect. My workflow is here:

http://www.alfredforum.com/topic/1009-notes/#entry12462

 

I'm going to see if I can use a similar approach with my reminders workflow.

Link to comment
  • 2 weeks later...

new to both mac & alfred . I download the workflow , but each time I type note ... it shows a list of items in which search notes app is on place 5 ... but when I enter space and the keyword like notes test ... the search is only on the web and the notes workflow item has disappeared after the space .

 

Any idea ?

 

Bjoern

Link to comment

new to both mac & alfred . I download the workflow , but each time I type note ... it shows a list of items in which search notes app is on place 5 ... but when I enter space and the keyword like notes test ... the search is only on the web and the notes workflow item has disappeared after the space .

 

Any idea ?

 

Bjoern

 

 

Which version of OS X are you using? This may affect where the Notes information is stored.

 

Also, this may seem like an obvious question, but are you searching for text that exists in your notes? Alfred will show the relevant notes if there are notes matching what you've typed, but will present the fallback web searches if no results match.

Link to comment
  • 5 months later...

The workflow seems to work fine. 

 

However, rather than showing me the results in a list coming off of Alfred, I was hoping I could type in "Notes ABC123" and then Alfred would: 

 

     1) Open notes. 

     2) Provide me the resulting note list IN THE NOTES APPLICATION.

 

Basically, this would be reproducing the search that would otherwise be executed in the Apple Notes client. 

 

In this way, I can see all the resulting notes in their native notes application presentation. 

Link to comment
  • 3 months later...
On 1/19/2016 at 10:00 AM, Vero said:

Here's the workflow I've been using to search for Notes on El Capitan, which allows me to search by title or content of the note:

https://dl.dropboxusercontent.com/u/5818788/Alfred/Search%20for%20Notes.alfredworkflow

 

Thanks for this. I'm looking at abandoning Evernote and Alfred integration is important to me, so Notes seems to be preferable to OneNote. This workflow clued me in to where the notes are stored locally and I've added ~/Library/Containers/com.apple.Notes to my search scope; now my notes show up in my searches without needing to use the Note keyword of the workflow, though it is nice to also be able to limit the scope to just notes. Bonus points for the search to also work on notes stored on my Exchange server (my pre-Evernote notes).

Link to comment
On 11/07/2016 at 8:36 AM, radioman said:

The workflow seems to work fine. 

 

However, rather than showing me the results in a list coming off of Alfred, I was hoping I could type in "Notes ABC123" and then Alfred would: 

 

     1) Open notes. 

     2) Provide me the resulting note list IN THE NOTES APPLICATION.

 

Basically, this would be reproducing the search that would otherwise be executed in the Apple Notes client. 

 

In this way, I can see all the resulting notes in their native notes application presentation. 

 

Put this in a Run Script Action with Language = /usr/bin/osascript (AS) and with input as {query}:

 

set theQuery to "{query}"

tell application "Notes" to activate

delay 0.5

tell application "System Events" to tell process "Notes"

    keystroke "f" using {command down, option down}

    delay 0.3

    keystroke theQuery

end tell

 
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...