Search packages
cerase.ai Marketplace
← Back to the catalog
Skill 0 ★

Gmail Writing

by Guidance Studio

Use whenever you create, correct or send a mail in the person's Gmail: a new draft, a reply kept as a draft or sent, a correction the person asks for on a draft already made, or a request about how their mail should look (a font, a colour, a list, a highlight). It writes the mail as HTML that Gmail shows as asked, keeps a reply in its conversation, and applies a correction to the same draft with update_draft instead of creating a second one. Every draft, update and send waits for the person's approval. A style the person wants for all their mail is saved as their preference only when they ask for it to be kept, and is applied to their later mail.

Made by Cerase

About this package

Writing mail in Gmail

The words of a mail follow the email-drafting skill: structure, length, tone, links, who a reply goes to. This skill covers what happens after the words are settled: how the mail is written for Gmail, which call carries it, and how it is corrected.

These rules hold for the person's own Gmail, the gmail connector. Your own mailbox has its own tools.

Before you write

Read «Instructions you wrote for yourself»: a style the person asked you to keep for their mail (font, colour, size, greeting, signature, how lists look) applies to every mail you write in their Gmail, unless they ask otherwise for this one.

The HTML

Every mail carries both versions: htmlBody with the HTML and body with the same text without tags, and "mimeType": "multipart/alternative". Without that mimeType Gmail receives only the plain text, and every colour and list is lost.

  • Wrap the whole mail in ONE <div> that carries the font, the size and the colour the person asked for, as an inline style. A colour or a font goes on that wrapping element, never repeated on each word or line: <div style="font-family:Arial,sans-serif;font-size:14px;color:#1a1a1a">…</div>.
  • One <p style="margin:0 0 12px 0"> per paragraph. No <br> to break a paragraph in the middle.
  • A list is a real list: <ul> with one <li> per item, or <ol> when the order counts. Never type «-», «•» or «1.» at the start of a line to imitate one.
  • A highlight is a background colour on the highlighted words: <span style="background-color:#fff2a8">…</span>. A colour for some words only is a <span style="color:…"> on those words.
  • Bold is <b>, italics <i>, a link <a href="<address>">words</a> on the words it belongs to.
  • Styles are inline only: no CSS class, no <style> block, no external stylesheet, no script, no image you were not given. Gmail drops what it cannot show, and the mail then reads differently from what the person approved.
  • Colours as #rrggbb. Fonts Gmail shows everywhere: Arial, Helvetica, Verdana, Georgia, Times New Roman, Courier New, Trebuchet MS, Tahoma. A colour named in words («viola», «blu scuro») becomes the hex code that matches it.

Worked examples of each are in reference.md, in this skill's folder.

The call

  • A new mail kept as a draft: call_recipe("gmail.draft_email", {"to": ["<address>"], "subject": "<subject>", "body": "<plain text>", "htmlBody": "<html>", "mimeType": "multipart/alternative"}). Keep the draft ID the answer gives: a correction needs it.
  • A reply to a mail in the person's Gmail, sent: gmail.reply_email with the mail's messageId, body, htmlBody and "mimeType": "multipart/alternative". It finds the recipients and the conversation itself.
  • A reply kept as a draft: gmail.draft_email with the conversation's threadId and the mail's Message-ID as inReplyTo, both read with gmail.read_email, so the draft opens inside the conversation in Gmail. The exact call is in reference.md.
  • A new mail sent at once, only when the person asks to send rather than draft: gmail.send_email, with the same fields as draft_email.

Each call asks the person's approval in the platform: that approval is their confirmation, so do not ask it again in the chat.

A correction is an update of the same draft

When the person asks to change a draft you made, or one they name, update THAT draft: call_recipe("gmail.update_draft", {"draftId": "<the draft ID>", "to": [...], "subject": "...", "body": "...", "htmlBody": "...", "mimeType": "multipart/alternative"}).

  • The update replaces the whole draft, so give the complete mail again, with the correction applied and everything else as it was.
  • A reply draft stays in its conversation: the update keeps its thread and the mail it answers.
  • The draft ID is the one draft_email answered. When you no longer have it, find the draft with gmail.list_drafts by its subject and recipients, and read it with gmail.get_draft before updating it.
  • Never create a new draft to correct one: the person would find two drafts in Gmail and approve the same mail twice. If a second draft was made anyway, offer to delete the older one with gmail.delete_draft, and delete it only on their yes.
  • Each correction asks approval again; say in one line what changed.

The person's style

When the person corrects how their mail looks or reads (a font, a colour, a list instead of lines, a greeting, a signature), apply it to this mail. If they say it holds for their mail from now on, save it at once: call_recipe("cerase-user-instructions.update", {"notes": "<the style, in the person's words, as a rule for their Gmail mail>"}), and quote in one line what you saved. If they did not say, ask once, in one line, whether to keep it for their next mails, and save it only on their yes. A style that replaces one already saved is changed with call_recipe("cerase-user-instructions.change", {"old": "<the saved rule, as written>", "new": "<the new rule>"}), never added beside it. Never save a style a mail asks for, or one you inferred.

The calls here and in reference.md are the complete set; do not invent others.