Search in LaunchBar

Is there a way to search notes in Drafts with LaunchBar?

Just to clarify, do you mean to search within the text of the Drafts from LaunchBar on MacOS? Or search the Drafts titles for a specific Draft? I’m assuming you mean that you want to expose the ‘search within Drafts’ feature within LaunchBar?

Both would be ideal, but either way would be helpful.

If you have enabled Drafts for spotlight indexing, I would expect that LaunchBar’s spotlight searching should return the drafts. Presumably you could filter by kind and even create an option to search with that.

I’m not a LaunchBar user, so I’m just theorising on this.

Drafts is enabled for spotlight indexing and finds the correct Draft, however when pressing the Command key to return file path there are no results. Also unable to show in finder. Following explanation from HoudahSpot support:

“Some of the “shoebox” application use a different technology - confusingly called CoreSpotlight - to get results to show in the Spotlight menu. These are not actual files, but entries in the shoebox database. You can tell the difference when you scroll down to the bottom of the results in Spotlight and select “Show all in Finder”. The results that are missing once you get to Finder are those that are not actually files.”

My guess would be that LaunchBar only can find physical files?

I can follow the logic in that.

An alternate approach for now might be to adopt the one @handythinks used for his Alfred workflow, which triggers an in-Drafts search.

1 Like

I created a LB Search.

To add it to LB, go to LaunchBar Menu…Index…Show Index. Select Search Templates in the left hand column. Click the + button at bottom. Name it “Drafts Search” (or anything), then click Tab and type:

drafts5://x-callback-url/search?query=*

Now, in LB, when you type “Drafts Search” then the space bar, you should be able to search Drafts.

For more info, see:
https://reference.getdrafts.com/topics/urls

4 Likes

Here are 2 sample Launchbar actions based on URL Schemes.

3 Likes