Skip to main content
Gmail Logo
Gmail actions

Email management and communication

ReadyGoogle Workspace

Overview

The Gmail action enables AI agents to send, read, and manage emails in Gmail.

Key Capabilities

  • Send and reply to emails
  • Create draft emails
  • Search and read messages
  • Access email attachments
  • View user profile information

Available Tools

Parameters marked ? are optional.

Setup

Step 1: Create Google Cloud Project

  1. Go to Google Cloud Console
  2. Click the project dropdown and select “New Project”
  3. Enter a project name
  4. Click “Create”
Create Google Cloud Project

Step 2: Enable Gmail API

  1. Navigate to APIs & Services > Library
  2. Search for “Gmail API”
  3. Click on it and click “Enable”
Enable Gmail API
  1. Navigate to APIs & Services > OAuth consent screen
  2. Choose External user type (or Internal for Workspace accounts)
  3. Fill in app information:
    • App name: e.g., “PipesHub Gmail Action”
    • User support email: Your email
    • Developer contact email: Your email
  4. Click “Save and Continue”

Step 4: Add Required Scopes

  1. On the Scopes page, click “Add or Remove Scopes”
  2. Search and add these Gmail API scopes:
Required Scopes:
  • https://www.googleapis.com/auth/gmail.send - Send emails
  • https://www.googleapis.com/auth/gmail.readonly - Read emails
  • https://www.googleapis.com/auth/gmail.modify - Modify labels and metadata
  1. Click “Update” and “Save and Continue”

Step 5: Get Redirect URI from PipesHub

  1. In PipesHub, go to Workspace settings → Actions
  2. Find Gmail and click Set up
  3. Copy the Redirect URI shown in the dialog
Gmail action setup drawer with the Redirect URI to copyGmail action setup drawer with the Redirect URI to copy

Step 6: Create OAuth Client ID

  1. Navigate to APIs & Services > Credentials
  2. Click “Create Credentials” > “OAuth client ID”
  3. Select “Web application”
  4. Enter a name (e.g., “PipesHub Gmail”)
  5. Under “Authorized redirect URIs”, click “Add URI”
  6. Paste the Redirect URI from PipesHub
  7. Click “Create”
The redirect URI must match exactly. Any mismatch will cause authentication to fail.
  1. Copy the Client ID and Client Secret from the popup

Step 7: Configure in PipesHub

  1. Return to the PipesHub Gmail setup dialog
  2. Enter an OAuth app name (or pick a saved app), then your Client ID and Client Secret
  3. Click Create
Gmail action setup drawer with the Client ID and Client Secret enteredGmail action setup drawer with the Client ID and Client Secret entered

Step 8: Authorize Access

  1. Open the Gmail instance (in Actions or Your actions), click Authenticate, then Authenticate with OAuth. A popup opens to Google’s authorization page
  2. Sign in with your Google account
  3. Review the permissions and click “Allow”
  4. You’ll be redirected back to PipesHub
  5. The action will show “Authenticated” status

FAQ

Example: Use Gmail Connector to search past email conversations. Use Gmail action to let agents send replies or forward messages.

Usage Tips

How do I send an email?
Ask your agent to “send an email to user@example.com” and provide the subject and message.
How do I search for emails?
Ask to “search my emails for [keyword]” or use specific criteria like “find emails from john@example.com with subject report”.