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

# Microsoft Teams

> Connect Microsoft Teams to send messages to channels and chats from your workflows.

## How to set up Microsoft Teams

### Authentication

Microsoft Teams uses OAuth 2.0 authentication:

1. Click the Connect button in Cargo
2. Sign in with your Microsoft account
3. Grant consent for Cargo to send messages
4. Connection is established automatically

**Required permissions:**

* Send messages to channels
* Send messages to chats
* Read team and channel information

## Microsoft Teams actions

### Create channel message

Send a message to a Teams channel.

**Required fields:**

* **Team**: Select the team containing the channel
* **Channel**: Select the target channel
* **Content Type**: Choose Plain Text or HTML
* **Message**: The message content (supports expressions)

**Use cases:**

* Send lead notifications to sales channels
* Alert teams about important events
* Share workflow status updates
* Notify about deal stage changes

### Create chat message

Send a message to a Teams chat (direct message or group chat).

**Required fields:**

* **Chat**: Select the chat to message
* **Content Type**: Choose Plain Text or HTML
* **Message**: The message content (supports expressions)

**Use cases:**

* Send direct notifications to specific users
* Alert managers about high-priority leads
* Notify individuals about assigned tasks

## Message formatting

### Plain Text

Simple text messages without formatting.

```
New lead from {{company_name}}
Contact: {{first_name}} {{last_name}}
Email: {{email}}
```

### HTML

Rich formatted messages with styling.

```html theme={null}
<b>New Lead Alert</b><br>
Company: {{company_name}}<br>
Contact: {{first_name}} {{last_name}}<br>
<a href="mailto:{{email}}">{{email}}</a>
```

**Supported HTML elements:**

* `<b>`, `<strong>` - Bold text
* `<i>`, `<em>` - Italic text
* `<a href="">` - Links
* `<br>` - Line breaks
* `<ul>`, `<ol>`, `<li>` - Lists

## Example messages

### Lead notification

```
🆕 New Lead

Company: {{company_name}}
Contact: {{first_name}} {{last_name}}
Title: {{job_title}}
Source: {{lead_source}}

View in CRM: {{crm_link}}
```

### Deal won celebration

```
🎉 Deal Won!

{{company_name}} - ${{deal_value}}
Owner: {{sales_rep}}
Close Date: {{close_date}}

Great work, team!
```

### Task assignment

```
📋 Task Assigned

Lead: {{first_name}} {{last_name}} at {{company_name}}
Action: {{task_description}}
Due: {{due_date}}

Please follow up within 24 hours.
```

## Rate limits

Microsoft Teams API has a rate limit of 50 requests per second. Cargo handles rate limiting automatically to ensure reliable message delivery.

## Best practices

* Use descriptive emojis to make messages scannable
* Include relevant links for quick access
* Keep messages concise and actionable
* Use HTML formatting for complex information
* Set up dedicated channels for different alert types
* Consider message frequency to avoid notification fatigue
