Filed under: Features, How-tos
Mac Automation: Birthday greetings
I am sure that everyone has forgotten other peoples birthday's from time-to-time (*raises hand*). Luckily, with Mac OS X's built-in Address Book and Automator, you can automate the remembering and sending of greeting cards by e-mail -- thus eliminating the awkwardness of forgetting. In this how-to I will show you how to create a birthday field in your Address Book contacts, and how to send an e-mail birthday greeting when the time is right. To learn how to do this, read on.
Setting up Address Book
Before we start building the Automator workflow, let's make sure that your Address Book contacts are set up properly. By default, Mac OS X's Address Book doesn't include a field to fill in the birthdays; so let's set up the default template to automatically include this:
- Open Address Book
- Go to Preferences (Address Book > Preferences or use command + , )
- Click Template
- Then in the "Add Field" drop-down box, select "Birthday"


Now let's set up the Automator workflow that will make the "magic" happen. You will need the following Automator actions in the same order as they are listed:
- "Find People with Birthdays"
- "Send Birthday Greetings"

Saving the workflow
Now let's save this workflow as an application. Click File > Save. Specify a name, and chose "Application" from the "Format:" drop-down box. This will save your workflow as a Mac OS X application.

Running the workflow
Double-click on the application you just saved to run the workflow. The workflow will prompt you for a search interval. Use the drop-down box to specify how far ahead to search for the birthdays. I chose "This week" to search for birthdays occurring this week.

The workflow will then search for all birthdays that are occurring this week. If it finds more than one person, it will pass it through the workflow as well -- so you can have more than one birthday greeting when it is finished running. Once it has finish searching, another dialog will prompt you to chose a birthday greeting image, and write a short message. Notice that if you have more than one recipient, this message will be copied to all of the messages; so if you want to personalize the message, it's best to wait until the workflow sends it to Mail. Notice that you can also choose to send a random image to each recipient and have the computer randomly pick images.

If you encounter many birthdays each week, consider placing this application in your dock and setting it to run on startup -- then you will be sure to never miss a birthday!

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


Reader Comments (Page 1 of 2)
Xman said 9:24PM on 2-13-2008
Wow, seriously, I just set this up last week when I discovered it in Automator.
Reply
elitemrp said 9:29PM on 2-13-2008
Now if only it could buy them a gift and attend their party.
Reply
Cory Bohon said 9:37PM on 2-13-2008
Insider sources tell us that will be in the next version of Mac OS X :-p
XIV said 9:45PM on 2-13-2008
hmmm,... I have an error message saying that it's impossible to obtain «class boxO» "mail message" of mising value (-1728)
Reply
schertz.david said 10:46PM on 2-13-2008
this just happened to me too. There has to be a birthday for the automation to actually work. If there isn't a birthday during your selected search... it will error out
XIV said 6:19AM on 2-14-2008
I've just put my birthday today to test it out. I got the error message again, but then it actually did open my mail and wrote everything ready to send.
Ebika said 1:04AM on 2-14-2008
I would love to use automator to find upcoming birthdays and pop up a growl notification. Sending an email isn't always my preferred action, so I would just like to be reminded of birthdays in a simple popup message. I know there are some full applications out there that sort of do this, but I'd like a simple automator configuration instead. Anyone know how to do this?
Reply
Theoretical Ken said 1:48AM on 2-14-2008
I'm gonna add my birthday list to a calendar in iCal, and set them to remind me 2 days before. Then I can take what ever action I want.
XIV said 6:26AM on 2-14-2008
Actually iCal creates a group on his own with all the birthdays in Adresse Book. The only problem is, you can't put an alarm on those events.
I used to write everyones birthday on one of my own group, but I have many to remember so I would like an automatic solution which would take less time and be dynamic.
I think Ebika wants something like that too.
nameghino said 9:59AM on 2-14-2008
Well, you could start an Automator flow like that one and then, add up a "Show Growl Notification" item, which I think I downloaded it with Growl.
Is there any way to pass the name of the birthday people to the Growl Notification item?
(Or in a broader scope: is there a way to pass certain information such as paths or names to the next action in the workflow?)
Ebika said 10:44AM on 2-14-2008
XIV, that is what I am after. Keeping the birthday data with the contacts in Address Book, having the automatic birthday calendar show up in iCal, and being able to run an automator script periodically that pops up a growl window with upcoming birthdays. As far as I can tell, the "Show Growl Notification" automator action cannot show anything generated by the flow (it would be nice if it could). I'm thinking that the some applescript inside the automator action is in order, but I'm new to writing those scripts.
kc! Bradshaw said 12:05PM on 2-14-2008
Thank you for this! Really cool and easy. And I had never even opened Automator before!
Reply
Christopher Payne said 5:23PM on 2-14-2008
Me too! This was my first try at using Automator -- it looks really great! Where's the best place to go to find really cool scripts like this?
zmitchell said 3:02PM on 2-14-2008
Use Automator to get automatic email reminders of upcoming birthdays
http://discussions.apple.com/thread.jspa?messageID=6601677
Reply
Michael said 3:36PM on 2-14-2008
Hey Cory,
Thanks for the tips with automater. I have never really used it before, and so am still getting familiar with it. I did have a question I wanted to ask. What would be the best way to have an automated process by which I assign a key that will automatically open system preferences, start-up disk, and then select my Vista partition, and get me to the restart option so that all I have to do is press enter? I tried with Automator record, and it never followed what I did. The arrow doesn't make it past selecting the apple icon. Can you give any suggestions? I basically would like to set up a script, and assign it to an F-key or something. Thanks.
Reply
Michael Rose said 3:02PM on 2-15-2008
Michael --
You may want to try a different utility for selecting your Boot Camp startup; BootPicker, from bombich.com. Check it out.
Jo said 4:27AM on 2-15-2008
I'm no luddite. I'm all for using technology to connect with people, but junk mail for my birthday? I am cutting you right off if you do that to me. You are not coming to my party!
Unless of course you show up with a bunch of the best red roses, a bottle of the best bordeaux, and an itsy-bitshy gift, hand-wrapped, with a card, in your own handwriting!
http://flourishing20.wordpress.com
Reply
michiel said 11:28PM on 4-18-2008
Is there perhaps a way to have automator create a new calendar, collect all the birthdays from Adressbook and populte these into the new calendar? You can add an alarm at the same time.
After that, it should be possible to run automator when you add a contact or birthday details, to update the new calendar. You can then remove the Addressbook-calendar.
In doing something like this (if possible at all), it is as close as it gets to using the built-in Addressbook-calendar and have automatic warnings (instead of emails ready to send only when running the automator script....)
Anyone knows whether this is possible?
Cheers,
Michiel
Reply
Chris Theocharis said 3:20PM on 2-24-2008
The problem I have with the Address Book/iCal birthday relationship is this: many of my contacts are a couple or a family (ie: Bob & Sue Jones) that only have and share one "home" e-mail address. How do I enter or use both their birthdays?
I have tried adding a field "dates" into the contact template, but these dates don't link up or show up in iCal.
Any suggestions out there?
Cheers,
Chris
Reply
Nils said 4:22PM on 3-14-2008
@Ebika:
I was searching for the same and have found an applescript to insert into the workflow here: http://www.macuser.de/forum/archive/index.php/t-263128.html (you'll need to install growlnotify). It works for me but I am still tweaking it (my plan is to have one sticky notification for each person who has birthday with name and birthday as title and tel number + email as message)
Reply