Filed under: Features, How-tos
Mac Automation: Get to-dos sent to your mobile from iCal upon request
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):
- Find iCal Items
- New Mail Message
- Send Outgoing Messages
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.

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 runSubstitute "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 Mail.app and navigate your way to Preferences > Rules and click "Add Rule," then follow these instructions for each command you want to use:
- Add a description (this is for your information)
- Select "All" from the "if" drop-down box
- Under "If all of the following conditions are met:", add these things: (you will need to click the "+" to add the second item)
- "Subject" ... "Contains" ... "iCal"
- "Message Content" ... "Contains" ... "ToDos"
- Under the "Perform following actions:", add these things: (you will need to click the "+" to add the second item)
- "Set Color" ... "of text" ... "Red"
- "Run AppleScript" ...
- 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"
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 Mail.app check for new messages often for this to work well
- Your Mac will need to remain turned on and have Mail.app opened for this to work properly.
Want more Automator how-tos like this? Visit TUAW's Mac Automation section.

![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 1)
Gilbert Tang said 6:25PM on 9-30-2008
This is extremely useful, though I am unable to get it to actually send the contents of my to do list.
If I send myself the email, the rule kicks in, opening the Apple script and the subsequent Automater workflow.
I then see the email being generated with my chosen subject, and it is properly sent to a Yahoo push email account I specifically created for this purpose.
The problem, however, is that the iCal to do contents are not present in the email I receive.
I verified this wasn't a matter of the due date not being "today," as specified. I also created several test to do's with a whole range of dates to see if any kicked in.
What could I be doing wrong?
Reply
Gilbert Tang said 6:34PM on 9-30-2008
I finally got it to work, but I can only do so by having it send the entire list via the "Calendar" is "..." setting. I'd really like to get it to isolate those items due only the current day. Nevertheless, this is a useful bit of trickery.
Here's a better idea though: how's about Apple natively support to do's in the iPhone! YAY!
Gilbert Tang said 6:55PM on 9-30-2008
Never mind the above success. It only worked once and now it won't work again...
Bob said 8:48PM on 9-30-2008
I too tried it and I get an email that is blank. I like the idea but what's up?
Reply
Gilbert Tang said 9:01PM on 9-30-2008
Given my attempts above, the only rationale for the apparent failure is that the email is being sent too quickly, forgoing the opportunity for the iCal data to tack itself on.
Of course, these newfangled computers of ours should have no problems in terms of speed with respect to such a remedial task, but I noticed that the one time the process did work successfully, the email was open just a tad longer than "normal."
I'll play around with adding another layer to the process and see how it goes from there. Still, I'd really like some feedback from someone who knows what the hell they're talking about, instead of me pulling solutions from my ass...
Bob said 10:35PM on 9-30-2008
thanks Gilbert. I too tried a variety of ways including creating a filter that only captures one ToDo with a single word in the subject. Short and simple???
Meatleg said 10:39PM on 9-30-2008
you can add a "Pause" action with Automator, and choose to have it pause for a number of seconds (I think the limit may be 99). I have used this before and it seems to work to correct the problem of one action starting before the previous action is finished....
Bob said 11:08PM on 9-30-2008
I tried using a "pause" command with the maximum it would allow: 59 seconds. When running the program it now pauses for the 59 seconds. Unfortunately no difference in the result as I still get an email with my correct subject line but the body of the message is blank - no ToDos
Gilbert Tang said 11:22PM on 9-30-2008
Alas, I tried to delay the events as well to no avail.
I'm going to have to agree with Frank down there that this is a tremendous amount of effort just to have a to-do list on the go.
This should absolutely, positively, without a doubt be part of the "cloud," however dysfunctional, Apple says we all need for $99 a year, plus tax, CRV, VAT, and Universal Lifeline fees.
Frank said 10:26PM on 9-30-2008
This is a joke, right? A decent exercise in learning Automator, but ToDos need more flexibility than just seeing them in an email.
Things or OmniFocus are two great (albeit, non-free) alternatives. Lots of productivity/todo apps on the AppStore too...
Reply
Christopher Scott said 1:04AM on 10-01-2008
While I'm sure we all appreciate the tip, it's about time this functionality is built into the iPhone already. I keep hearing how that CUT & PASTE is the most requested feature still missing but in my mind, we need comprehensive iCal and Todo syncing
Reply
Tom said 7:11AM on 10-02-2008
Good idea, but it's shame that it requires your Mac to be switched on all the time.
Reply