Todoist to iCal/GCal Hack

I love Todoist.com‘s elegant, simple interface and the functionality it offers, and I was desperate to find a way to integrate it with Google Calendar. Though clunky, the method I describe below seems to work. It turns every uncompleted Todoist task with a date associated with it into an all-day event in an iCal-based calendar. It won’t provide you bidirectional sync, but until the Todoist developers provide me a better solution, it works well enough for me.

(Note: The method requires a small amount of knowledge on Yahoo! Pipes and PHP, a Yahoo! account, and access to a server that can serve PHP files.)

  1. Clone this Yahoo! pipe; this pipe turns your Todoist list into an iCal file. (Someone else originally authored the pipe, but the original pipe has disappeared, so I can’t credit the true author. You might notice that the pipe has a 10 am PST [Pacific Standard Time] string hardcoded in; that’s because Yahoo! Pipes doesn’t seem to support all day events. Either that or I couldn’t figure out how to do it, which is more than likely! So for now let’s temporarily set every Todoist item to start at 10 am. But don’t worry; we alter the time of the event through PHP later on.)
  2. You’ll need to enter your Todoist API key somewhere in the pipe. Instructions on where exactly to do this are in the pipe’s description. You an get your Todoist API key by clicking Preference -> Account in Todoist.
  3. Grab the URL of the resulting iCal calendar, as shown in the screenshot below. Click to see a larger version of the image. Make sure to right-click the iCal option and copy the link.
  4. Open a text editor and type in the following lines of PHP, and paste the URL you obtained from step 3 where it says xxxx:
    $data = ‘xxxx‘;
    $data = file_get_contents($data);

    print str_replace(‘T180000Z’, ”, $data);

    What this does is remove the start time and end time associated with each event, turning it into a whole day item.
  5. Save the file as .php and upload it to a PHP-capable webserver.
  6. Get the the URL of your php file and add it to your list of GCal calendars by clicking Other Calendars > Add > Add by URL.

If everything turns out well, you should see your Todoist items appearing as whole day events in your new calendar, as shown below:

As I said, it ain’t elegant, but it’s better than nothing! This means that I have unidirectional offline access to Todoist, which is good enough for me… for now.



4 Responses to “Todoist to iCal/GCal Hack”

  1. Markus Schneider says:

    i want to try this, but i have no option to configurate the pipe. The same problem if i make a copy

    • admin says:

      Hi. Could you describe a little bit more what you’ve tried to do? Maybe you can send me a screenshot? Sorry for the late reply.

  2. I write a PHP Script to have a two-way iCal Server for Todoist

  3. ændrük says:

    Yikes. Thanks for trying.

Leave a Reply