Gmail and email integration

Gmail and email AI agents: draft, summarise and send with guardrails

Email is sensitive on both sides: reading exposes private content, sending speaks on your behalf. AgentRow lets you mark the read tool sensitive, put the send tool behind approval, and block topics in the final answer.

Tool type
HTTP API
Auth type
oauth2 or api_key (transactional email provider)
Safety level
sensitive_read for inbox access, write_sensitive for sending

What you can build

An assistant that summarises a thread the user pastes or that a read tool fetches, and drafts a reply in the house tone.

A support agent that sends a confirmation email through a transactional provider after the user approves the text.

An internal agent that turns a chat outcome into an email digest for a team alias.

How to connect Gmail and email

  1. 01Choose the sending API: the Gmail API with an OAuth token, or a transactional provider with an API key. Store the credential on the tool's auth settings.
  2. 02Create an HTTP API tool for sending with the safety level write_sensitive and requires approval enabled, and a body template for to, subject and text.
  3. 03If the agent reads mail, create a separate read tool with sensitive_read and a read-only flag, and limit the number of messages it returns.
  4. 04In the agent's Guardrails tab, add blocked topics and deny rules for content the agent must never send.
  5. 05Attach the tools, run a test that drafts and sends, and confirm the send waited for approval in the trace.

Example tool definition

The shape a tool takes in the AgentRow builder API. Credentials are stored on the tool's auth settings, not in its configuration, so they never reach a prompt. Placeholders in double braces are filled by the model from the input schema.

{
  "name": "send_email",
  "type": "http_api",
  "description": "Send an email. Use only after the user approved the recipient, subject and body.",
  "auth_type": "api_key",
  "safety_level": "write_sensitive",
  "requires_approval": true,
  "config": {
    "method": "POST",
    "url": "https://api.example-mail.com/v1/messages",
    "headers": { "Content-Type": "application/json" },
    "body_template": { "to": "{{to}}", "subject": "{{subject}}", "text": "{{text}}" },
    "allowed_domains": ["api.example-mail.com"]
  },
  "input_schema": {
    "type": "object",
    "properties": {
      "to": { "type": "string", "description": "Recipient email address" },
      "subject": { "type": "string" },
      "text": { "type": "string", "description": "Plain-text body" }
    },
    "required": ["to", "subject", "text"]
  }
}

What the run trace shows

Every call appears in the run trace with the rendered request, the response status and body, timing, retries and errors, plus what the model was shown of the result. If the model never called the tool, the toolbox step shows whether it was bound for that model call and why.

Frequently asked questions

What does requires approval do today?

A call that requires approval does not execute silently; it returns an explicit approval-required result that the model and the trace can see. Interactive approval previews inside the chat are on the roadmap.

How do guardrails apply to email content?

Blocked topics and deny or allow rules are checked on the final answer, and apps add their own safety check after the agent's. Put the rules in the agent's Guardrails tab and the app's settings.

Is there a typed email connector?

An email tool type exists but is not executable yet; HTTP API tools against the Gmail API or a transactional provider are the supported path today.

Connect Gmail and email to your first agent

Join the waitlist for early access. Tell us which systems you need to connect and we will point you at the right tool definitions.