Solutions

Email & follow-ups

The reply, drafted with the real number in it.

@attest_tagdirect message4 tool calls

A five-day-old mail answered: the thread read, the October invoice looked up in billing so the figure is real, and the reply written into the asker's own Gmail drafts. It drafts and stops — the send is a human pressing send, in their own mail client.

attest_tag

Sam9:11 AM

draft a reply to Dan about the PO split — check what we actually invoiced him in October

attest_tagApp9:12 AM

  • http_request · GET gmail.googleapis.com/gmail/v1/users/me/threads/18f…?format=full · 4 messages
  • http_request · GET api.stripe.com/v1/customers/search?query=email:'[email protected]' · 1
  • http_request · GET api.stripe.com/v1/invoices?customer=cus_…&limit=10 · 1 in October
  • http_request · POST gmail.googleapis.com/gmail/v1/users/me/drafts · held

Please confirm — this needs your OK. October was one invoice, £24,000, issued 1 Oct, still unpaid — so a split is a credit note and two new invoices, not an edit. The draft says so:

  • “Yes — we can split October across two POs. It went out as a single invoice (INV-2026-0412, £24,000, 1 Oct), so finance will void that one and reissue against each PO. Send me the two numbers and the split you want and I'll get it moving this week.”
  • It will be saved as a draft in your Gmail. I do not send mail.

Waiting on a human

Save a draft reply to Dan Ellis

In reply to “October PO split”, thread 18f…. Saved to your drafts; not sent. Open it in Gmail to edit or send.
google/gmail · as SamPOST /gmail/v1/users/me/drafts

Saved — it is in your Gmail drafts, on the existing thread. Nothing has gone to Dan.

google/gemini-flash8.9k in520 out$0.0047Configure

Names, figures, repositories and customers are changed; token counts and cost are illustrative. The ask, and the shape of the answer, are as they were.

How the turn went

The figure is looked up, the draft is held, and the scope is wider than the habit.

  1. 01

    The number comes from billing, not from memory

    The customer is found by the address on the mail thread, and the invoice is read from the billing connection. A figure recalled rather than fetched is the one thing a reply like this cannot afford to get wrong, and the status line shows where this one came from.

  2. 02

    It reads what the split would actually mean

    One issued invoice cannot be edited into two, so the draft says credit note and reissue rather than promising an edit. The reply is only as useful as the thing it is willing to be specific about.

  3. 03

    A draft is still a write

    Creating the draft is held at a card that shows the text in full. Nothing lands in the asker’s mailbox until they press it, and nothing leaves the mailbox at all.

  4. 04

    The scope Google does not offer

    Gmail has no draft-only permission: the scope that lets anything write a draft is the same scope that lets it send. So the consent screen a person sees when they connect their account says “send mail as you”, and the checkbox in the console says so too, rather than quietly claiming a narrower grant. The bot only ever drafts — but that is a property of the product, which the console’s audit trail lets you check, not of the permission.

What it needs

The setup, in the console.

Connection
The Google Workspace preset: an OAuth client an admin registers once, with the parts you mean to use ticked — Gmail, Calendar, Drive, Contacts — attached to the channel.
Credential
Each person's own sign-in, from a Connect button the bot DMs them, held per user. No shared token exists for a channel to spend.
Connection
The Stripe preset with a read-only restricted key, attached to the channel. Any billing system with an HTTP API does the same job through the custom preset.
Writes policy
confirm. Reading the thread and the invoice runs; saving the draft shows the card.

What it will not do

Enforced outside the model.

  • It drafts and stops. Sending is a person pressing send in their own mail client.

  • The billing key is read-only by construction: nothing about an invoice can be changed through it, whatever a mail body asks for.

Try it

Say it in a channel it is in.

The sentence as it was typed. It works in any channel the bot has been invited to that carries the connection above — no command syntax, no form, and follow-ups in the thread need no mention.

draft a reply to Dan about the PO split — check what we actually invoiced him in October

  • Gmail
  • Stripe
  • http_request

Bring the channel this would live in.

Sign up, connect the service above in one channel, and type this sentence yourself — or run the same binary on your own infrastructure.

All solutions