Alfred 5.5 is here - Find out what's new

Using Keywords in Workflow Inputs

Workflow Input objects are keyword-based. At the simplest level that means that what you write in their Keyword field is what you'll type in Alfred to call the input.

Simple keyword usage

In the above, mykeyword reveals the result in Alfred.

Searching for mykeyword

But keywords aren't limited to a single fixed word. You can extend them to accept multiple values and be configurable by users without them having to modify the workflow's internals. This applies to any Keyword field, be it in a Keyword Input, Script Filter Input, or any other.


User-Configurable Keywords

Workflow Configuration can be used to make keywords easily editable by users of your Workflow.

Set up a Text Field with a default value

Setting up a Text Field configuration

And use the variable as the keyword's value

Variable keyword usage

Thus allowing users to change the keyword they invoke when configuring the workflow.

User configuring keyword


Multiple Keywords

New in Alfred 5.1

An object can be invoked with multiple keywords by separating them with || (two pipe characters).

Multiple keywords usage

In the above, first, second, and third reveal the same result in Alfred.

Searching for first

Searching for second

On a Script Filter Input the alfred_workflow_keyword environment variable will return which keyword was used.

Latest Blog Post:

Video Tutorial: Using Web Searches and Creating Custom Searches in Alfred

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.