Skip to content

Google Drive 触发器节点常见问题#

以下是 Google Drive 触发器节点的一些常见错误和问题以及解决或故障排除的步骤。

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."}

当您使用的凭据及其范围或权限存在问题时,会出现此错误。

解决方法:

  1. 对于 OAuth2 凭据,确保您已在 APIs & Services > Library 中启用了 Google Drive API。有关更多信息,请参考 Google OAuth2 单一服务 - 启用 API
  2. 对于服务账户凭据:
    1. 启用域范围委派
    2. 确保您将 Google Drive API 添加为域范围委派配置的一部分。

Handling more than one file change 处理多个文件变更#

Google Drive 触发器节点按设定的间隔(默认每分钟一次)轮询 Google Drive 的变更。

如果在轮询间隔期间对Watch For 监视条件发生多个更改,则会出现一个包含更改作为项目的单个 Google Drive 触发器事件。要处理这种情况,您的工作流程必须考虑数据可能包含多个项目的情况。

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