Create an incident.io Incident
Send this guide to your coding agent.
Prerequisite: Install Port MCP
Open plan mode if your tool supports it; otherwise present the plan below filled in and wait for my approval. Implement this Port guide in my org via MCP: https://docs.port.io/guides/all/create-incident-io-incident Read the raw markdown version at https://docs.port.io/guides/all/create-incident-io-incident.md - it contains every tab and code block without page markup. Goal: get the guide's core flow working end-to-end in my org; adapting it to fit my existing setup takes priority over matching the guide 1:1. Plan: 1. Confirm MCP is connected, in the right org, with sufficient permissions. 2. If the guide offers alternative implementation paths (tabs), pick the one matching my installed integrations and tools, confirm it with me, and implement only that path. 3. Diff the guide's data model (blueprints, properties, relations, workflows, actions, agents, automations, integrations, webhook data sources, secrets) against mine. 4. Propose adaptations for gaps, reusing existing blueprints/relations over guide-named duplicates. 5. Flag what needs a UI click, credential, or secret from me, testing MCP capability empirically before ruling anything out. If the guide has a "Set up via API" section, use it for anything MCP can't do before treating a step as UI-only. 6. Stop on any blocker and give me options. Approving this plan authorizes the writes it lists; pause only for writes beyond what's listed. Build: - Extend blueprint schema additively when upserting; don't remove or overwrite existing properties, and treat type conflicts as a blocker, not an auto-fix. - Never print secret values into the chat or logs; ask me to set them in Port, or write them via the secrets API without echoing them back. - List any mock data in the plan, minimal and labeled mock; once approved, seed it without re-asking, and tell me what you seeded. - For anything the guide writes downstream (e.g. a webhook target), use a real entity, not a mock. - For pages/widgets, use the real page identifier from the app URL, not a guessed slug. - When you hit a UI step confirmed (not assumed) unsupported via MCP and not covered by the guide's API sections, pause, give exact clicks, then resume via MCP. - Validate and give links after each meaningful step (only a tool-returned URL, no guessed paths); don't proceed if the last run wasn't a success. Done: - Run the guide's "Let's test it" steps where possible (e.g. execute a workflow test run) and confirm the expected output exists in Port. - Summarize adaptations, seeded data, what was mocked or skipped, remaining UI steps, and how to verify.
Overview
This guide will help you implement a self-service action in Port that allows you to create incident.io incidents directly from Port using synced webhooks. This functionality streamlines incident management by enabling users to create incidents without leaving Port.
Prerequisites
- Complete the onboarding process.
- Access to your incident.io organization with permissions to manage incidents.
Set up data model
You will need to manually create a blueprint for the incident.io incidents.
Create an incident.io incident blueprint
-
Go to your Builder page.
-
Click on
+ Blueprint. -
Click on the
{...}button in the top right corner, and chooseEdit JSON. -
Add this JSON schema:
Incident.io Incident Blueprint (Click to expand)
{"identifier": "incidentIOIncident","description": "This blueprint represents an incident.io incident","title": "Incident.io Incident","icon": "Alert","schema": {"properties": {"url": {"type": "string","title": "Incident URL","format": "url"},"severity": {"title": "Severity","type": "string"},"createdBy": {"title": "Created By","type": "string"},"createdAt": {"title": "Created At","type": "string","format": "date-time"},"description": {"title": "Description","type": "string"},"visibility": {"type": "string","title": "Visibility","enum": ["public","private"],"enumColors": {"public": "darkGray","private": "darkGray"}},"status": {"type": "string","title": "Status","enum": ["Investigating","Fixing","Monitoring","Closed","Resolved","Merged"],"enumColors": {"Investigating": "red","Fixing": "yellow","Monitoring": "purple","Closed": "darkGray","Resolved": "green","Merged": "green"}}},"required": []},"mirrorProperties": {},"calculationProperties": {},"aggregationProperties": {},"relations": {}} -
Click "Save" to create the blueprint.
Implementation
You can create incident.io incidents by leveraging Port's synced webhooks and secrets to directly interact with incident.io's API.
Add Port secrets
To add these secrets to Port:
-
In your Port application, click on your profile picture
.
-
Click on Credentials.
-
Click on the
Secretstab. -
Click on
+ Secretand add the following secrets:INCIDENT_IO_API_KEY: Your incident.io API key.
Set up self-service action
Let's define a self-service action that is used to create an incident.io incident:
-
Head to the self-service page.
-
Click on the
+ New Actionbutton. -
Click on the
{...} Edit JSONbutton. -
Copy and paste the following JSON configuration into the editor.
Create incident.io Incident (Webhook) (Click to expand)
{"identifier": "create_incident_io_incident_webhook","title": "Create incident.io Incident (Webhook)","icon": "Alert","description": "Create a new incident.io incident","trigger": {"type": "self-service","operation": "CREATE","userInputs": {"properties": {"name": {"type": "string","title": "Name","description": "The name or title of the incident"},"severity": {"icon": "DefaultProperty","title": "Severity","type": "string","enum": ["Minor","Major","Critical"],"enumColors": {"Minor": "blue","Major": "orange","Critical": "red"}},"description": {"type": "string","title": "Description","description": "Detailed description about the incident"},"visibility": {"type": "string","title": "Visibility","enum": ["public","private"],"enumColors": {"public": "turquoise","private": "red"}}},"required": ["name", "severity", "visibility"],"order": ["name","description","severity","visibility"]}},"invocationMethod": {"type": "WEBHOOK","url": "https://api.incident.io/v2/incidents","agent": false,"synchronized": true,"method": "POST","headers": {"Authorization": "Bearer {{.secrets.INCIDENT_IO_API_KEY}}","Content-Type": "application/json"},"body": {"name": "{{.inputs.name}}","severity_id": "{{ if .inputs.severity == \"Minor\" then \"01J53A3A1FNEEQKFGSDKETN6DJ\" elif .inputs.severity == \"Major\" then \"01J53A3A1F2RCGSQQQNA6NJ5CY\" elif .inputs.severity == \"Critical\" then \"01J53A3A1FGWNRNK1TMK9CWJJW\" else \"01J53A3A1FNEEQKFGSDKETN6DJ\" end }}","summary": "{{.inputs.description}}","visibility": "{{.inputs.visibility}}","idempotency_key": "{{ now | tostring | @base64 }}"}},"requiredApproval": false}Extending Incident Severity LevelsBy default, incident.io provides three severity levels:
Minor,Major, andCritical. However, your organization may have additional severity levels. To include them, use the List Severity API to fetch all available severity levels. Then, update theseverity_idvalues in the request body to match the correct IDs from the API response. -
Click
Save.
Now you should see the Create incident.io Incident (Webhook) action in the self-service page. 🎉
Create an automation to update your catalog
After each execution of the action, we would like to update the relevant entity in Port with the latest status.
To achieve this, we can create an automation that will be triggered when the action completes successfully.
To create the automation:
-
Head to the automation page.
-
Click on the
+ Automationbutton. -
Copy and paste the following JSON configuration into the editor.
Update incident.io incident in Port automation (Click to expand)
{"identifier": "incident_io_incident_sync_status","title": "Sync incident.io Incident Status","description": "Update incident.io incident data in Port after creation","trigger": {"type": "automation","event": {"type": "RUN_UPDATED","actionIdentifier": "create_incident_io_incident_webhook"},"condition": {"type": "JQ","expressions": [".diff.after.status == \"SUCCESS\""],"combinator": "and"}},"invocationMethod": {"type": "UPSERT_ENTITY","blueprintIdentifier": "incidentIOIncident","mapping": {"identifier": "{{.event.diff.after.response.incident.id}}","title": "{{.event.diff.after.response.incident.name}}","properties": {"url": "{{.event.diff.after.response.incident.permalink}}","status": "{{.event.diff.after.response.incident.incident_status.name}}","severity": "{{.event.diff.after.response.incident.severity.name}}","visibility": "{{.event.diff.after.response.incident.visibility}}","description": "{{.event.diff.after.response.incident.summary}}","createdBy": "{{.event.diff.after.response.incident.creator.api_key.name}}","createdAt": "{{.event.diff.after.response.incident.created_at}}"},"relations": {}}},"publish": true} -
Click
Save.
Now when you execute the webhook action, the incident data in Port will be automatically updated with the latest information from incident.io.
Let's test it!
-
Head to the self-service page in Port.
-
Choose the
Create incident.io Incident (Webhook)action: -
Enter the required information:
- Incident name.
- Description of the incident.
- Severity level.
- Visibility.
-
Click on
Execute. -
Done! Wait for the incident to be created in incident.io.