Add front link to Pocket

One of the few holdovers from using Alfred before becoming a KM fanatic just stopped working due to macOS 12.3 dropping support for python 2.7.

It’s a fairly simple workflow just taking the front link and sending it to Pocket to save the link.

I built a clunky version of the same idea in keyboard maestro but it involves opening the pocket app and adding the link. I preferred the Alfred workflow because it was all done without the pocket app having to launch.

Alfred for Pocket Workflow

Does anyone use Pocket and have a smoother macro for adding links?

Save to Pocket Demo.kmmacros (7.5 KB)

How about this?

pocket://add?url=%SafariURL%

1 Like

I know there is a pocket Chrome extension that lets you set a shortcut to do it:

Not sure about other browsers, but @evanfuchs's idea would be ideal if you want to keep all your hotkeys managed in KM.

I actually have AppleScript written to select the browser extension button but its pretty slow,

Looks promising. Checking it out now!

This works much smoother than my current macro, still launches the App but I can keep "Open URL In the background" checked and then quit the app like I am now.

Thank you very much!

1 Like

You might try something like this if you want to automatically close Pocket if it wasn't open when you triggered the macro. I use this approach with some of my macros to first check if an app is open, and close it if not.

In this case, I had to insert a pause before quitting. I didn't test it much. You may be need to play with the length of the pause.

Add Safari URL to Pocket.kmmacros (4.2 KB)

Another easy option, which should be robust:

  1. Install the Save to Pocket Extension for Safari

  2. Trigger this manually the first time using either the Pocket icon on the Safari toolbar or Safari's File>Share>Pocket menu, then log into Pocket

  3. Install/type in the macro below and consider adding it to a Safari-specific folder (as per the image below), assuming you only want to trigger the shortcut when you're using Safari (if not, it will work whether or not Safari has focus).

  4. From then on, run the macro with the shortcut key of your choice (I like CMD-. as it's easy to reach and the '>' symbol above it – at least on the UK/US keyboard – reminds me of the Pocket logo).

Save current URL to Pocket.kmmacros (2.3 KB)

Note that you only need to do this if you'd prefer to use KM to manage your keyboard shortcuts OR if you want to use a single modifier key. Otherwise, using the Keyboard preference pane's Shortcuts to add a ALT-CMD-. shortcut (say) to trigger the Pocket menu works just as well (and that's what I use to prevent CMD-Q accidentally closing all of my Safari windows):

PS I asked the Pocket developers ages ago if they'd consider adding a shortcut key to the extension but any of the solutions on this page seem like a good workaround for now!

1 Like