New Relic
New Relic’s webhook notification channels support a fully custom JSON payload using Handlebars templating, with a live preview to validate the template before saving.
See API Overview for authentication and finding your Account ID/Team ID.
Configure the Webhook in New Relic
Section titled “Configure the Webhook in New Relic”- In New Relic, go to Alerts → Notification channels and add a new Webhook channel.
- Set the Base URL to
https://api.opsfusion.cloud/v1/account/YOUR_ACCOUNT_ID/push/alert. - Add a custom header:
Authorization: YOUR_API_KEY. - Enter the payload template below in the custom payload editor.
- Use New Relic’s built-in payload preview to confirm the rendered JSON looks correct before saving.
Payload Template
Section titled “Payload Template”{ "teamId": YOUR_TEAM_ID, "title": "{{ annotations.title.[0] }}", "description": "{{ annotations.description.[0] }}", "severity": {{#eq priority "CRITICAL"}}1{{else}}{{#eq priority "HIGH"}}1{{else}}{{#eq priority "MEDIUM"}}2{{else}}3{{/eq}}{{/eq}}{{/eq}}, "status": {{#eq state "CLOSED"}}3{{else}}1{{/eq}}, "labels": { "priority": "{{ priority }}" }}Unlike some of the other tools in this section, New Relic’s Handlebars implementation exposes a real {{#eq a b}}...{{else}}...{{/eq}} comparison helper, plus documented lifecycle variables — state (CREATED/ACTIVATED/CLOSED) and priority (CRITICAL/HIGH/MEDIUM/LOW) — so both status and severity can be computed inline from a single webhook config, without needing separate configs per alert state like several other integrations in this section require.
Field Mapping
Section titled “Field Mapping”| OpsFusion field | New Relic source |
|---|---|
teamId | Hardcoded per webhook channel |
title | annotations.title |
description | annotations.description |
severity | Computed inline from priority via nested {{#eq}} |
status | Computed inline from state via {{#eq state "CLOSED"}}3{{else}}1{{/eq}} |
labels | priority, or any other workflow variable |
Troubleshooting
Section titled “Troubleshooting”- Template preview shows an error: New Relic’s live preview will flag Handlebars syntax errors before you save — nested
{{#eq}}blocks are easy to mismatch braces on, so build the severity expression up one level at a time if it fails. status/severityalways the same value: confirmstate/priorityare the correct variable names for your specific workflow/notification destination — New Relic’s variable set has changed across its alerting system versions, so verify against the variables list shown in your own payload editor.- 403 from OpsFusion: verify the custom header is attached to the webhook channel, not just the base URL.
Support
Section titled “Support”For integration support:
- Email: support@opsfusion.cloud
- See Send Alerts for the full API reference