Jump to content

simple workflow to reference a static file deployed within the workflow

Recommended Posts

I'm trying to make my work more general (and portable):


I have a simple workflow that triggers on the keyword "metro". When running, it simply opens a PDF file of the metro map. It would be convenient if I could put the PDF file in the workflow folder and reference it directly from the plist...


Just using the UI, the plist fragment looks like this:




The workflow doesn't seem to accept a relative path from the workflow folder as a "sourcefile" value.


Is there a simple way of bundling the PDF (or other file resources I want to open) so that they can be shipped with the workflow?


Is this the right way to do it? - (what might be a better way?)

Edited by misterflibble
Link to comment

Is this the right way to do it? - (what might be a better way?)


Alfred runs workflow scripts from within the workflow's folder... so if you replace the Open File action with a Script action set to bash with the simple command:


open metro-map.pdf


This will open the metro map pdf in the workflow's folder, so you can bundle it just fine :)




Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...