New Relic · Arazzo Workflow

New Relic Create NRQL Alert Policy

Version 1.0.0

Create an alert policy and attach a NRQL alert condition to it.

1 workflow 1 source API 1 provider
View Spec View on GitHub AnalysisAnalyticsAPMDevOpsInfrastructureMonitoringObservabilityPerformancePlatformArazzoWorkflows

Provider

new-relic

Workflows

create-nrql-alert-policy
Create a policy then attach a NRQL alert condition to it.
Creates an alert policy and chains a NRQL condition onto the returned policy id so a custom NRQL signal drives the new policy.
2 steps inputs: conditionName, incidentPreference, policyName, runbookUrl, valueFunction outputs: conditionId, policyId
1
createPolicy
Create the alert policy that will own the NRQL condition, returning the generated policy id.
2
createNrqlCondition
Create a NRQL alert condition on the new policy so a custom query begins evaluating against the configured terms.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: New Relic Create NRQL Alert Policy
  summary: Create an alert policy and attach a NRQL alert condition to it.
  description: >-
    Stands up a NRQL-based alerting setup. The workflow creates an alert policy,
    reads the generated policy id, and creates a NRQL alert condition on that
    policy so a custom query begins driving incidents. Every step spells out its
    request inline so the flow can be read and executed without opening the
    underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: alertsApi
  url: ../openapi/new-relic-alerts-api-openapi.yml
  type: openapi
workflows:
- workflowId: create-nrql-alert-policy
  summary: Create a policy then attach a NRQL alert condition to it.
  description: >-
    Creates an alert policy and chains a NRQL condition onto the returned policy
    id so a custom NRQL signal drives the new policy.
  inputs:
    type: object
    required:
    - policyName
    - incidentPreference
    - conditionName
    properties:
      policyName:
        type: string
        description: The name of the new alert policy.
      incidentPreference:
        type: string
        description: Incident rollup strategy (PER_POLICY, PER_CONDITION, PER_CONDITION_AND_TARGET).
      conditionName:
        type: string
        description: A title for the NRQL alert condition.
      runbookUrl:
        type: string
        description: Runbook URL to display in notifications.
      valueFunction:
        type: string
        description: The value function applied to the NRQL result (e.g. single_value, sum).
  steps:
  - stepId: createPolicy
    description: >-
      Create the alert policy that will own the NRQL condition, returning the
      generated policy id.
    operationId: postAlertsPolicies
    requestBody:
      contentType: application/json
      payload:
        policy:
          name: $inputs.policyName
          incident_preference: $inputs.incidentPreference
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      policyId: $response.body#/policy/id
  - stepId: createNrqlCondition
    description: >-
      Create a NRQL alert condition on the new policy so a custom query begins
      evaluating against the configured terms.
    operationId: postAlertsNrqlConditionsPoliciesPolicyId
    parameters:
    - name: policy_id
      in: path
      value: $steps.createPolicy.outputs.policyId
    requestBody:
      contentType: application/json
      payload:
        nrql_condition:
          name: $inputs.conditionName
          runbook_url: $inputs.runbookUrl
          value_function: $inputs.valueFunction
          enabled: true
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      conditionId: $response.body#/nrql_condition/id
      conditionName: $response.body#/nrql_condition/name
  outputs:
    policyId: $steps.createPolicy.outputs.policyId
    conditionId: $steps.createNrqlCondition.outputs.conditionId

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/new-relic-create-nrql-alert-policy-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.