An OpenFactory agent triaging and drafting email in a connected Gmail inbox

Email Integration

Gmail connection with a draft-first operating model

Managed OAuth is available now; least privilege, account assignment, data-flow review, and send approval remain your responsibility.

Gmail is configured in the production connection catalog. The current path uses Composio Cloud for managed OAuth and provider-token storage; connect a least-privileged test account, bind that exact connection to one role, and keep sending behind review until the workflow is proven.

A concrete use case

Consider a sales follow-up workflow. A prospect replies to one of your outreach threads while you are in a meeting. Your agent reads the thread, drafts a reply that answers the question and proposes two meeting times, files the email under a “Needs follow-up” label, and leaves it as a draft for you to approve. The expected outcome is a reviewable draft and label change; confirm both in Gmail rather than relying on the agent's summary.

Example prompt

Review and adapt this in console.openfactory.tech after connecting a test account. The prompt requests a draft, not an autonomous send.

You are my sales follow-up agent with access to my Gmail.

When a prospect replies to one of my outreach threads:
- Read the thread for context.
- Draft a reply that answers their question and proposes two concrete next-step times.
- Apply the "Needs follow-up" label.
- Save the reply as a draft for me to approve before it sends.

At 8am each weekday, summarize any prospect threads still waiting on me.

How to connect Gmail

  1. Open the OpenFactory console and choose Gmail.
  2. Authorize a dedicated or least-privileged Google account and inspect the requested scopes.
  3. Assign the exact connection to one role. Start with drafts; verify denied accounts, recipients, attachments, audit history, rate limits, disconnection, and upstream revocation before expanding access.

You can connect Gmail alongside the rest of your stack - see all integrations for the current catalog and clearly labeled planned patterns.

Frequently asked questions

What can an AI agent do in Gmail?

The connected Gmail toolkit can expose provider actions such as reading, labeling, drafting, or sending, subject to its current scopes and tool catalog. Assign the exact account to a role and begin with drafts; do not infer permission or success from the prompt alone.

Does the agent send email as me?

A successful send uses the connected Gmail account. Verify the From address, Sent record, recipients, thread placement, and provider audit history. The agent's narration is not evidence that a message was sent correctly.

Can I keep a human in the loop before anything sends?

Use a draft-first workflow and require a person to verify recipients, attachments, quoted content, and sensitive data. Direct sending should be a separate, narrowly scoped decision with tests, rate limits, monitoring, and a revocation procedure.

Is my mailbox data kept private?

The current Gmail path uses Composio Cloud for OAuth and token storage; OpenFactory stores an encrypted connected-account reference. Email content requested by a tool can pass through Gmail, Composio, OpenFactory, and the configured model path. Self-hosting only the OpenFactory control plane does not make that path local.

Build the image instead of hand-assembling it

Use OpenFactory to turn the same requirements into a bootable, testable Linux system.

Open console