Using TorchCL and Automator to Automatically Post Files to a Project
TweetThis is a quick example of using folder actions with Apple's Automator and TorchCL. So let's say you have a project for a client in Torch and you are expected to place final versions of files in a specific category. Let's also assume you have already installed TorchCL.
What you would like to happen is when you place a file(s) in a specific folder then a message is automatically posted with the appropriate file(s).
So, open up automator, select new folder action:

So, what's going on here is I'm receiving the list of files from the finder and I'm building a variable (files) to send to TorchCL. Then I'm running TorchCL.
I've got a couple of email commands in the body. When using the non-project specific webhook (as I am) you need to specify which project this applies to, so I'm including the [project:] command (if you are using a project specific webhook, this would be unnecessary). I also want to place this message in a specific category, so I'm using the [category:] command. I could just as easily pin the message to the client, add followup events, etc., the body of the message is parsed for all e-mail commands.
Now I need to tie this script to the specific folder. Right click the folder you want to use and select services->folder actions. Now select the name of the automator script.

Ok, so now it is time to try it out. I'm dropping two files into demo:

And a few seconds later, this message appears:













![[SECURE] File Send](http://www.wbpsystems.com/lib/filesendbrown.gif)
November 24th, 2010 at 10:21 pm
Thank you for this great example. Well done.
December 30th, 2010 at 2:50 pm
[...] HeapCL Documentation > HeapCL and Services > TorchCL and Folder Actions > [...]