How to get calendar alerts from google tasks.
Here is a short scrip that will transfer all tasks with due dates onto an alerts calendar.
To set up
- Go to your calendar
- Create a new calendar called "Reminders"
- Edit Notifications for that calendar to get emails sms or popups.
- Go to "script.google.com"
- Create a new blank project
- Paste this code in there (overwrite anything that was in there).
- Save the code
- "Resources"-> "Current Project's Triggers" -> "click to add new trigger"
OR
click the trigger icon (clock inside a speech bubble next to the save and play icons )
NOTE: If this is the first time you are doing this you need to enable 2 things before step 4 - Resources -> "Advanced Google Services" - Enable the TASKS api
- console.developers.google.com/apis - search for "tasks" and enable it.
- Select "Time Driven" and as frequent as you want it to run (5 minutes is good)
- Save
To Use
- Go to Gmail, and select "Tasks" from the drop down (other options are mail and contacts)
- Any task that is not completed which has a due date will be transferred to the "Reminders" calendar and marked completed.
- A task can be created from an email (shift-T)
- Tasks that do not have a due date will not receive this treatment.
(this has been asked for a lot - e.g. )
HI, tried this, but it didnt work. In the advanced setting, would it suffice to enable only calendar and tasks api or would it need more?
ReplyDeletein the advanced (https://developers.google.com/apps-script/guides/services/advanced)
ReplyDeleteyou only need to enable the Tasks (Calendar is not necessary)
note that it needs to be enabled in two places
Resources > Advanced Google services....
and
The "Developer's console"
that second one is a bit tricky(not as described)
from the script editor click "Developer's console project"
a dialog will open and it will have a link to the project the script is associated to
click it
then on the right navigation bar click APIs
then
search for "tasks"
you'll see it, enable it
i just tried this now, i don't remember if it was different when I wrote this
Thanks, i just figured this yesterday. The developers console is indeed a bit tricky with so many options.
ReplyDeleteThanks a ton for your efforts!!
Co-incidentally, the documentation has now been fixed on the developer's page. :-)
ReplyDeleteI recieved the following error message when using this script. Any suggestions on how to fix this (sorry such a basic question, I'm not a programmer). Thanks!
ReplyDeleteYour script, Tasks reminder, has recently failed to finish successfully. A summary of the failure(s) is shown below. To configure the triggers for this script, or change your setting for receiving future failure notifications, click here.
Details:
Start Function Error Message Trigger End
1/7/16 5:59 PM copyTasksToCal ReferenceError: "Tasks" is not defined. (line 2, file "Code") time-based 1/7/16 5:59 PM
Sincerely,
Google Apps Script
I find that occasionally i get these messages, but then normal operation resumes.
ReplyDeleteAre you still getting them?
Does the script work?
Thanks for your reply. Actually the script works well but I stopped using it for a couple of other reasons. 1. The script would "cross off" the task in my task list, and I'd rather not have that. and 2. The task was created in my calendar more than once.
ReplyDeleteSo I have decided to just keep a "tasks" tab open in my browser so I can check in often.
Thanks.
Dan