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.
In the above, mykeyword
reveals the result in Alfred.
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
And use the variable as the keyword's value
Thus allowing users to change the keyword they invoke when configuring the workflow.
Multiple Keywords
New in Alfred 5.1
An object can be invoked with multiple keywords by separating them with ||
(two pipe characters).
In the above, first
, second
, and third
reveal the same result in Alfred.
On a Script Filter Input the alfred_workflow_keyword
environment variable will return which keyword was used.