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

# Zapier

> Send DevHelm incident events to Zapier, n8n, Make, or any webhook-triggered automation

Connect DevHelm to any automation platform that accepts a webhook trigger — [Zapier](https://zapier.com), [n8n](https://n8n.io), [Make](https://make.com) (formerly Integromat), or your own endpoint. On every incident event, DevHelm POSTs a flat JSON payload to the URL you provide, which your automation can parse to trigger downstream actions (create tickets, page on-call, post to chat, update spreadsheets, and so on). The webhook URL must use HTTPS.

## Setup

<Steps>
  <Step title="Get a catch webhook URL from your automation platform">
    **Zapier**

    1. Create a new Zap and choose **Webhooks by Zapier** as the trigger
    2. Select the **Catch Hook** event and click **Continue**
    3. Copy the generated URL (looks like `https://hooks.zapier.com/hooks/catch/1234567/abcdef/`) — it is tied to the Zap and won't change

    **n8n**

    1. Add a **Webhook** node to a new workflow and set the HTTP method to **POST**
    2. Activate the workflow, then copy the **Production URL** (ends in `/webhook/...`)
    3. The **Test URL** (`/webhook-test/...`) only works while the editor is open with *Listen for Test Event* — use the Production URL for live alerts

    **Make**

    1. Create a scenario and add the **Webhooks → Custom webhook** module
    2. Click **Add**, name the webhook, and copy the generated URL
  </Step>

  <Step title="Create the alert channel in DevHelm">
    <CodeGroup>
      ```bash CLI theme={null}
      devhelm alert-channels create \
        --name "Zapier Automation" \
        --type zapier \
        --config '{"channelType":"zapier","webhookUrl":"https://hooks.zapier.com/hooks/catch/1234567/abcdef/"}'
      ```

      ```yaml devhelm.yml theme={null}
      alertChannels:
        - name: Zapier Automation
          config:
            channelType: zapier
            webhookUrl: ${ZAPIER_WEBHOOK_URL}
      ```
    </CodeGroup>
  </Step>

  <Step title="Test the channel">
    ```bash theme={null}
    devhelm alert-channels test <channel-id>
    ```
  </Step>
</Steps>

## Configuration

| Field        | Description                                                     | Required |
| ------------ | --------------------------------------------------------------- | -------- |
| `webhookUrl` | Catch/webhook URL from Zapier, n8n, Make, or any HTTPS endpoint | Yes      |

## Payload format

DevHelm sends a flat JSON object on each incident event (fire-and-forget — one POST per event):

```json theme={null}
{
  "source": "devhelm",
  "event_type": "INCIDENT_CREATED",
  "severity": "DOWN",
  "monitor_name": "API Production",
  "monitor_url": "https://api.example.com/health",
  "incident_id": "8f1c2e9a-4b6d-4c2f-9b7e-2a1d3c4e5f60",
  "incident_url": "https://app.devhelm.io/incidents/8f1c2e9a-4b6d-4c2f-9b7e-2a1d3c4e5f60",
  "failure_reason": "Connection timeout after 10s",
  "status_code": 503,
  "response_time_ms": 1240,
  "duration": "5 minutes",
  "regions": ["us-east"],
  "resource_group": "Payments"
}
```

| Field                                                                                            | Notes                                                               |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- |
| `event_type`                                                                                     | One of `INCIDENT_CREATED`, `INCIDENT_RESOLVED`, `INCIDENT_REOPENED` |
| `severity`                                                                                       | Incident severity, e.g. `DOWN`, `DEGRADED`, `MAINTENANCE`           |
| `regions`                                                                                        | Array of affected probe regions                                     |
| `monitor_url`, `failure_reason`, `status_code`, `response_time_ms`, `duration`, `resource_group` | May be `null` when not applicable to the event                      |

<Note>In Zapier, the Catch Hook trigger parses the JSON automatically, so each top-level key is available as a field in later Zap steps. Branch on `event_type` to handle creation versus resolution differently.</Note>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Channel creation fails with an HTTPS error">
    The webhook URL must start with `https://`. Plain `http://` URLs are rejected at create time — use the HTTPS URL your platform generates.
  </Accordion>

  <Accordion title="Events aren't reaching the automation">
    1. Confirm the Zap/workflow/scenario is **turned on** — a paused Zap or an inactive n8n workflow silently drops requests
    2. Run `devhelm alert-channels test <id>` and check the platform's task/execution history for the delivery
    3. Make sure the channel is wired into a notification policy so real incidents route to it
  </Accordion>

  <Accordion title="n8n test events work but live alerts don't (or vice versa)">
    n8n issues two URLs. The **Test URL** (`/webhook-test/...`) only fires while the editor is open and *Listen for Test Event* is active; the **Production URL** (`/webhook/...`) only works once the workflow is activated. Configure DevHelm with the Production URL and activate the workflow.
  </Accordion>
</AccordionGroup>
