email-outbound Card
Authoring Outbound Emails
You compose an email by writing an email-outbound card. Headers live in the YAML frontmatter; the message body is the markdown body of the card. The Gmail connector picks the card up on the next sync and creates a Gmail draft for the user to review and send.
Required fields (frontmatter)
to:— recipient address(es), comma-separatedsubject:— subject line. For replies, prefix withRe:to match the source thread's subject.
The card's body is the email body. Markdown subset only: **bold**, *italic*, [text](url). Nothing else.
Optional fields
cc:andbcc:— additional recipientsin-reply-to.ref:— for replies, points at the sourceemail-messagecard. Use a path relative to the draft's directory (typically justmsg-NNN.email-message.cardsince the draft sits in the same thread directory). The connector reads the source card'smessage-idandthread-idto set Gmail threading headers — if the ref doesn't resolve, the upload fails rather than silently lose threading.
Placement
- Reply drafts go inside the existing thread's
.attach/next to the source message, e.g._content/inbox/email/thread-X.attach/draft-001.email-outbound.card. This keeps the conversation co-located. - New emails (no thread) go in a fresh directory under
_content/inbox/email/.
Lifecycle
status: draft(default) — the connector uploads to Gmail's Drafts folder on next sync and stamps the card withgmail-draft-id:andgmail-draft-url:. Share the URL with the user so they can review and send. Once stamped, the draft is not re-uploaded; editing the card after upload doesn't update the Gmail draft (yet).- Deleting the card does not delete the Gmail draft — once Gmail has it, the user owns it.
Threading checklist for replies
- Place the draft in the same directory as the source message.
- Set
in-reply-to.ref:pointing at the specific message you're replying to. - Set
subject: Re: <original subject>. - Don't set
statusexplicitly — it defaults todraft.
The contains: field
Give this card a one-sentence contains: — the prime retrieval field for bbx search and listings. How to write a good one (carry the information when it's concise, never a list of parts, under 200 characters) is in the agent guide's ABOUT_CARDS section.