Notes / Search Notes

Screenshot of the action

This action queries Obsidian's built-in search and returns the file paths of the notes found. It does not return the notes themselves, just their paths.

Use the "Get Note" action with the returned file paths to get the actual note contents.

The search query is passed to Obsidian as-is, so any search syntax available in Obsidian can be used. See the related official docs for details.

There's currently no good way to programmatically search a vault, and many developers opt to run a search in Obsidian, as you yourself would, and then scrape the results list. This is a brittle process, to say the least. I am currently considering adding an option to enable searching via the OmniSearch plugin (if installed). If you have an opinion on this, please let me know!


Examples

Most of the time you would use this action to get a list of search results (their file paths), then loop over the results list using the built-in "Repeat With" block. If you want to retrieve the details of the notes, you would use a "Get Note" action and use the loop variable Repeat Item as the argument for the "File Path or Name" parameter.

Screenshot of the action

If you want to filter the list by folders etc., I recommend using the "Filter List" action from Sindre Sorhus's excellent Actions app (no relation) or a built-in "Repeat With" loop with a contained "If" action.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.