Jump to content

[SOLVED] Is it possible to provide text to a File Action based workflow?


Recommended Posts

I have a File Action based workflow that runs a bash script on the files that are selected in the Finder when I hit Cmd + Opt + \. It works fine. but I'd like to have a variant of this workflow that can be given some text input which will then be used in the bash script later in the workflow. The problem is I can't see anyway to make this happen with Alfred.

 

Ideally I'd like to be able to have a text entry field shown where I can type or paste text and then workflow would then use that. Since I couldn't see a way to do that I figured I might be able to put the text on the clipboard first and have the workflow get the text from the clipboard, but there doesn't appear to be any way to do that either.

 

Does anyone know of a way to achieve the simple act of providing text input to a File Action based workflow?

 

Thanks

Link to comment

Welcome @wyldphyre,

 

2 hours ago, wyldphyre said:

I have a File Action based workflow that runs a bash script on the files that are selected in the Finder when I hit Cmd + Opt + \. It works fine. but I'd like to have a variant of this workflow that can be given some text input which will then be used in the bash script later in the workflow. The problem is I can't see anyway to make this happen with Alfred.

 

See the LabelColor Workflow (disclaimer: I’m the author) for a simple example on how to accomplish this. Replace the List Filter with a Keyword to give it text input.

 

2 hours ago, wyldphyre said:

I figured I might be able to put the text on the clipboard first and have the workflow get the text from the clipboard, but there doesn't appear to be any way to do that either.

 

pbpaste is the tool you’re looking for (comes with macOS).

Link to comment
9 hours ago, vitor said:

Welcome @wyldphyre,

 

 

See the LabelColor Workflow (disclaimer: I’m the author) for a simple example on how to accomplish this. Replace the List Filter with a Keyword to give it text input.

 

Thanks. I’ve gotten input working with a keyword action now. Not what I would call an intuitive way to do it, but it works.

 

Quote

 

 

pbpaste is the tool you’re looking for (comes with macOS).

 

I tried using pbpaste in my script and it didn’t work, but maybe I was doing something wrong. Regardless, I’ve got text input now so I don’t need it.

Edited by wyldphyre
Link to comment
  • vitor changed the title to [SOLVED] Is it possible to provide text to a File Action based workflow?

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...