Hi… anybody using stream deck and Alfred Workflows? Is it even possible? Anything you can share?
Yes, it’s possible. if your Alfred Workflow has an " External" trigger.
No, I haven’t done it. But it should be as easy as calling an AppleScript from your SD button.
Yes, I’ve recently started using them together. I assigned a keyboard shortcut to a workflow and then added a hotkey switch to the stream deck with the relevant keyboard shortcut. It works a dream.
Next up I’m looking to see if I can do something similar with Notion, as I use it a lot. There will be a way I’m sure: stream deck is becoming more and more useful!
In case it helps someone else, this was a little trickier to set up than I thought it would be.
- In Alfred, add an External Trigger (as mentioned by @vco1). Call it whatever you want. Ignore the second text box for now.
- Still in Alfred, double-click the workflow in the left sidebar and give it a bundle identifier. Something like
- Reopen the External Trigger you added in (1), and copy the sample code from the box.
- Install the OSA Script plugin from the Stream Deck plugin gallery.
- Add a Run OSA Script action to your Stream Deck.
- Paste the code block you copied in (3) into the run action.
- Make sure Stream Deck has permissions in macOS Security & Privacy → Privacy tab → Full Disk Access.
That should be it!
Edit: I should add that I prefer this script-based approach over simulating keystrokes or keypresses because it eliminates the chance that a keypress conflict will occur. The script-based approach guarantees that only this workflow will be executed when you run the Stream Deck action.