Skip to main content
Gun.io Home

How to use CalDAV for Google tasks

The theme music for this post is Percy Sledge – The Dark End of the Street.

Cool! Gun.io user MatthewBauer has claimed the bounty to make a way to post to Google Tasks using Siri.

Rich Jones
Rich Jones
· 2 min read

Siri to Google Tasks using CalDAV

Siri is the iPhone’s new fancy-pants program which lets you talk to your phone and have it do things for you. Google Tasks is Google’s lightweight task manager. Together at last! It does it using ‘CalDAV’ (which means “Calendaring Extensions to WebDAV”), which is an Internet standard allowing a client to access scheduling information on a remote server.

This is the mechanism which Siri uses to store tasks, so this code takes the calendar events and pushes them over to Google Tasks. How handy!

Setting it up

This implementation requires a fair amount of technical knowledge to use, as it requires that you run your own server to handle the credentials and the posting. You’ll need to run your own server to do this.

The author suggests using this configuration in your /etc/httpd/conf/httpd.conf:

<VirtualHost *:80>
ServerName www.example.com
ServerAlias example.com
ServerAdmin [email protected]
WSGIScriptAlias /cal /srv/http/caldav-to-gtasks/server.py
<Directory /srv/http/caldav-to-gtasks/>
AuthType Basic
AuthName “WSGI”
AuthUserFile /etc/httpd/passwd/passwords
Require user USERNAME
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
view raw gistfile1.txt hosted with ❤ by GitHub

Then, once your server is running, visit the url http://servername/cal?oauth=1 to set your credentials.

Once you’ve done this, on your device, go to Settings -> Mail, Contacts, and Calendars -> Add Account -> Other -> Add CalDav Account. Type your credentials in (if you don’t have a user name and password just but in dummy ones) and hit next. At first it will fail, then tap ‘Advanced Settings’ and set Use SSL to OFF. Set port to the port you’ve got Apache running and make ‘Account URL’ be something like this if you set the WSGIScriptAlias to /cal: http://servername:80/cal

And there you have it! Siri to Google Tasks. Awesome.

Oh, and this is a totally open source implementation. Feel free to play with the code here!


Whether you’re looking for some temporary help or your next full time developer, let Gun.io help you find the right person for the job.

Learn more