Difference between revisions of "Send All Google Tasks in a Task List to Google GMail"
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
Line 34: | Line 34: | ||
</pre> | </pre> | ||
+ | |||
+ | * See this note to understand what needs to be done to run this script - http://ittichaicham.com/wiki/Create_Google_Tasks_by_sending_email_to_Google_GMail | ||
[[Category: Others]] | [[Category: Others]] |
Latest revision as of 13:12, 23 March 2014
// Constant TASKLIST = "Ittichai's list"; // ----------------------------------------------------- function getTasklistId_(tasklistName) { var tasklistsList = Tasks.Tasklists.list(); var taskLists = tasklistsList.getItems(); for (tl in taskLists) { var title = taskLists[tl].getTitle(); if (title == tasklistName) { return taskLists[tl].getId(); } } } function main() { // Get the task ID defined in TASKLIST var tasklistid = getTasklistId_(TASKLIST) // Get all tasks in the task list var tasks = Tasks.Tasks.list(tasklistid).getItems(); for(var i in tasks){ var tasktitle = tasks[i].getTitle(); var tasknotes = tasks[i].getNotes(); MailApp.sendEmail('ittichai@gmail.com', tasktitle, tasknotes); } }
- See this note to understand what needs to be done to run this script - http://ittichaicham.com/wiki/Create_Google_Tasks_by_sending_email_to_Google_GMail