Google 凭据(Google credentials)#
本节包含:
🌐 This section contains:
- OAuth2 单一服务:为特定服务节点创建 OAuth2 凭据,例如 Gmail 节点。
- OAuth2 通用:创建一个 OAuth2 凭证以用于 自定义操作。
- 服务账户:为某些特定的服务节点创建一个服务账户凭证。
- Google PaLM 和 Gemini:获取 Google Gemini/Google PaLM API 密钥。
OAuth2 和服务账户(OAuth2 and Service Account)#
Google 服务节点有两种身份验证方法:
🌐 There are two authentication methods available for Google services nodes:
- OAuth2:推荐使用,因为它更普遍可用且更容易设置。
- 服务账号:有关何时需要服务账号的指导,请参阅谷歌文档:理解服务账号。
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.
Gmail 和服务账号
从技术上讲,Google 支持使用服务帐号访问 Gmail,但这需要启用域范围委托,而 Google 不鼓励这样做,而且其行为可能不一致。
n8n 建议在 Gmail 节点使用 OAuth2。