Summary: ◀▼
You can connect action flows to New Relic using an API key to automate workflows involving data queries, entity lookups, entity searches, and alert condition creation. Use a dedicated service account for secure integration. This connection lets you run NRQL queries, retrieve entity details, search entities by criteria, and create alert conditions to monitor and manage your systems directly within your workflows.
Connecting New Relic to action builder
Before you can include external actions in your action flows, you must connect the action builder to the external system.
- All external actions performed by an action flow are attributed to the user who connected the external system. Therefore, it's a best practice to use a dedicated service account rather than personal credentials when connecting to each external system.
- All integrations request access to necessary scopes. However, it's important that you review and validate the scopes before authorizing the connection to the external system.
- When managing credentials for API key-based tools, such as OpenAI, it's best to store keys in a secure vault or credential manager.
To create a User API key in New Relic
The New Relic connection uses API key authentication. You will need to provide a User API key from your New Relic account. This key is used for querying data and managing configurations. The API key must have appropriate permissions to access the New Relic APIs for the actions you plan to use.
See the New Relic documentation for more information on New Relic API keys.
- Go to the New Relic user menu.
- Select API Keys.
- Create a new API key.
- Save the API key or keep the window open so you can copy and paste it into
Zendesk.
You'll need it when connecting New Relic to action builder.
- In Admin Center, click
Apps and integrations in the sidebar, then select Actions > Action
flows. - Create or edit an action flow.
- Open the step sidebar.
- Under External actions, click New Relic.
- Click Connect.
- Follow New Relic's prompts to enter your New Relic API key and complete the
connection.Important: All external actions performed by an action flow are attributed to the user who connected the external system. Therefore, it is a best practice to use a dedicated service account rather than personal credentials when connecting to each external system.
After you've connected to the system, you'll see an indicator that it's connected and details about the instance you're connected to, as well as the actions available for New Relic.
Using New Relic actions in action flows
Querying data
Use the Query data action to run NRQL queries against your New Relic telemetry data.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Account ID, NRQL
queryThe Account ID field provides a dropdown of accounts accessible with your API key. NRQL query uses SQL-like syntax. Example:
Optional: The Timeout field accepts values from 1 to 120 seconds and defaults to 10 seconds. |
| Output | Query results including array of result objects with fields determined by the NRQL SELECT clause, row count, and total result value for aggregation queries. |
Looking up an entity
Use the Lookup entity action to retrieve detailed information about a specific monitored entity.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Account ID,
EntityThe Entity field is a searchable dropdown. Type at least 2 characters of the entity name to search. Search results show the entity name and type, with a link to the entity in New Relic. Select the entity you want to look up to retrieve its full details including current alert status and associated tags. |
| Output | Entity details including entity GUID, name, type, URL, reporting status, alert severity, and tags with metadata. |
Searching entities
Use the Search entities action to find monitored entities matching search criteria.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Account IDOptional:
Consider the following when using the Search entities action:
|
| Output | Array of entity objects containing entity GUID, name, type, URL, domain, reporting status, alert severity, and tags, along with total count and indicator if more results are available. |
Creating an alert condition
Use the Create alert condition action to create a new NRQL alert condition in New Relic.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Account ID, Alert
policy, Condition name,
NRQL query, Critical
thresholdOptional: Consider the following
when using the Create alert condition action:
|
| Output | Alert condition details including condition ID, condition name, policy ID, and enabled status. |