preview
We're still working on this feature, but we'd love for you to try it out!
This feature is currently provided as part of a preview program pursuant to our pre-release policies.
This page provides a comprehensive reference for New Relic actions available in the workflow automation actions catalog. These actions enable you to integrate New Relic platform capabilities into your workflow definitions, including sending custom events and logs, executing NerdGraph queries, running NRQL queries, and sending notifications.
Prerequisites
Before using New Relic 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.
Data ingest actions
Sends a custom events to New Relic
Input Field | Optionality | Type | Example |
|---|---|---|---|
attributes | Optional | Map |
|
events | Required | list |
|
licenseKey | Optional | string |
|
selectors | Optional | list |
|
Important
- attributes: Common attributes which are part of all the events when provided. Merging for each event item when needed event item overrides common definition.
- events: The list of event data. Note that events requires the use of an
eventTypefield that represents the custom event type and the maximum events allowed per request is 100. - licenseKey: The New Relic Account License Key that specifies the target account where events are sent. If this value is not provided, a default license key is assumed based on the account executing the workflow.
- selectors: The selectors to get only the specified parameters as output.
Output Field | Type | Example |
|---|---|---|
success | Boolean |
|
errorMessage | string |
|
Workflow example |
|---|
Expected output: Retrieve events: After successfully executing a workflow, you can retrieve the associated event by running a query under the account that executed the workflow: |
Send logs to New Relic
Input Field | Optionality | Type | Example |
|---|---|---|---|
attributes | Optional | map |
|
logs | Required | list |
|
licenseKey | Optional | string |
|
selectors | Optional | list |
|
Important
- attributes: Common attributes included in all logs when provided. If a log item specifies the same attribute, it overrides the common definition.
- logs: The list of log data. Note that the maximum logs allowed per request is 100.
- licenseKey: The New Relic Account License Key that specifies the target account where logs are sent. If not provided, a default license key is assumed based on the account executing the workflow. See License Key for more information.
- selectors: The selectors to get only the specified parameters as output.
Output Field | Type | Example |
|---|---|---|
success | Boolean |
|
errorMessage | string |
|
Workflow example |
|---|
Expected output: Retrieve logs: After successfully executing a workflow, you can retrieve the associated log by running a query under the account that executed the workflow: |
NerdGraph actions
Executes a Graphql command against newrelic NerdGraph API. The command can either be a query or a mutation.
Input | Optionality | Type | Description | Example |
|---|---|---|---|---|
graphql | Required | string | A GraphQL syntax. You should use GraphiQL to build and test your command | |
variables | Required | map[string]any | Any key/value pair variables to use with the GraphQL statement. | |
selectors | Optional | List | The selectors to get the only specified parameters as output. | |
Output | Type | Description |
|---|---|---|
data | map[string]any | Contents of the |
success | Boolean | Status of the request.s |
errorMessage | String | Failure reason as message. |
Example |
|---|
|
Query actions
Executes a cross-accounts NRQL query through the NerdGraph API.
Input | Optionality | Type | Description | Example |
|---|---|---|---|---|
query | Required | string | The NRQL query statement. | |
accountIds | Optional | list of int | The New Relic Account ID input is a list of target IDs that allows you to specify the target accounts where the query is executed against. If this value is not provided as an input, the query will automatically be executed against the account associated with the workflow's execution account. | |
selectors | Optional | list | The selectors to get the only specified parameters as output. | |
Output | Type | Example |
|---|---|---|
results: An array of objects containing the results of the query. | |
Notifications actions
Sends a message to a channel, integrated with destinations for example slack
Input | Optionality | Type | Description | Example |
|---|---|---|---|---|
type | Required | string | Type of newrelic destination |
|
destinationId | Required | String | DestinationId associated with the newrelic destination. |
|
parameters | Required | map | Fields required to send notification to chosen destination type. |
|
selectors | Optional | list | The selectors to get the only specified parameters as output. |
|
Output | Type | Example |
|---|---|---|
success | boolean |
|
Sends a message to a MS team channel, integrated with destinations.
Input Field | Optionality | Datatype | Description | Example |
|---|---|---|---|---|
destinationId | Required | String | DestinationId associated with the newrelic destination. Refer New Relic integration for Microsoft Teams for steps on how to configure a new destination and listing destination Id. Refer Destinations to know more about destinations. bash |
|
teamName | Required | String | Team name associated with given destination id |
|
channelName | Required | String | Channel name where message need to be sent |
|
message | Required | String | Text message which need to be sent |
|
selectors | Optional | List | The selectors to get the only specified parameters as output. |
|
Output Field | Type | Example |
|---|---|---|
success | Boolean |
|
sessionId | String |
|
errorMessage | String |
|
Workflow example |
|---|
|
Sends a email to NewRelic email destinations with or without attachments
Input Field | Optionality | Datatype | Description | Example |
|---|---|---|---|---|
destinationId | Required | String | DestinationId associated with the newrelic destination. Refer New Relic integration for Microsoft Teams for steps on how to configure a new destination and listing destination Id. Refer Destinations to know more about destinations. |
|
subject | Required | String | Subject of email |
|
message | Required | String | Message which need to be send in email |
|
attachments | Optional | List | A list of optional attachment | |
attachment.type | Required | Enum | One of: | |
attachment.query | Optional | String | For |
|
*attachment.accountIds** | Optional | List | For |
|
attachment.format | Optional | Enum | For |
|
attachment.content | Optional | String | For |
|
attachment.filename | Optional | String | A filename for the attachment |
|
selectors | Optional | List | The selectors to get the only specified parameters as output. |
|
Output Field | Type | Example |
|---|---|---|
success | Boolean |
|
sessionId | String |
|
errorMessage | String |
|
attachments | List | |
Workflow example |
|---|
|