集成节点/Built in_nodes/Actions/Gmail
Gmail 节点常见问题#
以下是使用 Gmail 节点 时的一些常见错误和问题,以及相应的解决或排查步骤。
从发送的消息中移除 n8n 标识#
当你使用该节点 发送消息 或 回复消息 时,节点会在邮件末尾自动添加如下声明:
This email was sent automatically with n8n(此邮件由 n8n 自动发送)
要移除该标识,请执行以下操作:
- 在节点的 Options(选项) 部分,选择 Add option(添加选项)。
- 选择 Append n8n attribution(附加 n8n 标识)。
- 将开关关闭。
更多信息请参考 发送选项(Send options) 和 回复选项(Reply options)。
Forbidden - perhaps check your credentials(禁止访问 - 可能需要检查凭据)#
此错误会显示在节点中的某些下拉菜单旁边,例如 Label Names or IDs(标签名称或 ID) 下拉框。完整错误信息如下所示:
1| ``` There was a problem loading the parameter options from server: "Forbidden - perhaps check your credentials?"
---|---
该错误最常见于你使用 Google 服务账户(Google Service Account)作为凭据,但该凭据未开启 **模拟用户(Impersonate a User)** 权限时。
更多信息请参考:Google 服务账户:完成你的 n8n 凭据配置。
## 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."}
---|---
当您使用的凭据存在作用域(scopes)或权限问题时,会出现此错误。
解决方法:
1. 对于 OAuth2 凭据,请确保已在 **APIs & Services > Library** 中启用 Gmail API。更多信息请参考 Google OAuth2 Single Service - 启用 APIs。
2. 对于 服务账户(Service Account) 凭据:
1. 启用全网域委派(domain-wide delegation)。
2. 确保在全网域委派配置中添加了 Gmail API。
## 错误请求 - 请检查您的参数#
如果输入的邮件 ID(Message ID)、会话线程 ID(Thread ID)或标签 ID(Label ID)不存在,通常会出现此错误。
建议使用 **获取(Get)** 操作来验证该 ID 是否存在。