Skip to Content
PlatformFeaturesNotification Destinations

Notification Destinations

Notification destinations define where CloudQuery Platform sends notifications when alerts are triggered or policy violations are detected. There are two destination types: Slack (native integration with OAuth and channel selection) and Webhook (HTTP POST to any endpoint).

Creating a Notification Destination

  1. In the sidebar, click your user icon and select Organization settings.
  2. Open the Notification destinations section.
  3. Click Add notification destination.
  4. Enter a Destination name to identify this destination when configuring alerts (e.g., “Slack - Security Channel” or “PagerDuty Webhook”).
  5. Select a Destination type: Webhook or Slack.

The fields that follow depend on the type you select.

Slack Destinations

The Slack destination type connects to your Slack workspace via OAuth and sends notifications directly to selected channels. No webhook URL or custom payload is required.

Configuration

  1. Select Slack from the Destination type dropdown.
  2. Click Connect workspace to start the OAuth flow. A new window opens where you authorize CloudQuery to post to your Slack workspace.
  3. After authorization, select one or more channels from the Slack channels dropdown.
  4. Optionally, enter a Custom message to prepend to the alert notification.
  5. Click Save notification destination.

How Slack Notifications Work

When an alert triggers, CloudQuery posts a message to each selected channel. The message includes the alert details (query name, status, severity, violations). If you set a custom message, it appears above the alert details.

Webhook Destinations

Webhook destinations send an HTTP POST request to any URL you specify. Use this type for services like PagerDuty, Opsgenie, Microsoft Teams, or custom HTTP endpoints.

Configuration

  1. Select Webhook from the Destination type dropdown.
  2. Set the Destination URL: the HTTP(S) endpoint to receive notifications.
  3. Configure the Web request body: the JSON payload sent with each notification. Use placeholder variables to include dynamic alert data.
  4. Add HTTP Headers: set Content-Type: application/json for most destinations.
  5. Click Save notification destination.

Placeholder Variables

Use these variables in the web request body to include dynamic data from the triggering alert:

VariableDescription
{{query_name}}The name of the query the alert is configured on
{{query_url}}Direct URL to the query in the SQL Console
{{alert_status}}Current alert state: triggered or inactive
{{alert_severity}}The severity level configured for the alert
{{alert_message}}The custom message configured for the alert
{{alert_violations}}The number of rows returned by the query

Example: Slack Incoming Webhook

If you prefer to use a Slack Incoming Webhook instead of the native Slack integration, select Webhook as the destination type, set the webhook URL, add the Content-Type: application/json header, and use this request body:

{ "text": "*{{alert_status}}* — {{query_name}}\nSeverity: {{alert_severity}}\nViolations: {{alert_violations}}\n<{{query_url}}|View in CloudQuery>" }

Example: Generic Webhook

For services like PagerDuty, Opsgenie, or custom HTTP endpoints:

{ "title": "CloudQuery Alert: {{query_name}}", "status": "{{alert_status}}", "severity": "{{alert_severity}}", "message": "{{alert_message}}", "violations": "{{alert_violations}}", "url": "{{query_url}}" }

Testing a Destination

After saving, click Send test notification to verify the endpoint is reachable and the payload format is correct. For webhook destinations, test notifications send the body as-is, without replacing placeholder variables. For Slack destinations, a test message is sent to the selected channels.

Managing Destinations

Notification destinations are shared across all alerts. You can:

  • Edit a destination’s configuration at any time
  • Delete a destination (alerts using it will stop sending to that endpoint)
  • Add the same destination to multiple alerts

Note: The destination type (Webhook or Slack) cannot be changed after creation. To switch types, create a new destination.

Troubleshooting

Notifications Are Not Being Received

  • Verify the destination URL is reachable from the CloudQuery Platform server (webhook destinations only).
  • Check that the Content-Type header matches what the receiving service expects (usually application/json).
  • Use the Send test notification button to confirm the endpoint responds.
  • Alerts only send notifications on state changes. See Alerts: How Alerts Work for details.

Slack Connection Failed

  • Verify that the Slack integration is configured for your CloudQuery Platform instance. If you see “Slack integration is not configured,” contact your administrator.
  • Make sure you authorized CloudQuery in the correct Slack workspace.
  • If channels are not appearing in the dropdown, confirm the workspace connection completed and refresh the page.

Destination Cannot Parse the Request Body

Ensure the Content-Type header is set correctly. Most webhook endpoints expect application/json, but some services require application/x-www-form-urlencoded or other content types.

  • Policies: configure notifications for policy violations
  • Alerts: trigger notifications when SQL queries return results

Programmatic access

Notification destinations can be managed via the Platform API. See the Platform API Reference (alerts section) for endpoint details.

Next Steps

  • Alerts - Create SQL-based alerts that send notifications
  • Policies - Monitor compliance and trigger notifications on violations
  • Reports - Schedule reports with notifications
Last updated on