Skip to content

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.

  1. In New Relic, go to Alerts → Notification channels and add a new Webhook channel.
  2. Set the Base URL to https://api.opsfusion.cloud/v1/account/YOUR_ACCOUNT_ID/push/alert.
  3. Add a custom header: Authorization: YOUR_API_KEY.
  4. Enter the payload template below in the custom payload editor.
  5. Use New Relic’s built-in payload preview to confirm the rendered JSON looks correct before saving.
{
"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.

OpsFusion fieldNew Relic source
teamIdHardcoded per webhook channel
titleannotations.title
descriptionannotations.description
severityComputed inline from priority via nested {{#eq}}
statusComputed inline from state via {{#eq state "CLOSED"}}3{{else}}1{{/eq}}
labelspriority, or any other workflow variable
  • 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/severity always the same value: confirm state/priority are 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.

For integration support: