The draft flow saved a draft with draft_email. Drafts are safe — they sit in your outbox until you hit send. Today we remove that buffer. GMAIL_SEND_EMAIL delivers immediately. No undo.
I remember draft_email stayed in Drafts until I opened Gmail and deleted it. So GMAIL_SEND_EMAIL is the same call but it leaves the outbox the moment it runs?
Exactly. Same three parameters — to, subject, body — different action. The mechanics are identical; the consequence is not. Here's the call:
result = toolset.execute_action(Action.GMAIL_SEND_EMAIL, {
"recipient_email": to,
"subject": subject,
"body": body,
})The parameter key is recipient_email, not to? I would have typed to and wondered why nothing worked.
Good catch — that trips everyone once. Composio maps Gmail's API field name, not your function argument. recipient_email is what the action expects; your function can still accept to on the outside and pass it in. The mismatch is why you always check the action's own parameter names before running a send.
So I can write a clean def send_email(to, subject, body) and handle the translation inside. It still reads naturally at the call site.
Exactly — the caller sees your interface, not Composio's. Keep your function signatures human-readable. Now, one rule before you point this at anyone else's inbox:
def send_email(to: str, subject: str, body: str) -> dict:
result = toolset.execute_action(Action.GMAIL_SEND_EMAIL, {
"recipient_email": to,
"subject": subject,
"body": body,
})
return resultWhat's the rule?
Always send to yourself first. Real workflows should confirm before sending — show the draft, ask for approval, then call send_email. Tests should never hit a colleague's inbox. In a real automation you'd gate this behind a confirmation step: draft, review, approve, then send.
GMAIL_SEND_EMAIL delivers immediately — there is no draft stage and no recall.
The action expects recipient_email, not to. Composio uses Gmail's API field name:
| Your arg | Composio key |
|---|---|
to | recipient_email |
subject | subject |
body | body |
In any real workflow: draft → review → send. Never call send_email without a confirmation gate when the recipient is someone other than yourself. Tests always target your own address.
The draft flow saved a draft with draft_email. Drafts are safe — they sit in your outbox until you hit send. Today we remove that buffer. GMAIL_SEND_EMAIL delivers immediately. No undo.
I remember draft_email stayed in Drafts until I opened Gmail and deleted it. So GMAIL_SEND_EMAIL is the same call but it leaves the outbox the moment it runs?
Exactly. Same three parameters — to, subject, body — different action. The mechanics are identical; the consequence is not. Here's the call:
result = toolset.execute_action(Action.GMAIL_SEND_EMAIL, {
"recipient_email": to,
"subject": subject,
"body": body,
})The parameter key is recipient_email, not to? I would have typed to and wondered why nothing worked.
Good catch — that trips everyone once. Composio maps Gmail's API field name, not your function argument. recipient_email is what the action expects; your function can still accept to on the outside and pass it in. The mismatch is why you always check the action's own parameter names before running a send.
So I can write a clean def send_email(to, subject, body) and handle the translation inside. It still reads naturally at the call site.
Exactly — the caller sees your interface, not Composio's. Keep your function signatures human-readable. Now, one rule before you point this at anyone else's inbox:
def send_email(to: str, subject: str, body: str) -> dict:
result = toolset.execute_action(Action.GMAIL_SEND_EMAIL, {
"recipient_email": to,
"subject": subject,
"body": body,
})
return resultWhat's the rule?
Always send to yourself first. Real workflows should confirm before sending — show the draft, ask for approval, then call send_email. Tests should never hit a colleague's inbox. In a real automation you'd gate this behind a confirmation step: draft, review, approve, then send.
GMAIL_SEND_EMAIL delivers immediately — there is no draft stage and no recall.
The action expects recipient_email, not to. Composio uses Gmail's API field name:
| Your arg | Composio key |
|---|---|
to | recipient_email |
subject | subject |
body | body |
In any real workflow: draft → review → send. Never call send_email without a confirmation gate when the recipient is someone other than yourself. Tests always target your own address.
Create a free account to get started. Paid plans unlock all tracks.