External Triggers give you a way to use AppleScript from an external source to tell Alfred what to do. For example, your external application could use this external trigger to tell Alfred to display text using the Large Type display or using notifications.
Getting your sample AppleScript
Once you've added an External Trigger object to your workflow, double-click it to show the dropdown sheet. Enter the identifier used to uniquely access this trigger using AppleScript outside Alfred.
Why am I seeing a bundle ID error?
Before your sample code can be generated, you'll need to make sure your workflow has a bundle ID - otherwise you'll see this error message.
To add a bundle ID, double-click on the workflow name in the left sidebar. Fill in the bundle ID and save to make the error disappear.
A good bundle ID format is com.yourname.workflowname (e.g. com.andrew.workflowname) but so long as you fill something unique in, you'll be fine.
Error Codes for External Triggers
When calling an external trigger from AppleScript, if an error occurs, the following error codes are output:
- Unknown Error: -1
- Workflow Not Found: -2
- Trigger Not Found: -3
- Workflow Disabled: -4