> For the complete documentation index, see [llms.txt](https://docs.pagerly.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pagerly.io/incidents-and-alerting/integrations/newrelic.md).

# New Relic

### Create the integration in Pagerly

1\. Navigate to <https://workspace.pagerly.io/inbound> and click **"Add Inbound Integration"**.

2\. Set a display name, select the team this integration belongs to, choose the integration below, and click **"Add Integration"**.

3\. Copy the generated webhook URL - you will paste it into the tool in the next section.

### Configure New Relic

1\. In New Relic go to **Alerts → Destinations** and create a new **Webhook** destination.

2\. Paste the Pagerly webhook URL into **Endpoint URL** and save.

3\. Go to the **Workflows** tab and create a workflow. Under **Notify**, choose **Webhook** and select the destination you just created.

4\. Paste the following into the **Template** field:

```json
{
  "id": {{ json issueId }},
  "title": {{ json annotations.title.[0] }},
  "state": {{ json state }},
  "issueUrl": {{ json issuePageUrl }},
  "priority": {{ json priority }},
  "impactedEntities": {{ json entitiesData.names }}
}
```

`id`, `title` and `state` are required - the rest is optional context.

5\. Click **Send test notification**. Set the sample payload `state` to `ACTIVATED` so the alert appears.

6\. Activate the workflow.

### Notes

* **Deduplication** uses `id`. Repeated notifications for the same issue update the open incident instead of creating another.
* **Severity** comes from `priority`: `CRITICAL` and `HIGH` map to SEV 1, `MEDIUM` to SEV 2, `LOW` to SEV 3.
* **Resolution**: a `state` of `CLOSED` resolves the incident.
