【问题标题】:Google Tasks assigned from a Google Doc, not showing when queried via API从 Google Doc 分配的 Google 任务,通过 API 查询时不显示
【发布时间】:2022-10-21 12:31:59
【问题描述】:

最近Google Workspace released 可以将任务分配给 Google 文档中的人员。这些任务随后会出现在 Google Task 应用程序中,但是,当通过 API(甚至 Zappier)查询时,它们不会出现。

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

代码:

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-tasks-api google-tasks


    【解决方案1】:

    这是 Google Tasks API 的一个已知问题,如 Google 的问题跟踪器中所述:

    【讨论】:

    • 如果通过从 Google Docs 分配创建的 Google Tasks 问题未显示在 Google Tasks API 中影响您,请在此处 +1。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-29
    • 2021-06-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多