Latest in Automator

Image credit:

Mac Automation: Get to-dos sent to your mobile from iCal upon request

Cory Bohon

Say you're out and about and realize that your iPhone doesn't display iCal to-dos. What do you do? You've got two options: (1) Panic, (2) Use this Automator workflow.

With this workflow, you will have access to all of your to-dos, even if you are not at your computer -- you just need access to your main email account. When you send an email to your email account, this script will run, sending you back your ToDo list from iCal.

Creating the Automator Workflow
To create the Automator workflow, you need to find the following Automator actions and drag them into the workflow area of Automator (in the same order):

  1. Find iCal Items
  2. New Mail Message
  3. Send Outgoing Messages
Tweaking the workflow settings
In the "Find iCal Items" action, select "To Dos" from the "Find" drop-down menu. In the "Whose" section, select "Due Date" from the "From" box and "Today" from the second box. You can deviate from the instructions on this step and use the settings that allow you get the most use out of this workflow (for instance, you can select any interval of time you want, etc.).

In the "New Mail Message" action, enter your email address in the "To" field -- this is the address that your ToDo list will be sent to. Fill in a descriptive subject line like "My ToDo Items for Today" or something similar. Be sure to select an email account that your remote Mac can utilize.

Continue reading to learn how to complete this workflow and create the Mail rules.

Saving the Workflow
To make this work properly, we need to save this Automator workflow as an application. Click File > Save As. From the "Format" drop-down menu, select "Application." Save this workflow in your /Applications directory. Remember the name that you chose, as you'll need this for the next step.

Creating the AppleScript launcher
To use Mail rules, you need to have an AppleScript launcher. This launcher is a very simple AppleScript that will launch the Automator action and allow it to run. Open Script Editor (/Applications/AppleScript) and type the following command:

tell application "AppHere" to run

Substitute "AppHere" with the name that you chose for your workflow. Save this Script by clicking File > Save. You'll need to remember the application's name and location when creating the Mail rules.

Setting the Mail rules

This part is fairly simple and settings may vary by user preference. Open and navigate your way to Preferences > Rules and click "Add Rule," then follow these instructions for each command you want to use:
  1. Add a description (this is for your information)
  2. Select "All" from the "if" drop-down box
  3. Under "If all of the following conditions are met:", add these things: (you will need to click the "+" to add the second item)
    1. "Subject" ... "Contains" ... "iCal"
    2. "Message Content" ... "Contains" ... "ToDos"
  4. Under the "Perform following actions:", add these things: (you will need to click the "+" to add the second item)
    1. "Set Color" ... "of text" ... "Red"
    2. "Run AppleScript" ...
  5. Beside the "Run AppleScript" action, you will see a choose box, click it and navigate to where your saved script is located. Click on the script and then on "Choose File"
You should end up with something like this:

Running the script remotely

To run the script, all you have to do is send an e-mail to your account with the subject and message contents as you specified when creating the rules. For the rule that I created, I would send a message with "iCal" as the subject and "ToDos" as the contents of the message.

After you send the message, you will receive a list of the day's to-dos.

Additional Notes
  • You can include unusual characters for message content conditions (i.e. #, @, or ^) in order to avoid accidentally running a script that you didn't want (for example use: #iCal# instead of just iCal)
  • It is also a good idea to have check for new messages often for this to work well
  • Your Mac will need to remain turned on and have opened for this to work properly.

Want more Automator how-tos like this? Visit TUAW's Mac Automation section.

From around the web

ear iconeye icontext filevr