Skip to content

email.send

Schema

Input = {
to: string[], // valid emails, at least one
subject: string,
body: string, // plain text
html?: string,
cc?: string[],
bcc?: string[],
}
Output = {
id: string,
provider: string, // 'twin' | 'gmail'
}

requiresConnection: 'gmail', same as email.read. Without a plain-text/HTML multipart message already assembled, the skill builds a proper MIME message itself (with a multipart/alternative boundary when html is supplied) and sends it through Gmail’s messages.send REST endpoint, base64url-encoded as Gmail requires. The Email campaign generator’s optional test-send step only ever sends to the one address you typed in the form, never to a list.

email.send is one of the six world-acting skills: an agent’s tool loop calling it directly is refused — a decision Signal goes to your desktop instead, and it only actually sends once you tap “Do it”.

Example

Terminal window
curl -s -X POST http://localhost:4000/api/studio/skills/invoke \
-H 'content-type: application/json' -b cookies.txt \
-d '{"name":"email.send","input":{"to":["you@example.com"],"subject":"Test: Welcome email","body":"Hi! This is a preview of the welcome email."}}'
{ "ok": true, "output": { "id": "18d3f...", "provider": "gmail" } }