{
  "name": "CallHuman · On-call alert with escalation",
  "nodes": [
    {
      "id": "6a4aa23f-224e-40f3-a5fd-a1c122ce7ecc",
      "name": "Alert",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        0,
        0
      ],
      "webhookId": "e7fa084e-8e50-44bb-aef1-6b0af78a9b1f",
      "parameters": {
        "httpMethod": "POST",
        "path": "on-call-alert",
        "options": {}
      }
    },
    {
      "id": "930efc96-e73a-414c-af79-db332be6e4a9",
      "name": "Call the on-call person",
      "type": "n8n-nodes-callhuman.callHuman",
      "typeVersion": 1,
      "position": [
        320,
        0
      ],
      "webhookId": "c9c72890-25ca-44c7-a2fe-c8ee04219398",
      "parameters": {
        "operation": "callAndWait",
        "phone": "={{ $json.body.phone }}",
        "message": "=Production alert: {{ $json.body.summary }}.",
        "language": "en",
        "options": {
          "option": [
            {
              "label": "I'm on it",
              "id": "on_it",
              "reply": "Thanks. We'll tell the team you're on it."
            },
            {
              "label": "Escalate",
              "id": "escalate"
            }
          ]
        },
        "additionalFields": {
          "retries": 3,
          "retryDelaySeconds": 60
        }
      }
    },
    {
      "id": "a74223b0-897d-464a-a3e0-1747ff723968",
      "name": "Acknowledge the incident",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        700,
        -180
      ],
      "parameters": {}
    },
    {
      "id": "e6850996-d481-4d26-ac56-9cc54d5deac0",
      "name": "Call the backup",
      "type": "n8n-nodes-callhuman.callHuman",
      "typeVersion": 1,
      "position": [
        700,
        180
      ],
      "webhookId": "541b5316-ed7b-4f07-a8db-1f9e37135e6c",
      "parameters": {
        "operation": "callAndWait",
        "phone": "={{ $('Alert').item.json.body.backup_phone }}",
        "message": "=Production alert, escalated to you: {{ $('Alert').item.json.body.summary }}.",
        "language": "en",
        "options": {
          "option": [
            {
              "label": "I'm on it",
              "id": "on_it",
              "reply": "Thanks."
            }
          ]
        },
        "additionalFields": {
          "retries": 3,
          "retryDelaySeconds": 60
        }
      }
    },
    {
      "id": "d8346e43-ae43-44a2-ab1f-d27f9e6583bc",
      "name": "Backup is on it",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        1040,
        100
      ],
      "parameters": {}
    },
    {
      "id": "01b1acec-156e-4c60-ab58-db2a1cd36a58",
      "name": "Nobody answered",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        1040,
        280
      ],
      "parameters": {}
    },
    {
      "id": "4d48ff0a-9b76-4816-ad95-c9343972ef06",
      "name": "How it works",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -40,
        -420
      ],
      "parameters": {
        "width": 520,
        "height": 260,
        "content": "## On-call alert\nPOST `{ \"phone\": \"+34600111222\", \"backup_phone\": \"+34600333444\", \"summary\": \"Checkout is down\" }`.\n\nRetries 3 times, 1 minute apart. If they say \"escalate\" or don't answer, the backup is called."
      }
    }
  ],
  "connections": {
    "Alert": {
      "main": [
        [
          {
            "node": "Call the on-call person",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call the on-call person": {
      "main": [
        [
          {
            "node": "Acknowledge the incident",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Call the backup",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Call the backup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call the backup": {
      "main": [
        [
          {
            "node": "Backup is on it",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Nobody answered",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  }
}
