Google Workspace

Send Gmail

google_mail_send · Changes data · Markdown

Sends an email, or a reply in the same thread, as one of the company's mailboxes.

$0.001 a call

From your agent’s balance. A call that fails costs nothing.

An example

Answer Rachel from our Gmail that the Tabor ships Monday.

Your agent callsgoogle_mail_send$0.001 a call

The example business is Halverson Cycle & Repair, a bike shop with a repair workshop in Portland, Oregon. The reply is the one the tool really gives.

With these arguments
{
  "mailbox": "support@halversoncycle.example",
  "to": [
    "rachel.kim@example.com"
  ],
  "subject": "Your Tabor ships Monday",
  "body": "Hi Rachel,\n\nYour Tabor leaves our workshop on Monday, built and tuned.\n\nHalverson Cycle & Repair"
}
What comes back
{
  "sent": true,
  "from": "support@halversoncycle.example",
  "to": [
    "rachel.kim@example.com"
  ],
  "cc": null,
  "reply_to": null,
  "message_id": "192e2b77d1c0aa03",
  "thread_id": "192e2b77d1c0aa03"
}

Use it when

The agent answers a customer from the company's own address.

  • For an address on Conecto's own mail domain, use email_send.

What it does

Send an email as one of the company's mailboxes: to, cc, subject and a text body. With reply_to_message_id it answers that message in the same thread (to its sender unless `to` says otherwise). $0.001.

What comes back

sent; from; to; cc; reply_to; message_id; thread_id. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
mailboxstringOne of the mailboxes the agent may act as; optional when only one is connected. Up to 254 characters.
toarray of stringsUp to 50 items.
ccarray of stringsUp to 50 items.
subjectstringUp to 300 characters.
bodyRequiredstring1 to 50,000 characters.
reply_to_message_idstringUp to 200 characters.

The call

Over MCP, call google_mail_send on https://api.conecto.chat/mcp/googleworkspace. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/google_mail_send \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mailbox":"support@halversoncycle.example","to":["rachel.kim@example.com"],"subject":"Your Tabor ships Monday","body":"Hi Rachel,\n\nYour Tabor leaves our workshop on Monday, built and tuned.\n\nHalverson Cycle & Repair"}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
not_connected409Google Workspace isn't connected yet.Connect it with google_connect.
not_allowed403The mailbox is not one the agent may act as.Use a connected mailbox; the owner adds one by connecting again.
vendor_rejected502Google refused: delegation is missing a scope, or Google said no.Ask the Workspace admin to grant what the message names.
invalid_input400A new email lacks to or subject, or an address is not valid.Give to and subject, or reply_to_message_id.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md