Plugins / Gmail
Gmail 2.0.1
The Gmail plugin lets a Vaubaan Gateway mission use Gmail without handing the agent a credential. Search, read (HTML and attachments included), draft, label and create labels in a Gmail mailbox over IMAP, and send messages and drafts over SMTP, with an app password, under risks zoned by who the sender or the recipient is.
1 · The model
How Gmail is modelled
1 plane, 11 things. The things that exist at the service and how they nest. Every permission is written over these; a resource of an account is one of them, named by its ref.
Account One account is one Gmail or Google Workspace mailbox, connected with an app password and reached over IMAP, and over SMTP to send.
Plane · mailboxThe only Gmail plane Vaubaan exposes — the authenticated user account and the threads/messages/labels/drafts contained within. Synthetic risk-zone markers (from-, to-, bulk-, sensitive-) are entities for slice-matching purposes only, not real Gmail resources.
\Drafts). Bounded (dozens at most in practice). NOT a child of thread : a draft is created alone and never sent.from-zone nfrom-zone: Synthetic marker emitted by the classifier when a read call reveals the sender of a message. The bracketed identifier carries the zone name : automated / internal / known-external / unknown. Classification rule lives in classify.ts and reads the resource metadata internal_domains + allowlist_domains + allowlist_addresses.to-zone nto-zone: Synthetic marker emitted by the classifier on draft / send calls. The bracketed identifier carries the zone name : self / internal / allowlist / external-unbounded. Computed from the union of to+cc+bcc recipients vs the resource metadata.bulk-marker 1bulk-marker: Synthetic singleton marker emitted by the classifier when a call may touch many items (a search_threads query not bounded by a positive from:<address> clause). Distinct from the per-item zone markers so the operator confirms bulk-amplification explicitly.sensitive-label nsensitive-label: Synthetic marker emitted by the classifier when a call may read, apply or remove a label listed in the resource metadata sensitive_labels (e.g. FINANCIAL, LEGAL, HR, PERSONAL). Overrides the from-zone classification — a sensitive label gates the read regardless of who the sender is. The identifier is the label name, or * when the label is unknown before the fetch.1 exactly one, namedn a finite, known set* an unknown number, possibly all the resource carries the environment, in the model only no tool touches it
Account
One account is one Gmail or Google Workspace mailbox, connected with an app password and reached over IMAP, and over SMTP to send.
Resource
The mailbox is its single resource. Reads are priced by who the sender is, drafts and sends by who the recipients are. A draft to an address outside the internal domains and the allowlists is refused; a send there is its own risk, external and irreversible.
Environment
- Rule
- No permission of this service depends on an environment: each is held once, whatever the resource.
- Known
- none
- Carried by
mailbox.mailbox, in the model only
2 · Macro-actions
What an agent does at Gmail: 4 macro-actions
A mission is made of them: the person ticks the ones the task needs and sets each to a trust level.
- 1
Search the mail
Read the structure, the threads and the messages, whoever sent them.
Searching the mailbox and reading threads, messages and drafts. Reads are cut by who sent the mail: notifications, colleagues, allowlisted partners and unknown senders are permissions of their own, because an unknown sender's message is the main way instructions get injected into the agent. Threads under a label the owner declared sensitive, and searches that may return hundreds of threads at once, also ask for their own permission.
8 permissions
- 2
Draft
Write and edit drafts. Nothing leaves.
Writing and editing drafts in the mailbox. Nothing leaves: this verb never sends. Each draft is still priced by its recipients (self, colleagues, allowlisted contacts), so a mission can prepare internal notes without preparing mail to partners.
4 permissions
- 3
Send
Send a message or a draft. Nothing can call it back.
Sending a message or a draft over SMTP, under the owner's name. Nothing calls a sent message back, so each recipient zone is a permission of its own, from the mailbox itself to colleagues, allowlisted contacts and anyone else. Sending to an unknown address is how whatever the agent read can leave the company, and is best kept for missions whose job is exactly that.
4 permissions
- 4
Tidy
Apply, remove and create labels.
Organising the mailbox: applying and removing labels on a thread or a message, and creating labels. It is reversible, and moving mail to the trash or to spam is refused outright, because a deletion is not a label. A label the owner declared sensitive is out of this verb: touching one needs "Anything else", the catch-all write.
3 permissions
3 · The map
The map
19 permissions of 4 macro-actions, in the four rows of the tree. For the chosen trust level, each cell gives yes, ask me or no, and the quota a day.
A permission sits in the first row its facts answer: irreversible; costly to undo or unbounded cost; secret or personal data, whole account or bulk, moderate cost, public; otherwise harmless.
| Risk | Search the mailRead the structure, the threads and the messages, whoever sent them. | DraftWrite and edit drafts. Nothing leaves. | SendSend a message or a draft. Nothing can call it back. | TidyApply, remove and create labels. |
|---|---|---|---|---|
| Cannot be repaired Careful: no. Trusting, Autonomous: ask me. | None | None |
| None |
| Repairable, at a price Careful, Trusting: ask me. Autonomous: runs freely. | None | None |
| None |
| Worth a look Careful: ask me. Trusting, Autonomous: runs freely. |
| None | None |
|
| Harmless Runs freely at every level. |
|
|
|
|
Careful: runs freely 13, ask me first 4, not included 2. Trusting: runs freely 16, ask me first 3. Autonomous: runs freely 17, ask me first 2. Limits are counted over a mission's period: a day unless its creator picks another, or the mission's whole life for a one-off. The figures here are per day.
4 · A few calls
A few calls, classified by the plugin
29 declared calls, run through the plugin's own classifier when this page was built; here one per macro-action and the first the catalog refuses at Careful. The 29 calls, as code.
| The call | The plugin sees | The catalog answers | A Careful mission |
|---|---|---|---|
gmail__ |
|
| yes |
gmail__ |
|
| yes |
gmail__ |
|
| yes |
gmail__ |
|
| yes |
gmail__ |
|
| no |
5 · Anything else
Anything else
A call no permission covers touches gmail. instead of slipping through. No macro-action holds it; a person ticks it knowingly.
| Permission | Risk | Careful ×1 | Trusting ×3 | Autonomous ×10 |
|---|---|---|---|---|
Uncategorized Gmail writeWhy it sits here: Catch-all for writes no entry above covers. Today : applying or removing a label the owner declared sensitive, or a user label the classifier cannot tell apart from one (sensitive-label[..].W). If the plugin ever surfaces delete_message or create_filter, they land here until a dedicated permission is added — fail-loud by design. In no macro-action. gmail.uncategorized-write | Repairable, at a price costly to undo | ask me · 50 a day | ask me · 150 a day | yes · 500 a day |
6 · Tools
Tools
14 tools. A tool's permissions depend on its arguments, so a mission is made of the macro-actions above, not of tools.
14 tools · scroll the list
| Tool | What it does | Usually touches |
|---|---|---|
gmail__ | Show how the mailbox is zoned | gmail. |
gmail__ | Search the mailbox | gmail., gmail., gmail., gmail., gmail., gmail., gmail. |
gmail__ | Read a thread | gmail., gmail., gmail. |
gmail__ | Download an attachment | gmail., gmail., gmail. |
gmail__ | List the drafts | gmail. |
gmail__ | Save a draft (never sent) | gmail., gmail., gmail., gmail. |
gmail__ | Send a message | gmail., gmail., gmail., gmail. |
gmail__ | Send a draft | gmail., gmail. |
gmail__ | List the labels | gmail. |
gmail__ | Create a label | gmail. |
gmail__ | Add a label to a message | gmail. |
gmail__ | Remove a label from a message | gmail. |
gmail__ | Add a label to a thread | gmail. |
gmail__ | Remove a label from a thread | gmail. |
7 · Retired permissions
Retired permissions
Kept so the missions that hold them still read; no tool touches them and no new mission is offered them.
- Create / modify a draft to an external recipient not in the allowlist
gmail.draft- to- zone- external- unbounded
8 · Connecting an account
Connecting an account
1 of 3 · a key you create and paste app password
An app password the person creates at Gmail and pastes once; nobody declares anything beforehand.
The whole mailbox over IMAP: an app password has no scopes to choose. What an agent may do is decided by the missions of this gateway, call by call.
- Security2-Step VerificationSign in to the Google Account of the mailbox and turn on 2-Step Verification, if it is not on yet: Google offers app passwords only then.
- App passwordsOpen the page, create an app password named "Vaubaan Gateway" and copy the 16 letters Google shows; if Google says app passwords are not available, the Google Workspace administrator of the account has turned them off. (open)
- SettingsForwarding and POP/IMAPCheck that IMAP is on in Gmail.
- Paste the address of the mailbox and the app password here; the spaces between the groups of letters do not matter.
- Where
- https://myaccount.google.com/apppasswords
- Expiry
- App passwords do not expire: revoke it on the App passwords page of the Google Account to end this account.
- The connect page asks
- Gmail address and App password (secret)
- The service's documentation
- https://support.google.com/accounts/answer/185833
- Disconnecting
- Delete the app password named "Vaubaan Gateway" at https://myaccount.google.com/apppasswords, in the Google Account of the mailbox.
9 · Health
Health
17 gateways run this plugin (over the last 90 days).
| Version | Gateways | Calls | Success | Validated |
|---|---|---|---|---|
2. | 7 | 1 | 100.0 % | |
1. | 5 | no call yet | — | |
1. | 3 | 16 | 100.0 % | |
0. | 2 | no call yet | — |
A version is marked validated by the community with at least 200 reports and a success rate of at least 90 %, over the last 90 days; a gateway shows that mark on the accounts of this service. The figures are refreshed at most hourly (what they mean). It is a community signal, not a security guarantee.
Calls are counted over the last 90 days from the instances that share plugin health. Gateways are counted over the same window among the instances that also share usage statistics, so they are a lower bound. The success rate leaves out calls refused for a rejected credential: a revoked token is the user's configuration, not the plugin.
10 · Links
Links
Last changed 2026-12-02. This page as Markdown: /plugins/gmail.md