Turn every New Relic alert into a tracked Jira ticket

Every New Relic alert opens a Jira bug with the full context and a Slack heads up, then closes itself with the incident duration when it recovers.

Deterministic Code
New RelicJiraSlackEngineeringNotifications & AlertsData Sync
PromptCreate

Build me a deterministic code workflow that turns every New Relic alert into a tracked Jira ticket, so no alert scrolls past in a chat channel without leaving a permanent record. Trigger it with a webhook. I will point a New Relic alert workflow at the webhook URL as a notification destination, so every incoming request is a New Relic issue event payload.

Branch on the issue state in the payload. When the payload says a New Relic issue opened, run the open branch. When it says the issue closed, run the close branch. There is no judgement anywhere in this workflow, every field is a fixed mapping and the state field decides the path, so keep all of it in code.

Open branch: create a Jira bug with Create Issue. Build the summary from the New Relic condition name and the affected entity, for example "New Relic: <condition name> on <entity name>". In the description include the condition name, the affected entity or entities, the alert priority as New Relic reported it, the timestamp the issue opened, and a direct link back to the New Relic issue so whoever picks up the ticket can jump straight to the telemetry. Set the Jira priority with this fixed lookup on the New Relic priority: CRITICAL becomes Highest, HIGH becomes High, MEDIUM becomes Medium, LOW becomes Low. If the priority is missing or unrecognised, default to Medium.

This next part is what makes the close branch possible, so do not skip it: write the New Relic issue id onto the Jira issue at creation time. Add a label of the form newrelic-<issue id>, and also print the raw issue id on its own line in the description. The close branch finds the ticket again by that label, so the id has to live somewhere a JQL query can match exactly.

Then post the ticket to Slack with Send a Message, to a channel I will configure. The message should carry the Jira issue key and a clickable link to the ticket, plus the condition name, the affected entity and the priority, so the channel sees both the alert itself and where it is now being tracked.

Close branch: when the payload says the New Relic issue closed, find the matching ticket with Search Issues (JQL), querying on the label that holds the New Relic issue id, something like labels = "newrelic-<issue id>" scoped to my Jira project. Take the most recently created match. Move it to Done with Do Transition, resolving the transition by its name rather than hardcoding a transition id, since those ids differ from project to project. Carry a comment on that transition recording how long the incident stayed open, computed as the difference between the opening and closing timestamps in the New Relic payloads and written in plain terms, for example "New Relic issue closed after 2h 14m", along with the closing timestamp. If the transition will not accept a comment, add it separately with Add Comment.

A few fixed guards, all deterministic. Before creating anything on the open branch, run the same JQL lookup first, and if a ticket already exists for that New Relic issue id, skip creation instead of opening a duplicate, because webhook deliveries can retry. On the close branch, if no ticket matches the issue id, post a short note to the same Slack channel saying a close event arrived with no matching ticket, rather than failing the run. If the matched ticket is already in Done, leave it alone.

What does this prompt do?

  • Listens for New Relic alerts and opens a Jira bug the moment an issue fires, so nothing depends on someone spotting a chat message
  • Fills the ticket in for you with the alert condition, the affected service, the priority translated onto your own Jira scale, the time it started, and a link straight back to New Relic
  • Posts the new ticket to your Slack channel so the team sees the alert and knows exactly where it is being tracked
  • Closes the loop automatically: when the alert recovers, it finds the same ticket, moves it to Done, and leaves a comment recording how long the incident stayed open

What do I need to use this?

  • A New Relic account where you can add a notification destination to your alert policies
  • A Jira project you want the tickets created in, and permission to create issues there
  • A Slack workspace and the channel where alerts should be posted
  • The names your Jira project uses for priorities and for the Done status, if they differ from the defaults

How can I customize it?

  • Change the Slack channel, or send high priority alerts to one channel and everything else to another
  • Adjust the priority mapping so New Relic priorities land on whatever priority names your Jira project actually uses
  • Switch the issue type from Bug to Incident, change the target status from Done to Resolved, or only raise tickets above a certain priority

FAQs

Will it create a duplicate ticket if the same alert fires twice?
No. Before opening anything, the workflow looks for an existing ticket carrying that New Relic issue id and skips creation if it finds one. Alert notifications sometimes get delivered more than once, so this guard keeps your backlog clean.
How does it know which ticket to close later?
When the ticket is created, the New Relic issue id is written onto it as a label and repeated in the description. When the alert recovers, the workflow searches Jira for that exact id, which is why it always reconnects the closing event to the right ticket.
What if the alert closes but nobody actually fixed anything?
The ticket still moves to Done with a comment showing how long the incident lasted, because the point is an auditable trail of every alert. If you would rather have recovered alerts land in a review column instead, you can change the target status when you set this up.
Can I use Microsoft Teams or another chat tool instead of Slack?
Yes. The Slack step is just the notification at the end, so you can swap it for another supported chat tool without touching the ticket logic.
Do I need a specific New Relic plan for this?
You need to be able to add a notification destination to your alert policies, which is part of standard New Relic alerting. If your alerts can already reach email or a chat channel today, they can reach this workflow.

Related templates

Auto-fix your calendar when a flight slips, and flag what's at risk

When your flight moves, your calendar times get corrected automatically and you get a Slack note naming the meetings you're about to miss.

Google Calendar
AviationStack
Slack
Agentic Task
Build a credential rotation checklist when someone leaves

When someone leaves, we check which shared passwords they used in their final months and post a ranked rotation list to your security channel.

1Password
Rippling
Slack Bot
+1
Agentic Task
Trace phishing emails to the sending IP and report abuse

Every 15 minutes, forwarded phishing reports get traced back to the server that really sent them, with a verdict in Slack and the worst senders reported.

AbuseIPDB
Gmail
Slack
Agentic Task
Turn procurement portal tenders into CRM deals each morning

Every weekday at 7am, sign in to the tender portals you track, filter new notices against your bid criteria, and open a deal for the ones worth chasing.

Anchor Browser
Google Sheets
HubSpot
+1
Agentic Task
Turn each week's football fixtures into a venue staffing plan

Every Monday, rank the week's matches by expected demand, put the big ones on your venue calendar, and post a rota-ready summary to Slack.

API-Sports
Google Calendar
Slack
Agentic Task
Turn 5 star Yotpo reviews into a weekly marketing content queue

Every Tuesday we pull your best new reviews, draft social captions, email testimonials and product page quotes, then stage them in Notion for approval.

Yotpo
Notion
Slack
Agentic Task

Stop letting alerts scroll past in a chat channel.

Give every New Relic alert a ticket that opens itself, gets seen in Slack, and closes with the incident duration on the record.