Sending SMS using Google Calendar’s python API

Soon another semester will start. And, like every semester, I received the list of assignments that are due, with their deadlines. Up till now I used to type into Google Calendar each deadline and set SMS reminders, to make sure I won’t forget to hand the assignment, but this time I realized I’ve had enough of this, and don’t feel like entering 30 different tasks over and over again, set the sms reminders etc.

So I figured ‘Google has an API for everything, why not automate it?’ So I opened their tutorial and started reading. Just about all the information was there, other then information on setting a reminder’s type (pop up, sms, email etc’).

I’ve read the python API code, and couldn’t find a reference for this. Googling for it I saw a few people mentioning it and saying the easiest solution is setting the default reminder type to SMS and then using the samples in the tutorial.

After looking a little harder I saw the JavaScript API let’s one set this type (in the API it’s ‘method’), so I ran a javascript test and sniffed it just to make sure it’s a simple attribute. After seeing that is the case I came to the conclusion that all that’s needed to set the ‘method’ of a reminder is this:

reminder = gdata.calendar.Reminder(minutes=’40’)
reminder._attributes[‘method’] = ‘method’
reminder.method = ‘sms’


Those two bold lines do the trick, where method can be ‘all’, ‘sms’, ’email’ and ‘alert’ (meaning a pop-up).

Happy SMSing!


4 responses to “Sending SMS using Google Calendar’s python API

  1. Pingback: links for 2009-02-27 | toshism

  2. Pingback: Sending SMS using Google Calendar’s python api | toshism

  3. thanks a lot. this was helpful. i wrote a code to parse a HTML calendar and add the events to my Google calendar. it helped me is adding reminders. thanks

  4. Thanks to Share this. and thanks to share this code.

    it is realy very usfull
    thanks again

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s