Skip to main content
Gmail logo

Overview

Add Gmail to any ModuleX agent or workflow. Gmail integration via the Gmail REST v1 API (www.googleapis.com/gmail/v1). Send email + list labels. Pure HTTP — does not depend on the google-api-python-client SDK.
Categories: Communication · Communication & Collaboration · Email · Productivity · Auth: OAuth2, Service Account / Access Token · Actions: 2

Authentication

OAuth2 Authentication

Connect using Google OAuth2 (recommended). Provides secure access to Gmail.

Required Credentials

FieldDescriptionRequiredFormat
Client IDGoogle OAuth2 Client ID from Google Cloud ConsoleYes123456789-xxxxxxxxxxxxxxxx.apps.googleusercontent.com
Client SecretGoogle OAuth2 Client SecretYes-

OAuth Configuration

  • Authorization URL: https://accounts.google.com/o/oauth2/v2/auth
  • Token URL: https://oauth2.googleapis.com/token
  • Scopes: https://www.googleapis.com/auth/gmail.send, https://www.googleapis.com/auth/gmail.labels

Available Actions

Parameters

to
string
required
Recipient email address
subject
string
required
Email subject line
body
string
required
Email body content
cc
string
CC recipients (comma-separated)
bcc
string
BCC recipients (comma-separated)
is_html
boolean
Whether the body is HTML content (Default: false)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Id"
    },
    "thread_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Thread Id"
    },
    "label_ids": {
      "items": {
        "type": "string"
      },
      "title": "Label Ids",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "SendMessageOutput",
  "type": "object"
}

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "labels": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "title": "Labels",
      "type": "array"
    },
    "total": {
      "default": 0,
      "title": "Total",
      "type": "integer"
    }
  },
  "required": [
    "success"
  ],
  "title": "ListLabelsOutput",
  "type": "object"
}

Limits & Quotas

  • send_message builds a base64url-encoded MIME message locally (no SDK dep).
  • Sending is limited to 500 messages/day (consumer accounts) or 2000/day (Google Workspace).
  • 60s timeout for send, 30s for label listing.

Microsoft Outlook

AgentMail

Mailgun