Universal Action Trigger
Universal Action triggers enable you to add custom actions into Alfred's Universal Actions feature.
Creating a Universal Actions Trigger
The Universal Actions trigger can be found under the Triggers popup menu in Alfred's workflow editor. Set a name and icon for the trigger to be used in the Universal Actions view.
By default, Alfred will always show your custom action in the list of available result actions, unless you specify the argument types for which you want your action to appear.
By selecting Files
, URLs
or Text
, your action will only show when the relevant matching argument has been selected in the Universal Actions feature.
You may also limit the action to only showing when Single, Multiple or Single and Multiple arguments are selected. For example, select Single
input arguments if your workflow only works with single items, such as a single block of text.
Action Processing Units / Action Chaining
Action processing units allow you to modify the action argument(s) in the Universal Actions view for further processing. Chaining actions in this way is an extremely powerful way to extend and use the Universal Actions feature.
To create an Action Processing Unit, connect the workflow objects you'd like to process the argument stream between a Universal Action Trigger and an Action in Alfred object.
To see a ready to use example of this, add the Getting Started > Universal Actions built-in workflow example from the + button in Alfred's Workflow editor. This will add an example "Trim Text" action to Universal Actions.
This example also covers 2 key aspects of workflow development:
- Alternative actions, where holding a modifier key provides a different processing outcome. In this case, holding the the
⌘
key will upper case the argument instead of trimming it. - Specifying that the Alfred window should not close after actioning the Universal Action to provide a smoother transition when re-showing the Universal Actions view. This is shown with the square on the connection out of the Universal Actions. Take a look at Using Alternative Actions for more information.
More Control over File-based Actions
If you would like more control for custom file-based Universal Action triggers, use the File Action Triggers workflow object, which has been fully updated to work with Universal Actions.