Skip to content

Google 凭据#

¥Google credentials

本节包含:

¥This section contains:

¥OAuth2 single service: Create an OAuth2 credential for a specific service node, such as the Gmail node.

¥OAuth2 generic: Create an OAuth2 credential for use with custom operations.

¥Service Account: Create a Service Account credential for some specific service nodes.

¥Google PaLM and Gemini: Get a Google Gemini/Google PaLM API key.

OAuth2 和服务账户#

¥OAuth2 and Service Account

Google 服务节点有两种身份验证方法:

¥There are two authentication methods available for Google services nodes:

  • OAuth2:推荐使用此方法,因为它更易于设置且应用更广泛。

¥OAuth2: Recommended because it's more widely available and easier to set up.

¥Service Account: Refer to the Google documentation: Understanding service accounts for guidance on when you need a service account.

Note for n8n Cloud users

For the following nodes, you can authenticate by selecting Sign in with Google in the OAuth section:

兼容节点#

¥Compatible nodes

配置完成后,你可以使用你的凭据对以下节点进行身份验证。大多数节点都兼容 OAuth2 身份验证。对服务账户身份验证的支持有限。

¥Once configured, you can use your credentials to authenticate the following nodes. Most nodes are compatible with OAuth2 authentication. Support for Service Account authentication is limited.

节点 OAuth 服务帐号
Google Ads :white_check_mark: ❌
Gmail :white_check_mark: ⚠
Google Analytics :white_check_mark: ❌
Google BigQuery :white_check_mark: :white_check_mark:
Google Books :white_check_mark: :white_check_mark:
Google 日历 :white_check_mark: ❌
Google Chat ❌ :white_check_mark:
Google Cloud Storage :white_check_mark: ❌
Google 联系人 :white_check_mark: ❌
Google Cloud Firestore :white_check_mark: :white_check_mark:
Google Cloud 自然语言 :white_check_mark: ❌
Google Cloud 实时数据库 :white_check_mark: ❌
Google 文档 :white_check_mark: :white_check_mark:
Google 云端硬盘 :white_check_mark: :white_check_mark:
Google 云端硬盘触发器 :white_check_mark: :white_check_mark:
Google Perspective :white_check_mark: ❌
Google 表格 :white_check_mark: :white_check_mark:
Google Slides :white_check_mark: :white_check_mark:
Google Tasks :white_check_mark: ❌
Google Translate :white_check_mark: :white_check_mark:
Google Workspace 管理员 :white_check_mark: ❌
YouTube :white_check_mark: ❌

Gmail and Service Accounts

Google 技术上支持将服务帐号与 Gmail 配合使用,但这需要启用域范围的委派,而 Google 并不鼓励这样做,而且其行为可能不稳定。

¥Google technically supports Service Accounts for use with Gmail, but it requires enabling domain-wide delegation, which Google discourages, and its behavior can be inconsistent.

n8n 建议使用 OAuth2 连接 Gmail 节点。

¥n8n recommends using OAuth2 with the Gmail node.