> For the complete documentation index, see llms.txt.
Skip to main content

Check out Port for yourself ➜ 

Trigger Datadog Incident

Implement with AI

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/trigger-datadog-incident

Read the raw markdown version at https://docs.port.io/guides/all/trigger-datadog-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 quickly trigger incidents in Datadog directly from Port using Port's self service actions.

You can implement this action in two ways:

  1. GitHub workflow: A more flexible approach that allows for complex workflows and custom logic, suitable for teams that want to maintain their automation in Git.
  2. Synced webhooks: A simpler approach that directly interacts with Datadog's API through Port, ideal for quick implementation and minimal setup.

Prerequisites

  1. Complete the onboarding process.
  2. Access to your Datadog organization with permissions to create incidents.
  3. Port's GitHub Ocean integration is installed.
  4. Datadog API token with incident_write permission scope.

Set up data model

If you haven't installed the Datadog integration, you'll need to create a blueprint for Datadog incidents. However we highly recommend you install the Datadog integration to have this automatically set up for you.

Create the Datadog incident blueprint

  1. Go to your Builder page.

  2. Click on + Blueprint.

  3. Click on the {...} button in the top right corner, and choose "Edit JSON".

  4. Add this JSON schema:

    Datadog Incident Blueprint (Click to expand)
    {
    "identifier": "datadogIncident",
    "description": "This blueprint represents a Datadog incident in our context lake",
    "title": "Datadog Incident",
    "icon": "Datadog",
    "schema": {
    "properties": {
    "customerImpactScope": {
    "title": "Customer Impact Scope",
    "description": "A summary of the impact customers experienced during the incident.",
    "type": "string"
    },
    "customerImpacted": {
    "title": "Customer Impacted",
    "description": "A flag indicating whether the incident caused customer impact.",
    "type": "boolean",
    "default": false
    },
    "customerImpactStart": {
    "title": "Customer Impact Start",
    "type": "string",
    "description": "Start time of incident affecting customer",
    "format": "date-time"
    },
    "customerImpactEnd": {
    "title": "Customer Impact End",
    "description": "End timestamp of incident affecting customers",
    "type": "string",
    "format": "date-time"
    },
    "created": {
    "title": "Created At",
    "description": "Timestamp of incident creation",
    "type": "string",
    "format": "date-time"
    },
    "updatedAt": {
    "title": "Updated At",
    "description": "Last time incident was updated",
    "type": "string",
    "format": "date-time"
    },
    "customerImpactDuration": {
    "title": "Customer Impact Duration",
    "description": "Duration of customer impact",
    "type": "number"
    },
    "timeToDetect": {
    "title": "Time To Detect",
    "description": "Number of seconds it took to detect incident",
    "type": "number"
    },
    "timeToRepair": {
    "title": "Time To Repair",
    "description": "Number of seconds it took to fix incident",
    "type": "number"
    },
    "severity": {
    "title": "Severity",
    "description": "Severity of incident",
    "type": "string"
    },
    "state": {
    "title": "State",
    "description": "State of the incident",
    "type": "string"
    },
    "createdBy": {
    "title": "Created By",
    "description": "Name of user that created this incident",
    "type": "string"
    }
    }
    },
    "calculationProperties": {},
    "relations": {}
    }
  5. Click "Save" to create the blueprint.

Implementation

You can trigger Datadog incidents by leveraging Port's synced webhooks and secrets to directly interact with the Datadog's API. This method simplifies the setup by handling everything within Port.

Add Port secrets

Existing secrets

If you have already installed Port's Datadog integration, these secrets should already exist in Port. To view your existing secrets:

  1. In your Port application, click on your profile picture .
  2. Choose Credentials, then click on the Secrets tab.

To add these secrets to Port:

  1. In your Port application, click on your profile picture .

  2. Click on Credentials.

  3. Click on the Secrets tab.

  4. Click on + Secret and add the following secrets:

    • DD_API_KEY: Your Datadog API Key.
    • DD_APPLICATION_KEY: Your Datadog Application Key.

Set up self-service action

