Docs/Skills & Integrations/Gmail
Integration

Gmail

Connect your agent to Gmail. Read, search, and send emails with Google OAuth credentials.

Setup Guide#

1

Create a Google Cloud Project

Go to the Google Cloud Console, create a new project, and enable the Gmail API.

2

Create OAuth Credentials

Go to APIs & Services → Credentials → Create Credentials → OAuth Client ID. Select "Web application" and note the Client ID and Client Secret.

3

Generate a Refresh Token

Use the OAuth 2.0 Playground to generate a refresh token:

  • Select Gmail API scopes: https://www.googleapis.com/auth/gmail.modify
  • Authorize with your Google account
  • Exchange the authorization code for a refresh token
4

Add to Lobstack

Go to Dashboard → Skills → Gmail → ⚙️ and enter:

  • Google Client ID
  • Google Client Secret
  • Refresh Token
⚠️

Refresh tokens can expire

Google refresh tokens may expire if your project is in "testing" mode (every 7 days). To avoid this, publish your OAuth consent screen or add your email as a test user.

Available Tools#

ToolDescriptionParameters
gmail_list_emailsList and search emails in your inboxquery (Gmail search syntax), count
gmail_send_emailSend an email (plain text or HTML)to, subject, body, html (optional)

The query parameter supports Gmail search operators:

text
is:unread                    — Unread emails
from:boss@company.com        — From a specific sender
subject:invoice              — Subject contains "invoice"
after:2026/01/01             — Emails after a date
has:attachment               — Emails with attachments
label:important              — Labeled as important

Example Prompts#

text
"Show me my unread emails"
"Search for emails from john@example.com"
"Send an email to team@company.com with subject 'Weekly Report'"
"Find all emails with attachments from this week"