Swipe my Alfred Workflow for Drafts for Mac

Hi y’all. I created an Alfred workflow to help interact with Drafts for Mac quickly.

Here is a link to download it.

It incorporated a menu that can be called upon by using “d” space. A quick keyword trigger is also available for each one.

It supports:

  1. Create New Draft (dd)
  2. Search Drafts (ds)
  3. Prepend a set Draft (dp)
  4. Append a set Draft (da)

3 and 4 require setup in the workflow tool. See end of post for this.

Menu Driven Actions

type “d” space and then you’ll get these actions, select one and press enter. Let’s create a new draft.


type your draft and press enter

notification will tell you it was successful

and here it is!
04%20PM

Quick Actions

New Draft
Call it up with it’s quick keyword.

Then keep typing to enter text and press enter.

You’ll get a notification that the draft was made.


And sure enough, here it is.
26%20PM

Search
Search is super easy. Just type “ds your search here” and press enter.


This one is probably my favorite because it’s so quick. It just pulls up the search.
14%20PM

Back End View

Prepend/Append Setup

Find your target note’s UUID like this:

Then head in here in the workflow:

And replace the highlighted text with the actual UUID.

Don’t forget to remove the big text warning.

You should be done!

20 Likes

Great stuff! Thanks for sharing it.

1 Like

Great work, this is awesome!

2 Likes

Happy to. Good app and community.

It’d be cool if we could make this also have a native Alfred draft lookup and select to quickly find and launch a specific draft based on a real time search. Where the results are returning in real time in Alfred according to last updated/accessed or somthing. Does that make sense?

I don’t know how to make that happen, but evernote and others do it. so i imagine it’s possible here too.

Any ideas or insight?

Nice! thank you, sir.

Let me know if you make any mods or wish it did something else. I probably won’t be able to program it, but someone here may, lol.

This is outstanding. Alfred remains my entry point for so much on the Mac, I’m delighted to see this. Thanks!

2 Likes

This is really terrific - thanks. Quick, greedy question – any way to easily set up multiple lists to append/prepend to? (I’ve got about 4 that I frequently append to).

You can definitely do that. What are the names of your lists?

1 Like

Great! My lists are:
Fiction Books To find
Music
Movies
TV shows
Ebay Searches

1 Like

Would love to see how this is done as well!

@handythinks Great work - I added search by tag literally copied and pasted ds branch and changed the URL query) using dt. Would be cool to add it to your workflow for less tech-savvy folks.

Also do you know if it’s possible to format text before sending it to Drafts? I want to open workspaces but mine start with a capital letter (“Work”, “Content”). I want to just type dt work and have it work fine. Thanks!

1 Like

Such workflows typically use the application’s AppleScript API to read its data, but Drafts doesn’t have one, and its x-callback-url API has no methods for enumerating the app’s data.

So currently, your only real option for getting a list of workspaces or notes or whatever is to directly read Drafts’ SQLite databases in ~/Library/Group Containers (as this workflow does with OmniFocus).

3 Likes

Can anyone convert this to a LaunchBar Action?

Just discovered this as I was seeking a way to append to a Draft. Thank you so much! Extremely helpful solution.

1 Like

I use a Bear workflow and an OmniFocus workflow that both do this. They both rely on some Python scripts to accomplish it.

1 Like

@handythinks the link no longer works for me. Could you please share a new one?

Love it! Thank you sir.

1 Like

Ill check it out and perhaps move it to my site from Evernote. That’s awesome. I will look at updating it and update the workflow

WOW, awesome workflow!!!

Wanted to see if you’d ever figured out how to make this perform a live search within Alfred? Even with the latest quick search in drafts i still find myself constantly yearning for this functionality native in Alfred :smile:

I few the same way, but I did not. But on the other hand, I haven’t really tried lately!