Follow these steps to create the self-service action:

  1. Head to the self-service page.

  2. Click on the + New Action button.

  3. Click on the {...} Edit JSON button.

  4. Copy and paste the following JSON configuration into the editor.

    Trigger Datadog Incident Action Using Synced Webhook (Click to expand)
    Modification Required

    Make sure to replace <YOUR_DD_API_URL> with your Datadog API URL.
    Datadog API URL by default should be https://api.datadoghq.com. However, if you are on the Datadog EU site, set the secret to https://api.datadoghq.eu.
    If you have your region information you use https://api.<region>.datadoghq.com or https://api.<region>.datadoghq.eu.

    {
    "identifier": "datadogIncident_trigger_datadog_incident_webhook",
    "title": "Trigger Datadog Incident (Webhook)",
    "icon": "Datadog",
    "description": "Triggers a Datadog incident using a synced webhook",
    "trigger": {
    "type": "self-service",
    "operation": "CREATE",
    "userInputs": {
    "properties": {
    "title": {
    "title": "Title",
    "description": "The title of the incident, summarizing what happened.",
    "type": "string"
    },
    "customerImpacted": {
    "title": "Customer Impacted",
    "description": "Indicates whether the incident caused customer impact.",
    "type": "boolean",
    "default": false
    },
    "customerImpactScope": {
    "icon": "DefaultProperty",
    "title": "Customer Impact Scope",
    "description": "Summary of the impact experienced by customers.",
    "type": "string"
    },
    "notificationHandleName": {
    "title": "Notification Handle Name",
    "description": "The name of the notification handle.",
    "type": "string"
    },
    "notificationHandleEmail": {
    "title": "Notification Handle Email",
    "description": "The email address used for the notification.",
    "type": "string",
    "pattern": "^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"
    }
    },
    "required": [
    "title",
    "customerImpacted",
    "notificationHandleName",
    "notificationHandleEmail",
    "customerImpactScope"
    ],
    "order": [
    "title",
    "customerImpacted",
    "customerImpactScope",
    "notificationHandleName",
    "notificationHandleEmail"
    ]
    },
    "blueprintIdentifier": "datadogIncident"
    },
    "invocationMethod": {
    "type": "WEBHOOK",
    "url": "<YOUR_DD_API_URL>/api/v2/incidents",
    "agent": false,
    "synchronized": true,
    "method": "POST",
    "headers": {
    "Content-Type": "application/json",
    "DD-API-KEY": "{{ .secrets.DD_API_KEY }}",
    "DD-APPLICATION-KEY": "{{ .secrets.DD_APPLICATION_KEY }}"
    },
    "body": {
    "data": {
    "type": "incidents",
    "attributes": {
    "customer_impact_scope": "{{.inputs.\"customerImpactScope\"}}",
    "customer_impacted": "{{.inputs.\"customerImpacted\"}}",
    "title": "{{.inputs.\"title\"}}",
    "notification_handles": [
    {
    "display_name": "{{.inputs.\"notificationHandleName\"}}",
    "handle": "{{.inputs.\"notificationHandleEmail\"}}"
    }
    ]
    }
    }
    }
    },
    "requiredApproval": false
    }
  5. Click Save.

Now you should see the Trigger Datadog Incident (Webhook) action in the self-service page. 🎉

Install the Datadog Integration

Triggering the incident data via the api will not automatically update the incident data in your Port catalog.
To ensure that the Datadog incident data remains up to date in your catalog, install the Datadog integration in Port.

Let's test it!

  1. Head to the self-service page in Port

  2. Choose either the GitHub workflow or webhook implementation:

    • For GitHub workflow: Click on Trigger Datadog Incident
    • For webhook: Click on Trigger Datadog Incident (Webhook)
  3. Fill in the incident details:

    • Title of the incident
    • Whether customers are impacted
    • Customer impact scope (if customers are impacted)
    • Notification handle name and email
  4. Click on Execute

  5. Wait for:

    • GitHub workflow: The workflow to complete and create the incident
    • Webhook: The incident to be created in Datadog
  6. Check your Datadog incidents page to see the new incident