I am trying to create tasks in a tasklist from the google app script editor. Looks like I need the id of the tasklist to be able to add the task.
Problem is I can figure out where ti find the tasklist ID
I am trying to create tasks in a tasklist from the google app script editor. Looks like I need the id of the tasklist to be able to add the task.
Problem is I can figure out where ti find the tasklist ID
If you want to retrieve the tasklist IDs using Google Apps Script, how about this sample script?
In order to use the sample script, before you run the script, please enable Tasks API at Advanced Google Services and API console as follows.
After Tasks API was enabled, please run the following script.
function myFunction() {
var taskLists = Tasks.Tasklists.list().getItems();
var res = taskLists.map(function(list) {
return {
taskListId: list.getId(),
listName: list.getTitle(),
};
});
Logger.log(res)
}
If this was not the result you want, I apologize.