• /
  • EnglishEspañolFrançais日本語한국어Português
  • EntrarComeçar agora

New Relic NerdGraph actions

|View as Markdown (English)

This page provides a reference for New Relic NerdGraph actions available in the workflow automation actions catalog. These actions enable you to execute NerdGraph queries and mutations.

Prerequisites

Before using New Relic NerdGraph actions in workflow automation, ensure you have:

  • A New Relic account with appropriate permissions.
  • A New Relic license key (if sending data to a different account).
  • The necessary permissions for the specific New Relic services you plan to use.

See License Key for information on how to create and manage your New Relic Account License Key.

Run NerdGraph request

The action identifier is newrelic.nerdgraph.execute.

Executes a GraphQL command against the New Relic NerdGraph API. The command can be either a query or a mutation.

The following table describes all available input fields for this action.

Input

Type

Description

Example

graphql

String

Required. A GraphQL statement. Use GraphiQL to build and test your command.

variables

Map[string]any

Required. Any key/value pair variables to use with the GraphQL statement.

selectors

List

Optional. The selectors to get only the specified parameters as output.

steps:
- name: findingVar
type: action
action: newrelic.nerdgraph.execute
version: 1
inputs:
graphql: |
query GetEntity($entityGuid: EntityGuid!) {
actor {
entity(guid: $entityGuid) {
alertSeverity
}
}
}
variables:
entityGuid: ${{ .workflowInputs.entityGuid }}
- name: findingInline
type: action
action: newrelic.nerdgraph.execute
version: 1
inputs:
graphql: |
{
actor {
entity(guid: "${{ .workflowInputs.entityGuid }}") {
alertSeverity
}
}
}
selectors:
- name: entities
expression: '.data'

The following table describes all output fields returned by this action.

Output

Type

Description

data

Map[string]any

Contents of the data property of a NerdGraph response.

success

Boolean

Status of the request.

errorMessage

String

Failure reason as message.

The following example runs a NerdGraph query to retrieve the current user ID, then logs the result.

Workflow example

steps:
- name: currentUserId
type: action
action: newrelic.nerdgraph.execute
version: 1
inputs:
graphql: |
query userId {
currentUser {
id
}
}
- name: logResult
type: action
action: newrelic.ingest.sendLogs
version: 1
inputs:
logs:
- message: "userId: ${{ .steps.currentUserId.outputs.data.currentUser.id }}"
Copyright © 2026 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.