Created
May 12, 2019 23:44
-
-
Save iaindooley/cbde2822c356d34adb1cb17644e265de to your computer and use it in GitHub Desktop.
New Google Task from Card
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function newGoogleTaskFromCard(notification) | |
{ | |
var card = new Notification(notification).addedLabel("Google").card(); | |
var list_res = { | |
"kind": "tasks#taskList", | |
"title": card.currentList().name(), | |
}; | |
var task_res = { | |
title: card.name(), | |
notes: card.description() | |
}; | |
Tasks.Tasks.insert(task_res, Tasks.Tasklists.insert(list_res).id); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment