Skip to main content
The Chat SDK provides a unified API for posting messages across Slack, Teams, Google Chat, and Discord.

Basic Message Posting

Simple Text

Markdown

Use the markdown format for cross-platform formatting:
Markdown is automatically converted to platform-specific formats (Slack mrkdwn, Teams/Discord markdown, Google Chat HTML).

Raw Platform Text

Skip markdown conversion and send platform-specific text:

AST (Advanced)

Use mdast AST for programmatic message construction:

Interactive Cards

Create rich interactive cards with buttons, inputs, and structured layouts:
Cards are automatically converted to platform-specific formats: Slack Block Kit, Teams Adaptive Cards, and Google Chat Cards.

File Attachments

Uploading Files

Multiple Files

Image Attachments

Ephemeral Messages

Send messages visible only to a specific user:

Fallback to DM

On platforms without ephemeral support (Teams, Discord), automatically fall back to DM:

Slack

Native ephemeral (session-dependent, disappears on reload)

Google Chat

Native private message (persists, only target user sees it)

Discord

No native support - requires fallbackToDM: true

Teams

No native support - requires fallbackToDM: true

Sent Message Operations

All posting methods return a SentMessage with edit/delete capabilities:

Editing Messages

Deleting Messages

Adding Reactions

Typing Indicators

Show that the bot is processing:
Some platforms support persistent typing indicators with status text (Google Chat), others just send once (Slack).

Mentioning Users

Create platform-specific user mentions:

Posting to Channels vs Threads

Thread-Level Posting

Channel-Level Posting

On platforms without native threading, thread and channel posting are the same. Always test cross-platform behavior.

Opening Direct Messages

Start a DM conversation with a user:

Message Content Extraction

When you post a message, the SDK extracts content for the SentMessage object:
The SDK automatically converts all message formats to both plain text and mdast AST for consistency.