> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Send chat message

> Send a message to an existing Microsoft Teams chat.

`sendChatMessage` posts to a one-to-one, group, or meeting chat identified by
`chatId`.

## Example

```ts automations/send-teams-chat-message.automation.ts theme={null}
import { automation } from "automate.ax"
import { sendChatMessage } from "automate.ax/teams"

export default automation("Send Teams chat message", () => {
  sendChatMessage({
    chatId: "19:opaque-chat-id@thread.v2",
    bodyType: "html",
    body: "<p>The report is <strong>ready</strong>.</p>",
  })
})
```

## Inputs

`chatId` and `body` are required. `bodyType` is `"text" | "html"` and defaults
to `"text"`; HTML must use Teams-supported markup. Optional `account` selects
the Microsoft binding.

## Output

Returns the created normalized `TeamsChatMessage`, including its new
`messageId`, body, and any provider-generated sender, timestamp, URL, and other
metadata.
