This page is also inEN
iTeam
API guide · Communication, email and calendar With your company’s credentials

Gmail API: what you can do and how to use it with AI agents

The Gmail API gives programmatic access to Gmail and Google Workspace mailboxes: messages, threads, labels and drafts. Companies use it to automate triage, replies and logging e-mails in other systems. Access is by OAuth 2.0 with a Google Cloud project.

Nina
API guide

What the Gmail API offers

Messages and threads

Reading, searching with the same syntax as Gmail, sending and moving e-mails and threads.

Drafts

Creating and editing drafts that can be reviewed before sending.

Labels

Creating and applying labels to organize the inbox.

Attachments

Downloading and sending attached files.

Push notifications

Alerts about mailbox changes through Google Cloud Pub/Sub.

Settings

Filters, auto-replies, forwarding and signatures.

How to access the Gmail API

  • With your company’s credentialsOAuth 2.0 with a Google Cloud project and Gmail scopes; on Workspace accounts, the administrator can authorize a service account with domain-wide delegation.
  • Broad Gmail scopes are classified as restricted by Google and may require app verification.
  • There are usage quotas per user and per project.
  • E-mails contain personal and confidential data: limit which mailboxes the agent accesses.

Official documentation: developers.google.com/gmail/api

What an iTeam agent does with the Gmail API

Sales inbox triage

The agent reads e-mails sent to the contact address, sorts them by subject, creates the lead in the CRM and prepares a draft reply for the salesperson to review.

Supplier invoices and payment slips

Invoice and payment-slip attachments are identified, saved in the right folder and entered as a payable for checking.

Follow-up that never slips

The agent tracks proposals that were sent and, with no reply after the agreed time, suggests a follow-up in the company's tone.

Inbox summary for executives

Executives get a daily summary of the e-mails that need a decision, separated from the rest.

From the credential to the agent at work, with approval

01

Create the Google Cloud project

Enable the Gmail API, set up the consent screen and choose the minimum scopes, such as read and drafts.

02

Authorize the mailboxes in iTeam

Each mailbox is authorized by OAuth or by administrator delegation; the token stays in the vault and you define what each agent can do.

03

Start with drafts

At first the agent only creates drafts and labels; direct sending is enabled later for low-risk messages.

Questions

Questions about the Gmail API

Is the Gmail API free?

Yes, in general. Using the API is not charged within Google's quotas; the cost is the Gmail or Workspace account itself.

Do I need to write code to use the Gmail API with iTeam?

No. iTeam already connects to Gmail and the deployment team helps with the Google Cloud project and the authorizations.

Does the agent send e-mail on my behalf without my seeing it?

Only if you allow it. By default the agent prepares drafts and sends after your approval.

Next step

Put an AI team to work this week.

Start free with a pre-built team, or talk to us and our squad puts AI in production with your people.

300+integrations
4languages
Agents working right now