# ErrorLens × Slack — Starter Pack

> Real-time alerts in any channel the moment a critical error is detected, with full analysis summary.

**Category:** Messaging & Alerts
**Required plan:** Starter or higher

---

## 1. Before you start

Create an Incoming Webhook (api.slack.com/messaging/webhooks) bound to the channel you want alerts in. Webhook URLs are secrets — treat them like passwords.

## 2. Configuration fields

| Field | Type | Required | Example |
|-------|------|----------|---------|
| `webhookUrl` | url | yes | `https://hooks.slack.com/services/…` |
| `channel` | text | yes | `#eng-alerts` |


### Field notes

- **Incoming Webhook URL (`webhookUrl`)** — Create at api.slack.com/apps


### `config.json` template

Drop this into your config tooling (1Password, Doppler, Vault, ...) — ErrorLens
reads the same shape from your dashboard form.

```json
{
  "webhookUrl": "<your-webhookUrl>",
  "channel": "<your-channel>"
}
```

## 3. What ErrorLens sends

Once configured, ErrorLens POSTs the payload below to the integration the
moment an analysis completes. Use this to write tests for any forwarder /
transformer you wrap around the webhook.

```json
{
  "event": "analysis.completed",
  "analysisId": "7b2f1e9d-...-...-...-...",
  "title": "Production checkout 500s — Dec 1",
  "url": "https://app.errorlens.ai/dashboard/analysis/7b2f1e9d-...",
  "result": {
    "severity": "critical",
    "summary": "NullPointerException in PaymentService.process() during guest checkout.",
    "rootCause": "customer.getPaymentMethod() returns null because guest profiles do not initialize payment methods.",
    "suggestedFix": "Initialize a default payment method on the guest profile, or guard with a null-check in PaymentService.",
    "affectedServices": [
      "payment-svc",
      "order-svc"
    ],
    "occurrences": 148,
    "language": "Java",
    "framework": "Spring Boot"
  },
  "user": {
    "id": "usr_...",
    "email": "on-call@yourcompany.com",
    "plan": "pro"
  },
  "receivedAt": "1970-01-01T00:00:00.000Z"
}
```

## 4. Setting it up in ErrorLens

1. Sign in at https://app.errorlens.ai (or your self-hosted instance).
2. Go to **Dashboard → Integrations**.
3. Find **Slack** in the catalog and click **Connect**.
4. Paste the values from your `config.json` into the form.
5. Hit **Save** — the first test event fires immediately.

## 5. Removing the integration

Disabling the integration from the same screen stops further events; it
does NOT revoke the token on the Slack side. Rotate or delete the
credential in Slack as well if you're decommissioning it.

---

_Generated by ErrorLens · 2026-05-11 ·
provider `slack`_
