---
title: "Setup Alerts - Documentation"
description: "Create data-driven alerts that notify you when database conditions are met. Step-by-step setup guide."
canonical: "https://www.aifordatabase.com/docs/setup-alerts/"
---

# Setup Alerts

beginner 5 min read

## Setting Up Alerts

Alerts are a simplified version of workflows designed specifically for monitoring. They check a condition on a schedule and notify you when it is met.

### Step 1: Create an Alert

Navigate to **Alerts** in the sidebar and click **New Alert**. Choose a name like "High Error Rate" or "Revenue Drop."

### Step 2: Define What to Monitor

Type a natural language question that describes what you want to watch:

*   "Number of 500 errors in the last hour"
*   "Total revenue today"
*   "Count of unprocessed orders older than 2 hours"
*   "Average response time for the API in the last 15 minutes"

Or select a saved query.

### Step 3: Set the Condition

Choose when the alert should fire:

*   **Above threshold** -- fires when the value exceeds a number (e.g., error count > 50)
*   **Below threshold** -- fires when the value drops below a number (e.g., revenue < $1,000)
*   **Changes** -- fires when the value changes by more than a percentage or absolute amount
*   **Row count** -- fires when the query returns rows (useful for "are there any...?" questions)

### Step 4: Choose Notification Channels

Select how you want to be notified:

*   **Email** -- instant notification to one or more addresses
*   **Slack** -- message to a channel or direct message
*   **Webhook** -- POST to any URL (for PagerDuty, Opsgenie, custom integrations)
*   **In-app** -- notification badge in the AI for Database UI

### Step 5: Set the Schedule

Choose how often to check the condition:

*   Every 5 minutes (for critical monitoring)
*   Every 15 minutes
*   Every hour
*   Custom cron schedule

### Alert Behavior

**Cooldown**: After an alert fires, it enters a cooldown period (default: 1 hour) to avoid flooding you with notifications. You can adjust this in the alert settings.

**Resolution**: When the condition is no longer met, you receive a "Resolved" notification. This helps you know when issues are fixed.

**Escalation**: On Enterprise plans, you can configure escalation rules -- if the alert is not acknowledged within a time window, it escalates to a different channel or team.

Source: https://www.aifordatabase.com/docs/setup-alerts/
