Alfred 5.5 is here - Find out what's new

Workflow Tutorial: Using a Single Keyword for Multiple Snippets

Did you know that you can use a single snippet keyword for multiple snippets? Typing your snippet keyword in any app will pop up Alfred with a list of options to choose from, and pressing Return will paste it to the frontmost app.

In this post, I'm using three email signatures as an example; Depending on the situation, I can choose which of my three identities I want to use.

Snippet Triggers options

Trigger Email Signatures with Snippets

If you'd like to follow along, you can download the example workflow on GitHub or you can create your own workflow and add the objects as you go.

Snippet Triggers workflow canvas

1. Using the keyword:

Open the Snippet Trigger object and set your keyword, which you'll type with any prefix or suffix you've set in the Shared Prefix box found in the Snippet Trigger object.

Setting your snippet trigger keyword

Note that in this example, my keyword is \\sig as the Shared Prefix is set to \\.

2. Setting the snippet content:

Change the content of your signatures in the List Filter object to reflect identities that are useful to you.

This can be used for any scenario where you need to paste different content, but want to only have to remember a single snippet trigger.

List filter options

You'll notice that none of the List filter keyword details are filled in, as we won't be accessing the workflow through the list filter keyword in this case. However, you could fill this in and access the workflow from Alfred results too.

3. Pasting the snippet content:

The workflow is currently set to automatically paste to the frontmost app, so no changes are needed in this object.

Note that you'll need to have granted Alfred the necessary Accessibility permissions required for the Snippets feature. Here's a guide to setting up Alfred's Snippets Text Expansion feature if needed.

Open a text file or an email, type your snippet, choose the snippet you want to paste, press Return and like magic, your snippet will appear!

I bet you can think of you a dozen other ways you could use snippets like these now that you've created one.

Latest Blog Post:

Watch Alfred Videos on YouTube

CacheFly Campaign Monitor

"Alfred" is a registered trademark of Running with Crayons Ltd. ©2024 Running with Crayons Ltd. All rights reserved.

Terms & Conditions, Privacy Policy, Cookies.