Skip to content

Google 云端硬盘触发器节点常见问题(Google Drive Trigger node common issues)#

以下是一些 Google Drive 触发节点 的常见错误和问题,以及解决或排查这些问题的步骤。

🌐 Here are some common errors and issues with the Google Drive Trigger node and steps to resolve or troubleshoot them.

401 未授权错误(401 unauthorized error)#

错误的完整文本如下:

1
401 - {"error":"unauthorized_client","error_description":"Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested."}

当你使用的凭据及其作用域或权限存在问题时,会发生此错误。

🌐 This error occurs when there's an issue with the credential you're using and its scopes or permissions.

解析:

🌐 To resolve:

  1. 对于 OAuth2 凭据,请确保你已在 API 与服务 > 库 中启用了 Google Drive API。有关更多信息,请参阅 Google OAuth2 单一服务 - 启用 API
  2. 针对 服务账户 凭据:
    1. 启用全域委派
    2. 确保将 Google Drive API 添加为域级委托配置的一部分。

处理多个文件更改(Handling more than one file change)#

Google 云端硬盘触发器节点会按设定的时间间隔(默认每分钟一次)轮询 Google 云端硬盘的更改。

🌐 The Google Drive Trigger node polls Google Drive for changes at a set interval (once every minute by default).

如果在轮询间隔期间对 监视条件 进行了多次更改,将会发生一次包含所有更改项的 Google Drive 触发事件。为此,你的工作流必须考虑数据中可能包含多个项的情况。

🌐 If multiple changes to the Watch For criteria occur during the polling interval, a single Google Drive Trigger event occurs containing the changes as items. To handle this, your workflow must account for times when the data might contain more than one item.

你可以使用 if 节点switch 节点 来根据来自 Google Drive 触发节点的数据是单个项目还是多个项目,改变工作流的行为。

🌐 You can use an if node or a switch node to change your workflow's behavior depending on whether the data from the Google Drive Trigger node contains a single item or multiple items.