如何将 Gmail 和 Google Sheets 连接到 Cekat Automations

如何将 Gmail 和 Google Sheets 连接到 Cekat Automations

Cekat Automations 可以通过 OAuth 连接来连接 Gmail 和 Google Sheets。本指南介绍如何创建 Google Cloud 项目、启用所需的 API、创建 OAuth 凭据,并将其连接到您的 automation。

步骤 1:创建 Google Cloud 项目

  1. 打开 Google Cloud Console。

  2. 点击页面顶部的项目选择器,然后选择 New Project。

创建 Google Cloud 项目

  1. 输入项目名称,例如 Cekat Automations。

  2. 点击 Create。

  3. 项目创建完成后,请确保它已在项目选择器中被选中。

步骤 2:启用所需的 API

在 APIs & Services → Library 菜单中,搜索并启用以下 API:

需要启用 Google Drive API,Google Sheets 才能搜索、创建和监控电子表格。

在 Google Cloud 中启用 API

步骤 3:设置 OAuth 同意屏幕

  1. 打开 APIs & Services → OAuth consent screen。

  2. 选择 External,除非您使用 Google Workspace 并需要内部配置。

  3. 点击 Create。

  4. 填写应用信息:

    • App name:Cekat Automations

    • User support email:支持邮箱或管理员邮箱

    • Developer contact information:管理员邮箱

  5. 在 Scopes 和 Test users 部分依次点击 Save and Continue。

  6. 在摘要页面上,点击 Back to Dashboard。

  7. 如果应用仍处于 Testing 模式,请将您要使用的 Google 账号添加为 Test User。

步骤 4:创建 OAuth Client ID 和 Client Secret

  1. 打开 APIs & Services → Credentials。

  2. 点击 + Create Credentials,然后选择 OAuth client ID。

  3. 在 Application type 下,选择 Web application。

  4. 输入凭据名称,例如 Cekat Automations Web。

  5. 在 Authorized redirect URIs 下,点击 + Add URI。

  6. 输入 Cekat Automations 连接页面上显示的 Redirect URL。

  7. 将 Authorized JavaScript origins 留空,除非您的配置需要填写。

  8. 点击 Create。

  9. 复制 Client ID 和 Client Secret,以便在下一步中使用。

创建 OAuth 凭据

切勿公开分享 Client Secret,也不要将其放入 workflow 中。

步骤 5:连接到 Cekat Automations

  1. 在 Cekat Automations 中打开该 automation。

  2. 添加 Gmail 或 Google Sheets 节点。

  3. 点击 Create Connection 或 Add Connection。

  4. 输入来自 Google Cloud 的 Client ID 和 Client Secret。

  5. 点击 Connect。

  6. 按照提示完成 Google 登录和授权流程。

  7. 完成后,返回 automation 并继续配置该节点。

连接 Gmail 或 Google Sheets

连接创建完成后,即可在 automation 中使用 Gmail 和 Google Sheets,具体取决于您的 Workspace 中可用的节点。

所请求的权限

在 OAuth 过程中,Google 会根据所使用的服务请求相应的权限:

  • Gmail:发送邮件、读取邮件,以及创建或管理邮件草稿。

  • Google Sheets:访问电子表格和 Google Drive,以便搜索或选择电子表格。

  • Google 账号:识别已连接的账号。

在您完成授权之前,Google 会显示权限摘要。