Interesting, I never noticed that. Does it cause any problems when working with notes created through the workflow?
I guess this could be fixed by changing the applescript to just do command-n, type title, press enter twice. I'll add it to the to-do list.
I decided this should be the default action of alt-enter in the latest version: https://github.com/sballin/alfred-search-notes-app/releases/download/3.6/Search.Notes.alfredworkflow
This new version also has the following features:
Show enclosing folder when showing a note
Use new note linking format that works on macOS and iOS (macOS >= 14 required)
Use new updater script that doesn't require Python 2 (thanks vitorgalvao!)
Bug fixes
Glad you like it! What version of the workflow are you using? Can you post the exact result?
The newer iOS/macOS Notes apps now have built-in note linking support, so I’m not sure about the future of this feature…
I can see why it would be flagged, because it accesses the Notes database. But not sure anything can be done here other than to “unblock” it or turn off app block. You are welcome to inspect the source and compile it yourself following the directions in the readme.
Should fix it if you double click on the block that's called "Create new note" in the workflow diagram and replace the code with this:
on alfred_script(q)
try
tell application "Notes"
-- Create new note from user query
tell default account to make new note at default folder with properties {body:"<div><h1>" & q & "</h1></div><div><br></div>"}
show first note in default account
show first note in default account
end tell
on error errorMessage number errorNumber
display alert "Create Note Error" message (errorNumber as string & ": " & errorMessage & "\n\nInput: " & q) as critical
end try
end alfred_script
That's right, they only appear when searching the note body text. The OCR is done by the Notes app itself automatically whenever I drag and drop an image into a note or add handwriting to a note (I'm on Big Sur). The OCR is pretty good but not 100% accurate, which might explain any inconsistencies with the search. The feature doesn't include PDFs or other non-image attachments—I don't know how to search those unfortunately.
Sounds like Alfred may not have full disk access, something similar happened to another user after upgrading to 11.4: https://github.com/sballin/alfred-search-notes-app/issues/43#issuecomment-867308050
Here are what the permissions should look like: https://github.com/sballin/alfred-search-notes-app#required-permissions