Easy Teamwork Projects Automation on a Mac

Posted

In last year”s May Newsletter, Email Dropboxes made their debut under the breathless heading:

“OMG!… You can now create tasks & messages via email!”

Sounds simple doesn”t it? But there”s a lot of potential hidden behind those exclamation marks.  One particularly easy thing to do, if you have a Mac, is to give yourself the ability to create a new task and assign it to yourself, by simply selecting some text.

That”s any selected text, in any application, on a Mac.

Now this involves using an application that Apple provides called Automator. If you”ve never used it before don”t worry, just follow along with this post and you”ll be fine. It”s simple, so simple in fact, that this post is mostly just a bunch of screenshots.

To get started, go to the Applications folder on your Mac and launch Automator.

Easy Teamwork Projects automation on a Mac
Automator makes it very easy get your Mac to do all sorts of interesting things without requiring a degree in Computer Science. Most of the time you simply drag and drop a few actions to create powerful plugins for Mail, or iTunes or the Mac itself with zero effort. 

Which is what we”re going to do now.
First thing, go create a new Service document in Automator.  

Easy Teamwork Projects automation on a Mac

Now, you could simply play around with the New Mail and the Send Mail actions in Automator and have the whole service working without any typing at all, but we’re going to go a little further and use a script so that we can automatically specify who to assign the task too.

In the top left of your new Automator window, start typing AppleScript until you find the Run AppleScript action.

Easy Teamwork Projects automation on a Mac

Drag that action over to the right-hand side of Automator and delete all of the placeholder text in it.  We”ll be adding our own script in the next step.

Easy Teamwork Projects automation on a Mac

To get the service to do what we want, simply copy in the little bit of AppleScript shown below.  AppleScript prides itself on looking something like English, but don’t worry, you don’t have to try figure out what it does if you don’t want to!

On run {selectedText, parameters} 

Tell application Mail

———– Don’t forget to change myName and emailAddress to your details!!! ———

Set myName to mike 

Set emailAddress to TWiPhoneAppBugs.I_EAT_BUGS_FOR_BREAKFAST@tasks.teamwork.com

—————————————

Set theTaskTitle to @ & myName &   & selectedText

Set theMessage to make new outgoing message with properties {visible:true, subject:theTaskTitle, content:””}

Tell theMessage 

 Make new to recipient at end of to recipients with  properties {name: Bugs, address:emailAddress}


end tell

send theMessage

end tell

return selectedText 

 end run

To automatically assign the task to yourself, change the value of myName to your own name.   You could of course, specify the name of someone else on the project if you want to assign the task to them.

Finally, change the value of emailAddress to the unique email address for the task list that you”re interested in. To find that address go to Teamwork Projects and click on the option menu beside the name of the task list. Choose the “Email tasks to this list” option.

Easy Teamwork Projects automation on a MacEasy Teamwork Projects automation on a Mac

Copy the email address and paste it into the AppleScript.

Now that you’ve made the changes, hit the hammer button at the top of the AppleScript to build it. If everything is typed in correctly the script will change color nicely and your document should look something like this:

Easy Teamwork Projects automation on a Mac

And that’s it! Just save the document and give it a useful name. In this example I’ve created a service to send tasks to my bug task list so I named the service app: Send Task To Bug List.

 
Easy Teamwork Projects automation on a Mac

 

And now the fun bit – go select any text and bring up the contextual menu for it (you can do that by holding down the control key when you click on the selected text ) and you’ll find that you are now able to magically send that piece of text to your task list as a new task.

Easy Teamwork Projects automation on a Mac

Simple isn’t it? The possibilities are endless – create as many services as you like for all of your favorite task lists and message categories.

And if you come up with a good Automator script don’t forget to let us know so that we can share it with every one else!

That’s it. As usual, let us know what you think. 

Mike.

enterprise

Keep your projects on track with Teamwork.com

Streamline. Connect. Collaborate.

One account works for all Teamwork.com apps. Have an account? Sign in here.

2 Comments

Belinda Probyn

Hey Mike, this doesn’t work without making tweaks. I don’t know how I figured it out but it’s because of this ( ” ) being used instead of this ( ” ) in your copy/paste section.

May need to re-post this using the correct marks (no idea what they’re called)

Reply
Therese Cohalan

Hi Belinda,

Great spot. Thanks for pointing that out.
Updating the blog now.

Kind regards,
Therese

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.