Integrations
Prebuilt Toolkits
Google
Gmail

Gmail

Description: Enable agents to send, read, and manage emails in Gmail.

Author: Arcade AI

Code: GitHub

Auth: OAuth2

PyPI VersionLicensePython VersionsWheel StatusDownloads

The Arcade Gmail toolkit provides a pre-built set of tools for interacting with Gmail. These tools make it easy to build agents and AI apps that can:

  • Send, read, and manage emails
  • Compose and update draft emails
  • Delete emails
  • Search for emails by header
  • List emails in the user's mailbox

Install

pip install arcade_google

Available Tools

These tools are currently available in the Arcade AI GitHub toolkit.

Tool NameDescription
SendEmailSend an email using the Gmail API.
SendDraftEmailSend a draft email using the Gmail API.
WriteDraftEmailCompose a new email draft using the Gmail API.
UpdateDraftEmailUpdate an existing email draft.
DeleteDraftEmailDelete a draft email using the Gmail API.
TrashEmailMove an email to the trash folder.
ListDraftEmailsList draft emails in the user's mailbox.
ListEmailsByHeaderSearch for emails by header using the Gmail API.
ListEmailsRead emails and extract plain text content.

If you need to perform an action that's not listed here, you can get in touch with us to request a new tool, or create your own tools with the Google auth provider.

SendEmail


Send an email using the Gmail API.

Parameters

  • subject (string, required) The subject of the email.
  • body (string, required) The body of the email.
  • recipient (string, required) The recipient of the email.
  • cc (array, optional, Defaults to None) CC recipients of the email.
  • bcc (array, optional, Defaults to None) BCC recipients of the email.

SendDraftEmail


Send a draft email using the Gmail API.

Parameters

  • id (string, required) The ID of the draft to send.

WriteDraftEmail


Compose a new email draft using the Gmail API.

Parameters

  • subject (string, required) The subject of the draft email.
  • body (string, required) The body of the draft email.
  • recipient (string, required) The recipient of the draft email.
  • cc (array, optional, Defaults to None) CC recipients of the draft email.
  • bcc (array, optional, Defaults to None) BCC recipients of the draft email.

UpdateDraftEmail


Update an existing email draft.

Parameters

  • id (string, required) The ID of the draft email to update.
  • subject (string, required) The subject of the draft email.
  • body (string, required) The body of the draft email.
  • recipient (string, required) The recipient of the draft email.
  • cc (array, optional, Defaults to None) CC recipients of the draft email.
  • bcc (array, optional, Defaults to None) BCC recipients of the draft email.

DeleteDraftEmail


Delete a draft email using the Gmail API.

Parameters

  • id (string, required) The ID of the draft email to delete.

TrashEmail


Move an email to the trash folder.

Parameters

  • id (string, required) The ID of the email to trash.

ListDraftEmails


List draft emails in the user's mailbox.

Parameters

  • n_drafts (integer, optional, Defaults to 5) Number of draft emails to read.

ListEmailsByHeader


Search for emails by header using the Gmail API.

At least one of the following parameters must be provided: sender, recipient, subject, body.

Parameters

  • sender (string, optional, Defaults to None) The name or email address of the sender.
  • recipient (string, optional, Defaults to None) The name or email address of the recipient.
  • subject (string, optional, Defaults to None) Words to find in the subject of the email.
  • body (string, optional, Defaults to None) Words to find in the body of the email.
  • date_range (string, optional, Defaults to None) The date range of the emails.
  • limit (integer, optional, Defaults to 25) The maximum number of emails to return.

ListEmails


Read emails from a Gmail account and extract plain text content.

Parameters

  • n_emails (integer, optional, Defaults to 5) Number of emails to read.

Auth

The Arcade AI Gmail toolkit uses the Google auth provider to connect to users' Google accounts.

With the hosted Arcade AI Engine, there's nothing to configure. Your users will see Arcade AI (demo) as the name of the application that's requesting permission.

The hosted Arcade AI Engine is intended for demo and testing purposes only, not for production use. To use Arcade AI and Google Calendar in production, you must use a self-hosted instance of the Arcade Engine.

With a self-hosted installation of Arcade AI, you need to configure the Google auth provider with your own Google app credentials.