This page provides a reference for New Relic Lens actions available in the workflow automation actions catalog. These actions let you run ANSI SQL queries against data sources connected through New Relic Lens directly from a workflow step.
Prerequisites
Before using New Relic Lens actions in workflow automation, ensure you have:
- A New Relic account with appropriate permissions.
- One or more data sources connected in New Relic Lens.
- The necessary permissions for the New Relic Lens service.
Query Lens
The action identifier is newrelic.lens.query.
Runs an ANSI SQL query against connected data sources through New Relic Lens.
The following table describes all available input fields for this action.
Input | Type | Description | Example |
|---|---|---|---|
query | String | Required. The ANSI SQL statement to execute via Lens. Supports cross-source joins across connected data sources. | |
accountIds | List of int | Optional. The target accounts for query execution. If you don't provide this field, the query runs against the workflow's execution account. | |
format | Enum | Optional. The output format for results. Accepts | |
selectors | List | Optional. The selectors to get only the specified parameters as output. | |
The following table describes all output fields returned by this action.
Output | Type | Description |
|---|---|---|
results | List | An array of objects containing the results of the query. See Expressions property for more information. |
success | Boolean | Returns |
errorMessage | String | Contains the failure reason if the action fails. Example: |