Send groundcover Alerts to Email via Zapier

This guide shows how to route groundcover alerts to email using Zapier. Since groundcover supports webhook-based alerting, and Zapier can receive webhooks and send emails, you can easily set up this workflow without writing code.


Prerequisites

  • A groundcover account with access to the Workflows tab.

  • A Zapier account (free plan is sufficient).

  • An email address where you want to receive alerts.


Step 1: Create a Webhook Integration in groundcover

  1. Go to Settings → Integrations.

  2. Click Create Integration.

  3. Choose Webhook as the type.

  4. Enter a name like zapier_email_integration.

  5. Paste your Zapier Catch Hook URL (you’ll get this in Step 2 below).

  6. Save the integration.


Step 2: Create a Zapier Webhook-to-Email Workflow

Create a Webhook Trigger

  1. Go to Zapier.

  2. Click "Create Zap".

  3. Set Trigger:

    • App: Webhooks by Zapier

    • Event: Catch Hook

  4. Copy the Webhook URL (e.g. https://hooks.zapier.com/hooks/catch/...) – you'll use this in groundcover.


Configure the Email Step

  1. Set Action:

    • App: Email by Zapier

    • Event: Send Outbound Email

  2. Configure the email:

    • To: your email address

    • Subject:

      🚨 New groundcover Alert 🚨
    • Body:

      🔔 Alert Title: {{alert_name}}
      💼 Severity: {{severity}}
      
      🔗 Links:
      - 🧹 Issue: {{issue_url}}
      - 📈 Monitor: {{monitor_url}}
      - 🔕 Silence: {{silence_url}}

Step 3: Create a Workflow in groundcover

  1. Go to the Workflows section in your groundcover.

  2. Create a Notification Workflow with the integration we created in step 1.

  3. Edit the worflow YAML and use the following structure:

workflow:
  id: emails
  description: Sends alerts to Zapier webhook (for email)
  triggers:
  - type: alert
    name: emails
  consts:
    severity: keep.dictget( {{ alert.annotations }}, "_gc_severity", "info")
    title: keep.dictget( {{ alert.annotations }}, "_gc_issue_header", "{{ alert.alertname }}")
    issue_url: https://app.groundcover.com/monitors/issues?backendId={{ alert.labels.backend_id }}&selectedObjectId={{ alert.fingerprint }}
    monitor_url: https://app.groundcover.com/monitors?backendId={{ alert.labels.backend_id }}&selectedObjectId={{ alert.labels._gc_monitor_id }}
    silence_url: https://app.groundcover.com/monitors/create-silence?keep.replace(keep.join({{ consts.redacted_labels }}, "&", "matcher_"), " ", "+")
    redacted_labels: keep.dict_pop({{ alert.labels }}, "_gc_monitor_id", "_gc_monitor_name", "_gc_severity", "backend_id", "grafana_folder", "_gc_issue_header")
  actions:
  - name: <<THE_NAME_OF_YOUR_WORFLOW>>
    provider:
      config: "{{ providers.<<THE_NAME_OF_YOUR_INTEGRATION>> }}"
      type: webhook
      with:
        body:
          alert_name: "{{ consts.title }}"
          severity: "{{ consts.severity }}"
          issue_url: "{{ consts.issue_url }}"
          monitor_url: "{{ consts.monitor_url }}"
          silence_url: "{{ consts.silence_url }}"

Step 4: Test the Flow

  1. Trigger a test alert in groundcover.

  2. Check Zapier to ensure the webhook was received.

  3. Confirm the email arrives with the right content.

Last updated