---
title: List compound conditions
source: https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/newrelic/alerts/newrelic-alerts-list-compound-conditions
---

The action identifier is `newrelic.alerts.listCompoundConditions`.

Lists compound alert conditions for an account with optional ID filtering and cursor-based pagination. Compound conditions are not available via a separate get action — this is the only action that surfaces their component structure.

## Inputs

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

| Input         | Type   | Description                                                                                                                                        | Example                                                                                                                                                                                                      |
| ------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **accountId** | Int    | **Required.** The New Relic account to list compound conditions in.                                                                                | `123456`                                                                                                                                                                                                     |
| **idEq**      | String | **Optional.** Filter to the compound condition with this exact ID.                                                                                 | `"3400123"`                                                                                                                                                                                                  |
| **idIn**      | List   | **Optional.** Filter to compound conditions matching any of these IDs.                                                                             | `["3400123", "3400124"]`                                                                                                                                                                                     |
| **sort**      | List   | **Optional.** Sort criteria applied in order. Each entry has a `key` (`ID`, `NAME`, or `ENABLED`) and a `direction` (`ASCENDING` or `DESCENDING`). | `[{"key": "NAME", "direction": "ASCENDING"}]`                                                                                                                                                                |
| **cursor**    | String | **Optional.** Pagination cursor from a prior call's `nextCursor` output. Leave blank on the first call.                                            | `"eyJsYXN0SWQiOiIzNDAwMTIzIn0="`                                                                                                                                                                             |
| **selectors** | List   | **Optional.** JQ selectors to extract values from the response.                                                                                    | ```yaml selectors:   - name: items     expression: ".data.actor.account.alerts.compoundConditions.items"   - name: nextCursor     expression: ".data.actor.account.alerts.compoundConditions.nextCursor" ``` |

## Outputs

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

| Output           | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                     |
| ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **success**      | Boolean | `true` when the step executed without error.                                                                                                                                                                                                                                                                                                                                                    |
| **errorMessage** | String  | Error message on failure. `null` on success.                                                                                                                                                                                                                                                                                                                                                    |
| **data**         | Map     | NerdGraph response. Use `selectors` to extract `items`, `nextCursor`, or `totalCount`. `nextCursor` is `null` when there are no further pages. ```json {   "data": {     "actor": {       "account": {         "alerts": {           "compoundConditions": {             "nextCursor": null,             "totalCount": 0,             "items": []           }         }       }     }   } } ``` |

## Example

The following example lists all compound conditions in an account.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                 |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: list_compound_conditions description: List compound alert conditions steps:   - name: listCompoundConditions     type: action     action: newrelic.alerts.listCompoundConditions     version: 1     inputs:       accountId: ${{ .workflowInputs.accountId }}       selectors:         - name: items           expression: ".data.actor.account.alerts.compoundConditions.items"     next: end ``` |
