{
  "schema": "mailguard-integration-template/v1",
  "platform": "make",
  "title": "Blacklist hit → PagerDuty incident",
  "description": "When any of your monitored domains lands on a blacklist, open a PagerDuty incident routed to the right service.",
  "author": "MailGuard team",
  "license": "MIT",
  "documentation_url": "https://themailguard.ai/integrations/make-blacklist-to-pagerduty",
  "mailguard_api_version": "v1",
  "scenario": {
    "name": "MailGuard — Blacklist to PagerDuty",
    "trigger": "webhook",
    "modules": [
      {
        "id": 1,
        "module": "gateway:CustomWebHook",
        "label": "MailGuard webhook (alert.created)",
        "config": {
          "hook": "MailGuard alert.created",
          "method": false,
          "stringify": false
        }
      },
      {
        "id": 2,
        "module": "builtin:BasicRouter",
        "label": "Route by alert type",
        "routes": [
          {
            "filter": "data.alert.type = blacklist",
            "next": 3
          },
          {
            "filter": "fallback",
            "next": null,
            "notes": "Drop everything that isn't a blacklist alert."
          }
        ]
      },
      {
        "id": 3,
        "module": "pagerduty:CreateIncident",
        "label": "PagerDuty — Create Incident",
        "config": {
          "service": "{{PAGERDUTY_SERVICE_ID}}",
          "routing_key": "{{PAGERDUTY_ROUTING_KEY}}",
          "title": "Blacklist hit on {{data.domain.name}}",
          "description": "MailGuard detected {{data.domain.name}} on a public blacklist (severity {{data.severity}}). Plain-language summary: {{data.alert.title}}.",
          "urgency": "high",
          "incident_key": "mailguard-blacklist-{{data.domain.id}}",
          "links": [
            {
              "href": "https://themailguard.ai/app/domains/{{data.domain.id}}",
              "text": "Open in MailGuard"
            }
          ]
        }
      }
    ]
  },
  "setup_steps": [
    "In MailGuard, configure an outbound webhook (Settings → Webhooks). Subscribe to alert.created. Copy the signing secret.",
    "In Make, create a new scenario starting with a Custom Webhook trigger. Copy the webhook URL Make gives you.",
    "Paste the Make URL into your MailGuard webhook endpoint.",
    "Trigger a test alert from MailGuard and confirm Make receives the payload.",
    "Add the Router and configure the filter: data.alert.type equals 'blacklist'.",
    "Add the PagerDuty Create Incident module, paste your service ID and routing key, and customize the title / description as needed.",
    "Activate the scenario."
  ]
}
