Filter Utility

The Filter utility helps you control which stream your workflow should follow by matching certain rules, using equal to, not equal to and regex matching.


Using the Filter Utility

Add a Filter object to your workflow from the Utilities list, and connect it after any object for which you'd like to filter the output.

The simplest use for the Filter utility is by using the "equal to" and "not equal to" options in the dropdown menu, and including the text or variable you'd like to use as criteria.

Filter Utility configuration

In this example, I've set the filter to only allow this stream of the workflow to continue if it has content; In other words, if the input is not empty (the upper path in green).

I've then provided an alternative path where the stream can continue if it is empty (the lower path in blue).

To do list example

Using Regex for Filtering

If your filtering needs are more advanced, you can also use regular expressions (regex) to match the input. Alfred conforms to ICU v3.

A useful site to create and check your regular expressions is http://regexr.com.


Workflow Example Using the Filter Utility

Want to see the filter utility in action? We've included a few workflows in the Getting Started guides and examples in Alfred, which you can find under the [+] button at the bottom of the Workflows sidebar in Alfred's preferences.

In particular, the example shown above is the Simple To-Do List workflow, which uses two Filter objects, allowing two different actions depending on whether the input is empty or not.

Latest Blog Post:

Tutorial: Creating the Fastest Hotkey-Based Web Search

CacheFly Campaign Monitor

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

Terms & Conditions, Privacy Policy, Cookies.