Automating with HeapCL and an Automator Service

Sunday, December 19th, 2010

So, let's say you have a list of names that you are calling for the holidays. Each prospect has a task that needs to be marked as complete and you also want to schedule a followup call in 7 days.

You could do this directly from the terminal with HeapCL:

What's going on here? So, I'm using HeapCL's ability to parse messages to do a few things. First, using the association command to indicating what prospect this should apply to. Second, I'm marking off the appropriate event and finally I'm creating a new event in 7 days.

However, I'm also including an optional flag ("--simulate"). This indicates to Heap that while I want all of the commands to be processed, I actually don't want the message created.

Ok, so that's cool, but not very automated. I could probably do that just as fast within Heap itself. But the beauty of the command line is that you can turn it into something that can be used over and over again. So here is that same command in Automator:

This time I'm swapping out name ("John Doe") and replacing it with a variable that represents whatever text I might have selected ("$f").

So once that's saved, it is a system service. Meaning it works anytime I have some text selected. For instance, I'm in a text editor with the text "John Doe":

And that's it, if I open up Heap and look at John Doe's calendar, I see that one event has been checked off and another created:

Using TorchCL and Automator to Automatically Post Files to a Project

Wednesday, November 24th, 2010

This 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: