{ "kind": "open-flow-workflow", "version": 1, "name": "PagerDuty Incident Create and Update", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_3acbc32c630c38bc": { "name": "Enter incident account details", "kind": "start", "inputDefs": [ { "jsonSchema": { "type": "string", "format": "email", "description": "Email address of the PagerDuty user performing the incident mutation. PagerDuty requires this header for write operations." }, "nullable": false, "handle": "from" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "serviceId" } ] }, "n_1da7ed4c0beb6d53": { "inputs": { "from": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_3acbc32c630c38bc", "output": "from" } ] }, "serviceId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_3acbc32c630c38bc", "output": "serviceId" } ] }, "title": { "kind": "value", "value": "Firewall on Fire" }, "updatedTitle": { "kind": "value", "value": "Firewalls on Fire" } }, "name": "Prepare incident creation", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string", "format": "email", "description": "Email address of the PagerDuty user performing the incident mutation. PagerDuty requires this header for write operations." }, "nullable": false, "handle": "from" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "serviceId" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "title" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "updatedTitle" } ], "outputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "endpoint" }, { "jsonSchema": { "type": "object", "additionalProperties": { "type": "string" } }, "nullable": false, "handle": "headers" }, { "jsonSchema": { "type": "object" }, "nullable": false, "handle": "body" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "updatedTitle" } ], "name": "Prepare incident creation", "moduleId": "n_662d33efeaeb6c1e", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_915a52a51eb9cc22": { "inputs": { "endpoint": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_1da7ed4c0beb6d53", "output": "endpoint" } ] }, "headers": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_1da7ed4c0beb6d53", "output": "headers" } ] }, "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_1da7ed4c0beb6d53", "output": "body" } ] } }, "name": "Create PagerDuty incident", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "endpoint" }, { "jsonSchema": { "type": "object", "additionalProperties": { "type": "string" } }, "nullable": true, "handle": "headers" }, { "jsonSchema": {}, "nullable": true, "handle": "body" } ], "outputs": [ { "jsonSchema": {}, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": { "type": "string" } }, "nullable": false, "handle": "headers" }, { "jsonSchema": { "const": "base64" }, "nullable": true, "handle": "bodyEncoding" } ], "name": "Create PagerDuty incident", "executor": { "providerId": "pagerduty", "method": "POST", "query": { "mode": "fields", "names": [] }, "headers": { "mode": "object", "names": [] }, "bodyFormat": "json", "kind": "connector-proxy" } } }, "n_caf80ab689795e7e": { "inputs": { "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_915a52a51eb9cc22", "output": "body" } ] }, "statusCode": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_915a52a51eb9cc22", "output": "statusCode" } ] }, "bodyEncoding": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_915a52a51eb9cc22", "output": "bodyEncoding" } ] }, "updatedTitle": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_1da7ed4c0beb6d53", "output": "updatedTitle" } ] } }, "name": "Confirm created incident", "kind": "task", "task": { "inputs": [ { "jsonSchema": {}, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "const": "base64" }, "nullable": true, "handle": "bodyEncoding" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "updatedTitle" } ], "outputs": [ { "jsonSchema": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "nullable": false, "handle": "incidentId" }, { "jsonSchema": { "type": "object", "properties": { "type": { "type": "string", "minLength": 1, "description": "PagerDuty incident object type." }, "status": { "type": "string", "enum": [ "triggered", "acknowledged", "resolved" ], "description": "Incident status." }, "title": { "type": "string", "minLength": 1, "description": "New incident title." }, "urgency": { "type": "string", "enum": [ "high", "low" ], "description": "Incident urgency." }, "escalation_level": { "type": "integer", "minimum": 1, "description": "Escalation level for the incident." }, "priority_id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "resolution": { "type": "string", "minLength": 1, "description": "Resolution note for the incident." } }, "additionalProperties": false, "description": "Incident mutation fields." }, "nullable": false, "handle": "update" } ], "name": "Confirm created incident", "moduleId": "n_b7204aaa6da76c40", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_974efda4088d5d03": { "inputs": { "incident_id": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_caf80ab689795e7e", "output": "incidentId" } ] }, "from": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_3acbc32c630c38bc", "output": "from" } ] }, "incident": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_caf80ab689795e7e", "output": "update" } ] } }, "name": "Update PagerDuty incident title", "kind": "task", "task": { "inputs": [ { "description": "PagerDuty resource ID.", "jsonSchema": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "nullable": false, "handle": "incident_id" }, { "description": "Email address of the PagerDuty user performing the incident mutation. PagerDuty requires this header for write operations.", "jsonSchema": { "type": "string", "format": "email", "description": "Email address of the PagerDuty user performing the incident mutation. PagerDuty requires this header for write operations." }, "nullable": false, "handle": "from" }, { "description": "Incident mutation fields.", "jsonSchema": { "type": "object", "properties": { "type": { "type": "string", "minLength": 1, "description": "PagerDuty incident object type." }, "status": { "type": "string", "enum": [ "triggered", "acknowledged", "resolved" ], "description": "Incident status." }, "title": { "type": "string", "minLength": 1, "description": "New incident title." }, "urgency": { "type": "string", "enum": [ "high", "low" ], "description": "Incident urgency." }, "escalation_level": { "type": "integer", "minimum": 1, "description": "Escalation level for the incident." }, "priority_id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "resolution": { "type": "string", "minLength": 1, "description": "Resolution note for the incident." } }, "additionalProperties": false, "description": "Incident mutation fields." }, "nullable": false, "handle": "incident" } ], "outputs": [ { "description": "PagerDuty incident record.", "jsonSchema": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty incident object type." }, "summary": { "type": "string", "description": "Incident summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the incident." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the incident." }, "incident_number": { "type": "integer", "description": "PagerDuty incident number." }, "title": { "type": "string", "description": "Incident title." }, "description": { "type": "string", "description": "Incident description." }, "status": { "type": "string", "enum": [ "triggered", "acknowledged", "resolved" ], "description": "Incident status." }, "urgency": { "type": "string", "enum": [ "high", "low" ], "description": "Incident urgency." }, "created_at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "updated_at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "service": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty service reference type." }, "summary": { "type": "string", "description": "Service display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the service." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the service." } }, "additionalProperties": true, "description": "PagerDuty service reference." }, "assignments": { "type": "array", "items": { "type": "object", "properties": { "at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "assignee": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty user reference type." }, "summary": { "type": "string", "description": "User display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the user." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the user." } }, "additionalProperties": true, "description": "PagerDuty user reference." } }, "additionalProperties": true, "description": "PagerDuty incident assignment." }, "description": "Current incident assignments." }, "escalation_policy": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty escalation policy reference type." }, "summary": { "type": "string", "description": "Escalation policy display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the escalation policy." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the escalation policy." } }, "additionalProperties": true, "description": "PagerDuty escalation policy reference." } }, "additionalProperties": true, "description": "PagerDuty incident record." }, "nullable": false, "handle": "incident" } ], "name": "Update PagerDuty incident title", "executor": { "kind": "connector", "action": "pagerduty.update_incident" } } }, "n_b0571972a9a34b09": { "inputs": { "incident": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_974efda4088d5d03", "output": "incident" } ] }, "expectedId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_caf80ab689795e7e", "output": "incidentId" } ] } }, "name": "Check updated incident ID", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty incident object type." }, "summary": { "type": "string", "description": "Incident summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the incident." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the incident." }, "incident_number": { "type": "integer", "description": "PagerDuty incident number." }, "title": { "type": "string", "description": "Incident title." }, "description": { "type": "string", "description": "Incident description." }, "status": { "type": "string", "enum": [ "triggered", "acknowledged", "resolved" ], "description": "Incident status." }, "urgency": { "type": "string", "enum": [ "high", "low" ], "description": "Incident urgency." }, "created_at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "updated_at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "service": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty service reference type." }, "summary": { "type": "string", "description": "Service display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the service." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the service." } }, "additionalProperties": true, "description": "PagerDuty service reference." }, "assignments": { "type": "array", "items": { "type": "object", "properties": { "at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "assignee": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty user reference type." }, "summary": { "type": "string", "description": "User display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the user." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the user." } }, "additionalProperties": true, "description": "PagerDuty user reference." } }, "additionalProperties": true, "description": "PagerDuty incident assignment." }, "description": "Current incident assignments." }, "escalation_policy": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty escalation policy reference type." }, "summary": { "type": "string", "description": "Escalation policy display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the escalation policy." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the escalation policy." } }, "additionalProperties": true, "description": "PagerDuty escalation policy reference." } }, "additionalProperties": true, "description": "PagerDuty incident record." }, "nullable": false, "handle": "incident" }, { "jsonSchema": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "nullable": false, "handle": "expectedId" } ], "outputs": [ { "jsonSchema": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty incident object type." }, "summary": { "type": "string", "description": "Incident summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the incident." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the incident." }, "incident_number": { "type": "integer", "description": "PagerDuty incident number." }, "title": { "type": "string", "description": "Incident title." }, "description": { "type": "string", "description": "Incident description." }, "status": { "type": "string", "enum": [ "triggered", "acknowledged", "resolved" ], "description": "Incident status." }, "urgency": { "type": "string", "enum": [ "high", "low" ], "description": "Incident urgency." }, "created_at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "updated_at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "service": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty service reference type." }, "summary": { "type": "string", "description": "Service display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the service." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the service." } }, "additionalProperties": true, "description": "PagerDuty service reference." }, "assignments": { "type": "array", "items": { "type": "object", "properties": { "at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "assignee": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty user reference type." }, "summary": { "type": "string", "description": "User display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the user." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the user." } }, "additionalProperties": true, "description": "PagerDuty user reference." } }, "additionalProperties": true, "description": "PagerDuty incident assignment." }, "description": "Current incident assignments." }, "escalation_policy": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty escalation policy reference type." }, "summary": { "type": "string", "description": "Escalation policy display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the escalation policy." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the escalation policy." } }, "additionalProperties": true, "description": "PagerDuty escalation policy reference." } }, "additionalProperties": true, "description": "PagerDuty incident record." }, "nullable": false, "handle": "incident" }, { "jsonSchema": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "nullable": false, "handle": "incidentId" } ], "name": "Check updated incident ID", "moduleId": "n_3c80de319642496c", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_33c616f8bd248b3e": { "inputs": { "incident_id": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_b0571972a9a34b09", "output": "incidentId" } ] } }, "name": "Get updated PagerDuty incident", "kind": "task", "task": { "inputs": [ { "description": "PagerDuty resource ID.", "jsonSchema": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "nullable": false, "handle": "incident_id" }, { "description": "Related incident records to include.", "jsonSchema": { "type": "array", "items": { "type": "string", "enum": [ "services", "assignees", "first_trigger_log_entries", "escalation_policies", "teams", "priority" ], "description": "Incident include option." }, "description": "Related incident records to include." }, "nullable": true, "handle": "include", "value": null } ], "outputs": [ { "description": "PagerDuty incident record.", "jsonSchema": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty incident object type." }, "summary": { "type": "string", "description": "Incident summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the incident." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the incident." }, "incident_number": { "type": "integer", "description": "PagerDuty incident number." }, "title": { "type": "string", "description": "Incident title." }, "description": { "type": "string", "description": "Incident description." }, "status": { "type": "string", "enum": [ "triggered", "acknowledged", "resolved" ], "description": "Incident status." }, "urgency": { "type": "string", "enum": [ "high", "low" ], "description": "Incident urgency." }, "created_at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "updated_at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "service": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty service reference type." }, "summary": { "type": "string", "description": "Service display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the service." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the service." } }, "additionalProperties": true, "description": "PagerDuty service reference." }, "assignments": { "type": "array", "items": { "type": "object", "properties": { "at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "assignee": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty user reference type." }, "summary": { "type": "string", "description": "User display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the user." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the user." } }, "additionalProperties": true, "description": "PagerDuty user reference." } }, "additionalProperties": true, "description": "PagerDuty incident assignment." }, "description": "Current incident assignments." }, "escalation_policy": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty escalation policy reference type." }, "summary": { "type": "string", "description": "Escalation policy display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the escalation policy." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the escalation policy." } }, "additionalProperties": true, "description": "PagerDuty escalation policy reference." } }, "additionalProperties": true, "description": "PagerDuty incident record." }, "nullable": false, "handle": "incident" } ], "name": "Get updated PagerDuty incident", "executor": { "kind": "connector", "action": "pagerduty.get_incident" } } }, "n_73bea33191627b6e": { "inputs": { "incident": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_33c616f8bd248b3e", "output": "incident" } ] }, "expectedId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_caf80ab689795e7e", "output": "incidentId" } ] } }, "name": "Confirm fetched incident ID", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty incident object type." }, "summary": { "type": "string", "description": "Incident summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the incident." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the incident." }, "incident_number": { "type": "integer", "description": "PagerDuty incident number." }, "title": { "type": "string", "description": "Incident title." }, "description": { "type": "string", "description": "Incident description." }, "status": { "type": "string", "enum": [ "triggered", "acknowledged", "resolved" ], "description": "Incident status." }, "urgency": { "type": "string", "enum": [ "high", "low" ], "description": "Incident urgency." }, "created_at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "updated_at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "service": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty service reference type." }, "summary": { "type": "string", "description": "Service display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the service." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the service." } }, "additionalProperties": true, "description": "PagerDuty service reference." }, "assignments": { "type": "array", "items": { "type": "object", "properties": { "at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "assignee": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty user reference type." }, "summary": { "type": "string", "description": "User display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the user." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the user." } }, "additionalProperties": true, "description": "PagerDuty user reference." } }, "additionalProperties": true, "description": "PagerDuty incident assignment." }, "description": "Current incident assignments." }, "escalation_policy": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty escalation policy reference type." }, "summary": { "type": "string", "description": "Escalation policy display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the escalation policy." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the escalation policy." } }, "additionalProperties": true, "description": "PagerDuty escalation policy reference." } }, "additionalProperties": true, "description": "PagerDuty incident record." }, "nullable": false, "handle": "incident" }, { "jsonSchema": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "nullable": false, "handle": "expectedId" } ], "outputs": [ { "jsonSchema": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty incident object type." }, "summary": { "type": "string", "description": "Incident summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the incident." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the incident." }, "incident_number": { "type": "integer", "description": "PagerDuty incident number." }, "title": { "type": "string", "description": "Incident title." }, "description": { "type": "string", "description": "Incident description." }, "status": { "type": "string", "enum": [ "triggered", "acknowledged", "resolved" ], "description": "Incident status." }, "urgency": { "type": "string", "enum": [ "high", "low" ], "description": "Incident urgency." }, "created_at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "updated_at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "service": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty service reference type." }, "summary": { "type": "string", "description": "Service display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the service." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the service." } }, "additionalProperties": true, "description": "PagerDuty service reference." }, "assignments": { "type": "array", "items": { "type": "object", "properties": { "at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "assignee": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty user reference type." }, "summary": { "type": "string", "description": "User display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the user." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the user." } }, "additionalProperties": true, "description": "PagerDuty user reference." } }, "additionalProperties": true, "description": "PagerDuty incident assignment." }, "description": "Current incident assignments." }, "escalation_policy": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty escalation policy reference type." }, "summary": { "type": "string", "description": "Escalation policy display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the escalation policy." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the escalation policy." } }, "additionalProperties": true, "description": "PagerDuty escalation policy reference." } }, "additionalProperties": true, "description": "PagerDuty incident record." }, "nullable": false, "handle": "incident" }, { "jsonSchema": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "nullable": false, "handle": "incidentId" } ], "name": "Confirm fetched incident ID", "moduleId": "n_f312a4061e2684a5", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_0a9e70d9ec9e749d": { "name": "Updated incident record", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty incident object type." }, "summary": { "type": "string", "description": "Incident summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the incident." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the incident." }, "incident_number": { "type": "integer", "description": "PagerDuty incident number." }, "title": { "type": "string", "description": "Incident title." }, "description": { "type": "string", "description": "Incident description." }, "status": { "type": "string", "enum": [ "triggered", "acknowledged", "resolved" ], "description": "Incident status." }, "urgency": { "type": "string", "enum": [ "high", "low" ], "description": "Incident urgency." }, "created_at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "updated_at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "service": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty service reference type." }, "summary": { "type": "string", "description": "Service display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the service." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the service." } }, "additionalProperties": true, "description": "PagerDuty service reference." }, "assignments": { "type": "array", "items": { "type": "object", "properties": { "at": { "type": "string", "description": "Timestamp in ISO 8601 format." }, "assignee": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty user reference type." }, "summary": { "type": "string", "description": "User display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the user." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the user." } }, "additionalProperties": true, "description": "PagerDuty user reference." } }, "additionalProperties": true, "description": "PagerDuty incident assignment." }, "description": "Current incident assignments." }, "escalation_policy": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "description": "PagerDuty resource ID." }, "type": { "type": "string", "description": "PagerDuty escalation policy reference type." }, "summary": { "type": "string", "description": "Escalation policy display summary." }, "self": { "type": "string", "format": "uri", "description": "API URL for the escalation policy." }, "html_url": { "type": "string", "format": "uri", "description": "Web URL for the escalation policy." } }, "additionalProperties": true, "description": "PagerDuty escalation policy reference." } }, "additionalProperties": true, "description": "PagerDuty incident record." }, "nullable": false, "handle": "incident" } ], "outputMappings": { "incident": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_73bea33191627b6e", "output": "incident" } ] } } } }, "edges": [ { "source": "n_3acbc32c630c38bc", "target": "n_1da7ed4c0beb6d53" }, { "source": "n_1da7ed4c0beb6d53", "target": "n_915a52a51eb9cc22" }, { "source": "n_915a52a51eb9cc22", "target": "n_caf80ab689795e7e" }, { "source": "n_caf80ab689795e7e", "target": "n_974efda4088d5d03" }, { "source": "n_974efda4088d5d03", "target": "n_b0571972a9a34b09" }, { "source": "n_b0571972a9a34b09", "target": "n_33c616f8bd248b3e" }, { "source": "n_33c616f8bd248b3e", "target": "n_73bea33191627b6e" }, { "source": "n_73bea33191627b6e", "target": "n_0a9e70d9ec9e749d" } ] } }, "modules": { "n_662d33efeaeb6c1e": { "name": "Prepare incident creation", "imports": [], "source": "export default function incidentRequest({ from, serviceId, title, updatedTitle }) {\n if (typeof from !== 'string' || !from || typeof serviceId !== 'string' || !serviceId || typeof title !== 'string' || !title || typeof updatedTitle !== 'string' || !updatedTitle) throw new Error('Configure the PagerDuty member email, service ID and both titles');\n return {\n endpoint: '/incidents', headers: { From: from },\n body: { incident: { type: 'incident', title, service: { id: serviceId, type: 'service_reference' } } },\n updatedTitle,\n };\n}\n" }, "n_b7204aaa6da76c40": { "name": "Confirm created incident", "imports": [], "source": "export default function createdIncident({ body, statusCode, bodyEncoding, updatedTitle }) {\n if (statusCode !== 201) throw new Error('PagerDuty did not confirm incident creation with HTTP 201');\n const incidentId = body?.incident?.id;\n if (bodyEncoding != null || typeof incidentId !== 'string' || !incidentId) throw new Error('PagerDuty creation response has no incident ID');\n if (typeof updatedTitle !== 'string' || !updatedTitle) throw new Error('Configure the updated incident title');\n return { incidentId, update: { type: 'incident', title: updatedTitle } };\n}\n" }, "n_3c80de319642496c": { "name": "Check updated incident ID", "imports": [], "source": "export default function incidentId({ incident, expectedId }) {\n if (!incident || typeof incident.id !== 'string' || !incident.id || incident.id !== expectedId) throw new Error('PagerDuty returned a different or missing incident ID');\n return { incident, incidentId: incident.id };\n}\n" }, "n_f312a4061e2684a5": { "name": "Confirm fetched incident ID", "imports": [], "source": "export default function incidentId({ incident, expectedId }) {\n if (!incident || typeof incident.id !== 'string' || !incident.id || incident.id !== expectedId) throw new Error('PagerDuty returned a different or missing incident ID');\n return { incident, incidentId: incident.id };\n}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }