从Google文档分配的Google任务,通过API查询时不显示



最近谷歌工作区发布了在谷歌文档中为用户分配任务的可能性。然而,当通过API(甚至Zappier(查询这些任务时,它们不会显示在Google Task应用程序中。

有人试过吗?我想通过API将它们转发到我的收件箱3

代码:

function listTasks(taskListId) {
try {
// List the task items of specified tasklist using taskList id.
Tasks.Tasks.list(taskListId,{state:"1"})
const tasks = Tasks.Tasks.list(taskListId);
// If tasks are available then print all task of given tasklists.
if (!tasks.items) {
Logger.log('No tasks found.');
return;
}
// Print the task title and task id of specified tasklist.
for (let i = 0; i < tasks.items.length; i++) {
const task = tasks.items[i];
if (task.status != "completed"){
Logger.log(task.title)
//Logger.log('Task with title "%s" and ID "%s" was found and status %s.', task.title, task.id, task.completed);
}
}
} catch (err) {
// TODO (developer) - Handle exception from Task API
Logger.log('Failed with an error %s', err.message);
}

感谢

这是Google任务API的已知问题,如Google的问题跟踪器所报告

  • Google任务API与分配的任务不兼容
  • 使从Google文档创建的任务可从Google Tasks API获得

最新更新