Google Calendar to Twitter

For our Momentum men’s events we have a Google Calendar that we use to manage the upcoming events, and this gets pulled into our website using the Wordpress plugin ICSCalendar. Recently I set up a twitter account as well, and decided that it would be useful to provide reminders of events on there, which people could then follow and receive SMS updates for.

Initially I had a look around to see what I could find, and came across Calendar Tweet, but that didn’t do quite what I was looking for. Then I remembered smtp2web.com, which you can send e-mails to and it will post them to your website over http. So I set up our gmail account to forward the event reminders to my smtp2web e-mail address and built a PHP script to receive the content, parse it and send a nicely formatted message to twitter.

So I can now set up e-mail reminders for the events in Google Calendar:

and they will automatically get posted on twitter at the right time:

Update: The PHP Code used is available at http://gist.github.com/280986/