reply_email
Send a reply within an existing Gmail thread, automatically adding "Re:" to the subject and optionally CC all original recipients.
Instructions
Convenience wrapper to reply to an existing thread.
Automatically prepends "Re: " to the subject if missing.
Can CC all original recipients with reply_all=True.
Required:
to (str) — recipient address.
body (str) — reply text.
thread_id (str) — Gmail thread ID to reply within.
in_reply_to (str) — Gmail message ID being replied to.
GET THIS FROM get_thread_messages(thread_id) — do not guess.
Optional:
subject (str, default="") — if empty, "Re: " is prepended to the
original message's subject.
cc (str, default="") — additional CC recipients.
bcc (str, default="") — BCC recipients.
reply_all (bool, default=False) — if True, auto-CCs all other
recipients from the original message (To and CC headers).
Returns on success:
{"message_id": "...", "thread_id": "...", "to": "...", "subject": "..."}
Workflow note: CRITICAL — in_reply_to must be a Gmail message ID
(e.g. "19e09c7f2e8d487d"), NOT an email Message-ID header
(e.g. "<CAC4dBmc...@mail.gmail.com>"). To find the right ID:
1. Call get_thread_messages(thread_id)
2. Pick the message ID from the "messages" array
3. Pass that to reply_email's in_reply_to parameter
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | ||
| to | Yes | ||
| bcc | No | ||
| body | Yes | ||
| subject | No | ||
| reply_all | No | ||
| thread_id | Yes | ||
| in_reply_to | Yes |