# Crontinel Microsoft Teams Integration via Webhook

> Send Crontinel Laravel monitoring alerts to Microsoft Teams using an Incoming Webhook connector on your team channel.

Source: https://crontinel.com/integrations/microsoft-teams/

Many Laravel teams on Microsoft 365 use Teams for incident discussion. Crontinel's cloud dashboard supports Microsoft Teams as a native alert channel, posting a MessageCard directly to your Teams webhook.

## Setup (cloud dashboard, recommended)

1. In [app.crontinel.com](https://app.crontinel.com), open your app's **Alert Channels** and add a **Microsoft Teams** channel
2. Paste the Teams incoming webhook URL (see below for how to create one)
3. Save — Crontinel posts a MessageCard directly to the webhook, no relay needed

## Setup (self-hosted OSS package, via generic webhook)

### 1. Add Incoming Webhook in Teams

1. Open the Teams channel for alerts
2. **⋯** next to the channel name → **Connectors** (or **Workflows** in newer tenants)
3. Search for **Incoming Webhook**, configure name and icon, create
4. Copy the webhook URL (often `https://outlook.office.com/webhook/...` or `https://*.webhook.office.com/...`)

### 2. Point Crontinel at the webhook

```bash
CRONTINEL_ALERT_CHANNEL=webhook
CRONTINEL_WEBHOOK_URL=https://your-teams-incoming-webhook-url
```

Teams webhooks accept JSON with a `text` field (and optional Adaptive Cards for richer formatting). Crontinel sends structured alert JSON. For first-class Teams cards, use a small Azure Function or Power Automate flow that transforms the payload:

```json
{ "text": "Crontinel alert: Horizon paused on production-api" }
```

### 3. Verify

```bash
php artisan crontinel:test-alert
```

## Alert types

Teams receives the same alert classes as Slack and email:

- Cron / scheduler failures and missed windows
- Queue depth and Horizon supervisor state
- Recovery notifications when issues clear

## Governance

- Restrict webhook creation to owners of the `#Production-Alerts` team
- Rotate webhook URLs if a URL leaks (delete connector, recreate)
- Document escalation: Teams message → on-call engineer → PagerDuty if no ack
