dpbklyn Posted September 21, 2017 Share Posted September 21, 2017 Hello and TYIA, Is it possible to have Alfred kick off a workflow when a file is added to a monitored Directory? Thank you, dp Link to comment
deanishe Posted September 21, 2017 Share Posted September 21, 2017 2 hours ago, dpbklyn said: Is it possible to have Alfred kick off a workflow when a file is added to a monitored Directory? No. Alfred, by design, only responds to user actions. You can, however, use a Launch Agent to run a workflow via an External Trigger. Link to comment
GuiB Posted September 22, 2017 Share Posted September 22, 2017 (edited) Or, alternatively, use an Automator Folder Action that activate an External Trigger from a workflow. To create one: Create a workflow in Alfred Add an External Trigger object Copy the content of the External Trigger inside the Sample Code section Open Automator Create a new Folder Action At the top right of the actions list, select the folder that you want to be watched Insert an Applescript action In the Applescript script, insert this: on run {input, parameters} repeat with f in input (* Paste the content of the Sample Code of the External Trigger in Alfred here and change the "test" string to f; Ex: *) tell application "Alfred 3" to run trigger "extTriggerName" in workflow "workflowName" with argument f end repeat end run Save the Folder Action Modify your Alfred Workflow to manipulate the added files in the folder Edited September 22, 2017 by GuiB Link to comment
dfay Posted September 24, 2017 Share Posted September 24, 2017 Or get Hazel. It's built for exactly this kind of scenario. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now