 | jorg3cardoso says:I always missed one particular feature for RTM: being able to make a task show up only after a pre-defined date. I would like this feature because there are tasks that one can only complete after a particular day (for example, pick up the results from the last medical exams). There are two options to deal with this:
1. Just put the task in RTM anyway. The problem with this is that the task can't really be completed until after the day the exams will be ready. So, until that day, it will just be polluting your task list. Even if you use RTM with some GTD structure and mark the task as being in a wait list, I still don't like having tasks that are waiting for a particular day. It seems the kind of thing that you should not have to do: it's pretty straightforward for a computer to check if a given day has arrived and make a task show up.
2. Don't put the task in RTM; instead put a note in your calendar in the day the exams will be ready. When that day comes, your calendar will alert you and you can put the task in RTM. This is better for me, but this manual operation of transferring an event from the calendar to RTM always nagged me.
So, recently, I found out about Google Apps Script. Basically, this allows you to create scripts attached to Google spreadsheets in Google Docs. The script language allows you to access most of Google's data. The feature that is of interest here is that you can trigger scripts to run, based on timed events. In essence, what I did was:
1. Create a timed script that runs once a day. I created a new Google spreadsheet named Scripts and added a script to the spreadsheet (Tools->Scripts->Script Editor)
2. The script accesses my calendar and looks for events in that day. The script is just this:
function myFunction() { var cal = CalendarApp.getDefaultCalendar(); var today = new Date(); var todayEvents = cal.getEventsForDay(today); for (var i = 0; i < todayEvents.length; i++) { var title = todayEvents[i].getTitle(); if (title.indexOf("RTM") == 0) { MailApp.sendEmail("myrtmemailaddress", title.substr(3), todayEvents[i].getDescription()); } } }
3. I created a daily trigger to run the script at 1am.
4. If the event is named "RTM something" it picks up the event description and sends an email to my RTM email address.
With this script I can just enter an event for the day the exams will be ready and when that day comes, a task will show up automatically in my RTM list. In order to fill in the task in the right list and with the right tags I format the description of the event using RTM's emailed task language.
In my case I use my default calendar for these RTM tasks, but you could create a dedicated calendar for this. You would just need to change the script to:
function myFunction() { var cal= CalendarApp.getCalendarById("calendarid"); var today = new Date(); var todayEvents = cal.getEventsForDay(today); for (var i = 0; i < todayEvents.length; i++) { var title = todayEvents[i].getTitle(); if (title.indexOf("RTM") == 0) { MailApp.sendEmail("myrtmemailaddress", title.substr(3), todayEvents[i].getDescription()); } } }
(you can get the calendar id in the Calendar details in the settings page.) Posted at 8:58pm on January 4, 2011 |