Send a message
send_messageSend a text message to a Google Chat space as the authenticated user, with markup, threaded replies, and duplicate protection through custom message IDs.
Instructions
Sends a text message to a space AS THE AUTHENTICATED USER (their name and avatar; needs the chat.messages.create or chat.messages scope, and the user must be a member of the space). Text supports Chat markup: bold, italic, strike, code, https://url|link, <users/123> mentions. Threads: pass thread_name (from a message's thread.name) or a stable thread_key of your choosing to reply in a thread; by default a missing thread falls back to starting a new one — set reply_option="or_fail" to error instead. In non-threaded spaces the thread params are ignored by the API. message_id (must start with "client-") makes the send addressable later without storing the returned name — reuse of an id fails with ALREADY_EXISTS, which also makes accidental duplicate sends detectable. Returns the created message with name, thread.name and createTime. A send is NEVER retried after a 5xx/timeout: check with list_messages before re-sending. Cards (cardsV2) are app-auth-only — out of scope; use raw_request with a Chat-app token.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The message text (up to 4096 characters; Chat markup supported). | |
| space | Yes | The space — "spaces/<id>" or the bare id from list_spaces / a Chat URL (chat.google.com/room/<id>). | |
| message_id | No | Custom id for the message, e.g. "client-deploy-42"; must be unique per space. | |
| thread_key | No | Opaque key of your choosing: first use starts a thread, reuse replies into it. | |
| thread_name | No | Reply into this existing thread (thread.name from get_message/list_messages). | |
| reply_option | No | When targeting a thread: fallback_to_new_thread (default) starts a new thread if it doesn't exist; or_fail errors instead. |