---
title: New Relic notification actions
source: https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/newrelic/newrelic-notification
---

This page provides a reference for New Relic notification actions available in the Workflow Automation actions catalog. These actions enable you to send notifications through New Relic.

## Prerequisites

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

-   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](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys#license-key) for information on how to create and manage your New Relic Account License Key.

## Send message

Sends messages or emails to New Relic destinations. You must first create the appropriate destination in New Relic, then use its ID in this action. The action identifier is `newrelic.notification.send`.

### Inputs

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

| Input                                               | Type    | Description                                                                                                                                                                                                                                                                                                                                                                       | Example                                                                                                                                                                                             |
| --------------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **type**                                            | String  | **Required.** The destination type.                                                                                                                                                                                                                                                                                                                                               | `slack` `email` `microsoftTeams`                                                                                                                                                                    |
| **destinationId**                                   | String  | **Required.** DestinationId associated with the New Relic destination. See [NerdGraph tutorial: Alerts destinations](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-destinations/) to configure a destination and retrieve its ID, and [Destinations](https://docs.newrelic.com/docs/alerts/get-notified/destinations/) for more information. | `123e4567-e89b-12d3-a456-426614174000`                                                                                                                                                              |
| **parameters**                                      | Map     | **Required.** Fields required to send the notification to the chosen destination type. For **Slack**: `channel` (channel name or ID) and `text` (message). For **Email**: `subject` and `message`.                                                                                                                                                                                | `{\"channel\": \"${{ YOUR_CHANNEL }}\", \"text\": \"Enter your text here\"}` or `{\"subject\": \"${{ subject }}\", \"message\": \"Enter your message here\"}`                                       |
| **attachments**                                     | List    | **Optional.** A list of optional attachments. This action doesn't support attachments when `type` is `slack`.                                                                                                                                                                                                                                                                     |                                                                                                                                                                                                     |
| **attachment.type**                                 | Enum    | **Required.** The content type of the attachment: `QUERY` (Query), `RAW` (Raw data), or `DASHBOARD_SNAPSHOT` (Dashboard snapshot).                                                                                                                                                                                                                                                |                                                                                                                                                                                                     |
| **attachment.query**                                | String  | **Optional.** For `QUERY` type, the NRQL query statement.                                                                                                                                                                                                                                                                                                                         | `SELECT * FROM Log`                                                                                                                                                                                 |
| **attachment.accountIds**                           | List    | **Optional.** For `QUERY`, the New Relic account IDs to execute the query against. If not provided, uses the account associated with the workflow.                                                                                                                                                                                                                                | `[12345567]`                                                                                                                                                                                        |
| **attachment.format**                               | Enum    | **Optional.** For `QUERY`, the output format. Default: `JSON`.                                                                                                                                                                                                                                                                                                                    | `JSON` `CSV` `PSV` `TSV`                                                                                                                                                                            |
| **attachment.content**                              | String  | **Optional.** For `RAW`, the attachment content in UTF-8.                                                                                                                                                                                                                                                                                                                         | `A,B,C\n1,2,3`                                                                                                                                                                                      |
| **attachment.filename**                             | String  | **Optional.** A filename for the attachment. If omitted, a name is generated automatically.                                                                                                                                                                                                                                                                                       | `log_count.csv`                                                                                                                                                                                     |
| **attachment.dashboardGuid**                        | String  | **Required (for `DASHBOARD_SNAPSHOT`).** The GUID of the dashboard to snapshot. Toggle **JQ input** to provide a dynamic expression.                                                                                                                                                                                                                                              | `YOUR_DASHBOARD_GUID`                                                                                                                                                                               |
| **attachment.dashboardParams**                      | Object  | **Optional (for `DASHBOARD_SNAPSHOT`).** Snapshot configuration options. Omit to use all dashboard defaults.                                                                                                                                                                                                                                                                      |                                                                                                                                                                                                     |
| **attachment.dashboardParams.format**               | Enum    | **Optional.** File format of the snapshot.                                                                                                                                                                                                                                                                                                                                        | `PDF` `PNG`                                                                                                                                                                                         |
| **attachment.dashboardParams.display**              | Object  | **Optional.** Dimensions of the snapshot image.                                                                                                                                                                                                                                                                                                                                   |                                                                                                                                                                                                     |
| **attachment.dashboardParams.display.width**        | Integer | **Optional.** Width in pixels. Min: `10`, max: `2000`.                                                                                                                                                                                                                                                                                                                            | `1920`                                                                                                                                                                                              |
| **attachment.dashboardParams.display.height**       | Integer | **Optional.** Height in pixels. Min: `10`, max: `2000`.                                                                                                                                                                                                                                                                                                                           | `1080`                                                                                                                                                                                              |
| **attachment.dashboardParams.variables**            | List    | **Optional.** Template variable overrides. Each entry requires `name` and a `values` list. Only variables already defined on the dashboard are valid — passing an undefined variable name causes the workflow to fail.                                                                                                                                                            |                                                                                                                                                                                                     |
| **attachment.dashboardParams.timeWindow**           | Object  | **Optional.** Time window for the snapshot. Omit entirely to use the dashboard's saved time window. Provide either `duration` (relative) or `beginTime` and `endTime` (absolute range) — not both.                                                                                                                                                                                |                                                                                                                                                                                                     |
| **attachment.dashboardParams.timeWindow.duration**  | Integer | **Optional.** Relative time window in milliseconds.                                                                                                                                                                                                                                                                                                                               | `1800000` (30 minutes)                                                                                                                                                                              |
| **attachment.dashboardParams.timeWindow.beginTime** | Integer | **Optional.** Absolute start time in epoch milliseconds. Use with `endTime`.                                                                                                                                                                                                                                                                                                      | `1789452840316`                                                                                                                                                                                     |
| **attachment.dashboardParams.timeWindow.endTime**   | Integer | **Optional.** Absolute end time in epoch milliseconds. Use with `beginTime`.                                                                                                                                                                                                                                                                                                      | `1789454640316`                                                                                                                                                                                     |
| **attachment.dashboardParams.entityFilter**         | String  | **Optional.** Filters dashboard data by entity. Provide the filter expression without the `WHERE` keyword.                                                                                                                                                                                                                                                                        | `appName = 'Production'`                                                                                                                                                                            |
| **selectors**                                       | List    | **Optional.** Selectors to extract specific fields from the output.                                                                                                                                                                                                                                                                                                               | `[{\"name\": \"success\", \"expression\": \".success\"},{\"name\": \"attachments\", \"expression\": \".response.attachments\"},{\"name\": \"sessionId\", \"expression\": \".response.sessionId\"}]` |

### Outputs

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

| Output         | Type   | Example                                                                             |
| -------------- | ------ | ----------------------------------------------------------------------------------- |
| `sessionId`    | String | `"sessionId": "7fa97f26-3791-492e-a39b-53793163dfb9"`                               |
| `errorMessage` | String | `Channel is a required field in the notification send"`                             |
| `attachments`  | List   | ```yaml [{   "blobId": "43werdtfgvhiu7y8t6r5e4398yutfgvh",   "rowCount": 100 }] ``` |

> #### ⚠️ IMPORTANT
>
> This action doesn't support attachments when sending to a Slack destination.

### Example

-   **Slack**

```yaml
name: slack_notification_workflow
description: This is a test workflow to test slack notification send action
steps:
  - name: SendMessageUsingSlackChannel
    type: action
    action: newrelic.notification.send
    version: 1
    inputs:
      type: slack
      destinationId: ccd0d926-ed6f-4ddd-bc7d-b7eb9822908d
      parameters:
        text: Hi , Testing notifcation api using slack channel name
        channel: test-channel-workflow
```

-   **Email**

```yaml
name: emailer-workflow
description: send email using workflow
steps:
  - name: emailReport1
    type: action
    action: newrelic.notification.email
    version: 1
    inputs:
      type: email
      destinationId: "e7a5a004-424d-44db-a3df-266980a90242"
      parameters:
        subject: "workflow notification"
        message: "this is a message."
      attachments:
        - type: QUERY
          query: "SELECT * FROM Log"
          format: CSV
          filename: "log_count.csv"
      selectors:
        - name: success
          expression: '.success'
        - name: sessionId
          expression: '.response.sessionId'
        - name: attachments
          expression: '.response.attachments'
```

## Send a Microsoft Teams notification

Sends a message to a Microsoft Teams channel, integrated with destinations. The action identifier is `newrelic.notification.sendMicrosoftTeams`.

### Inputs

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

| Input             | Type   | Description                                                                                                                                                                                                                                                                                                                                                         | Example                                                   |
| ----------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| **destinationId** | String | **Required.** DestinationId associated with the New Relic destination. See [New Relic integration for Microsoft Teams](https://docs.newrelic.com/docs/alerts/get-notified/microsoft-teams-integrations/) to configure a destination and retrieve its ID, and [Destinations](https://docs.newrelic.com/docs/alerts/get-notified/destinations/) for more information. | `123e4567-e89b-12d3-a456-426614174000`                    |
| **teamName**      | String | **Required.** Team name associated with the given destination ID.                                                                                                                                                                                                                                                                                                   | `TEST_TEAM`                                               |
| **channelName**   | String | **Required.** Channel name to send the message to.                                                                                                                                                                                                                                                                                                                  | `StagingTesting`                                          |
| **message**       | String | **Required.** Text message to send.                                                                                                                                                                                                                                                                                                                                 | `Hello from Workflow Automation`                          |
| **selectors**     | List   | **Optional.** Selectors to extract specific fields from the output.                                                                                                                                                                                                                                                                                                 | `[{\"name\": \"success\", \"expression\": \".success\"}]` |

### Outputs

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

| Output         | Type    | Example                                                  |
| -------------- | ------- | -------------------------------------------------------- |
| `success`      | Boolean | `true/false`                                             |
| `sessionId`    | String  | `"sessionId": "7fa97f26-3791-492e-a39b-53793163dfb9"`    |
| `errorMessage` | String  | `"Message is a required field in the notification send"` |

### Example

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                           |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: msTeam_notification_workflow description: This is a test workflow to test MSTeam notification send action steps:   - name: SendMessageUsingMSTeam     type: action     action: newrelic.notification.sendMicrosoftTeams     version: 1     inputs:       destinationId: acc24dc2-d4fc-4eba-a7b4-b3ad0170f8aa       channel: DEV_TESTING       teamName: TEST_TEAM_DEV       message: Hello from Workflow ``` |

## Send an email

Sends an email to New Relic email destinations, with or without attachments. The action identifier is `newrelic.notification.sendEmail`.

### Inputs

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

| Input                                               | Type    | Description                                                                                                                                                                                                                                                                                                                                                                       | Example                                                                                                                                                                                             |
| --------------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **destinationId**                                   | String  | **Required.** DestinationId associated with the New Relic destination. See [NerdGraph tutorial: Alerts destinations](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-destinations/) to configure a destination and retrieve its ID, and [Destinations](https://docs.newrelic.com/docs/alerts/get-notified/destinations/) for more information. | `123e4567-e89b-12d3-a456-426614174000`                                                                                                                                                              |
| **subject**                                         | String  | **Required.** Subject of the email.                                                                                                                                                                                                                                                                                                                                               | `workflow-notification`                                                                                                                                                                             |
| **message**                                         | String  | **Required.** Message to send in the email.                                                                                                                                                                                                                                                                                                                                       | `Hello! from Workflow Automation`                                                                                                                                                                   |
| **attachments**                                     | List    | **Optional.** A list of optional attachments.                                                                                                                                                                                                                                                                                                                                     |                                                                                                                                                                                                     |
| **attachment.type**                                 | Enum    | **Required.** The content type of the attachment: `QUERY` (Query), `RAW` (Raw data), or `DASHBOARD_SNAPSHOT` (Dashboard snapshot).                                                                                                                                                                                                                                                |                                                                                                                                                                                                     |
| **attachment.query**                                | String  | **Optional.** For `QUERY` type, the NRQL query statement.                                                                                                                                                                                                                                                                                                                         | `SELECT * FROM Log`                                                                                                                                                                                 |
| **attachment.accountIds**                           | List    | **Optional.** For `QUERY`, the New Relic account IDs to execute the query against. If not provided, uses the account associated with the workflow.                                                                                                                                                                                                                                | `[12345567]`                                                                                                                                                                                        |
| **attachment.format**                               | Enum    | **Optional.** For `QUERY`, the output format. Default: `JSON`.                                                                                                                                                                                                                                                                                                                    | `JSON` `CSV` `PSV` `TSV`                                                                                                                                                                            |
| **attachment.content**                              | String  | **Optional.** For `RAW`, the attachment content in UTF-8.                                                                                                                                                                                                                                                                                                                         | `A,B,C\n1,2,3`                                                                                                                                                                                      |
| **attachment.filename**                             | String  | **Optional.** A filename for the attachment. If omitted, a name is generated automatically.                                                                                                                                                                                                                                                                                       | `log_count.csv`                                                                                                                                                                                     |
| **attachment.dashboardGuid**                        | String  | **Required (for `DASHBOARD_SNAPSHOT`).** The GUID of the dashboard to snapshot. Toggle **JQ input** to provide a dynamic expression.                                                                                                                                                                                                                                              | `YOUR_DASHBOARD_GUID`                                                                                                                                                                               |
| **attachment.dashboardParams**                      | Object  | **Optional (for `DASHBOARD_SNAPSHOT`).** Snapshot configuration options. Omit to use all dashboard defaults.                                                                                                                                                                                                                                                                      |                                                                                                                                                                                                     |
| **attachment.dashboardParams.format**               | Enum    | **Optional.** File format of the snapshot.                                                                                                                                                                                                                                                                                                                                        | `PDF` `PNG`                                                                                                                                                                                         |
| **attachment.dashboardParams.display**              | Object  | **Optional.** Dimensions of the snapshot image.                                                                                                                                                                                                                                                                                                                                   |                                                                                                                                                                                                     |
| **attachment.dashboardParams.display.width**        | Integer | **Optional.** Width in pixels. Min: `10`, max: `2000`.                                                                                                                                                                                                                                                                                                                            | `1920`                                                                                                                                                                                              |
| **attachment.dashboardParams.display.height**       | Integer | **Optional.** Height in pixels. Min: `10`, max: `2000`.                                                                                                                                                                                                                                                                                                                           | `1080`                                                                                                                                                                                              |
| **attachment.dashboardParams.variables**            | List    | **Optional.** Template variable overrides. Each entry requires `name` and a `values` list. Only variables already defined on the dashboard are valid — passing an undefined variable name causes the workflow to fail.                                                                                                                                                            |                                                                                                                                                                                                     |
| **attachment.dashboardParams.timeWindow**           | Object  | **Optional.** Time window for the snapshot. Omit entirely to use the dashboard's saved time window. Provide either `duration` (relative) or `beginTime` and `endTime` (absolute range) — not both.                                                                                                                                                                                |                                                                                                                                                                                                     |
| **attachment.dashboardParams.timeWindow.duration**  | Integer | **Optional.** Relative time window in milliseconds.                                                                                                                                                                                                                                                                                                                               | `1800000` (30 minutes)                                                                                                                                                                              |
| **attachment.dashboardParams.timeWindow.beginTime** | Integer | **Optional.** Absolute start time in epoch milliseconds. Use with `endTime`.                                                                                                                                                                                                                                                                                                      | `1789452840316`                                                                                                                                                                                     |
| **attachment.dashboardParams.timeWindow.endTime**   | Integer | **Optional.** Absolute end time in epoch milliseconds. Use with `beginTime`.                                                                                                                                                                                                                                                                                                      | `1789454640316`                                                                                                                                                                                     |
| **attachment.dashboardParams.entityFilter**         | String  | **Optional.** Filters dashboard data by entity. Provide the filter expression without the `WHERE` keyword.                                                                                                                                                                                                                                                                        | `appName = 'Production'`                                                                                                                                                                            |
| **selectors**                                       | List    | **Optional.** Selectors to extract specific fields from the output.                                                                                                                                                                                                                                                                                                               | `[{\"name\": \"success\", \"expression\": \".success\"},{\"name\": \"attachments\", \"expression\": \".response.attachments\"},{\"name\": \"sessionId\", \"expression\": \".response.sessionId\"}]` |

### Outputs

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

| Output         | Type    | Example                                                                             |
| -------------- | ------- | ----------------------------------------------------------------------------------- |
| `success`      | Boolean | `true/false`                                                                        |
| `sessionId`    | String  | `"sessionId": "7fa97f26-3791-492e-a39b-53793163dfb9"`                               |
| `errorMessage` | String  | `Channel is a required field in the notification send"`                             |
| `attachments`  | List    | ```yaml [{   "blobId": "43werdtfgvhiu7y8t6r5e4398yutfgvh",   "rowCount": 100 }] ``` |

### Example

| Workflow example: QUERY attachment                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: email_testing_with_attachment description: Workflow to test sending an email notification via NewRelic with log step workflowInputs:   destinationId:     type: String steps:   - name: sendEmailNotification     type: action     action: newrelic.notification.sendEmail     version: 1     inputs:       destinationId: ${{ .workflowInputs.destinationId }}       subject: "workflow notification"       message: "Workflow Email Notification Testing from local"       attachments:         - type: QUERY           query: "SELECT * FROM Log"           format: JSON           filename: "log_count.json"       selectors:         - name: success           expression: '.success'         - name: sessionId           expression: '.response.sessionId'         - name: attachments           expression: '.response.attachments'   - name: logOutput     type: action     action: newrelic.ingest.sendLogs     version: '1'     inputs:       logs:         - message: "Hello from cap check Testing staging server user2 : ${{ .steps.sendEmailNotification.outputs.result.attachments }}" ``` |

| Workflow example: Dashboard snapshot attachment                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: email_with_dashboard_snapshot description: Workflow to send an email with a dashboard snapshot as a PDF attachment workflowInputs:   destinationId:     type: String steps:   - name: sendDashboardSnapshot     type: action     action: newrelic.notification.sendEmail     version: 1     inputs:       destinationId: ${{ .workflowInputs.destinationId }}       subject: "Daily Dashboard Report"       message: "Please find today's dashboard snapshot attached."       attachments:         - type: DASHBOARD_SNAPSHOT           filename: "daily-report.pdf"           dashboardGuid: "YOUR_DASHBOARD_GUID"           dashboardParams:             format: PDF             display:               width: 1920               height: 1080             variables:               - name: env                 values:                   - production                   - staging             timeWindow:               duration: 86400000       selectors:         - name: success           expression: '.success'         - name: sessionId           expression: '.response.sessionId'         - name: attachments           expression: '.response.attachments' ``` |

## Send a Slack message

Sends a Slack message to a channel, integrated with destinations. The action identifier is `newrelic.notification.sendSlack`.

### Inputs

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

| Input             | Type   | Description                                                                                                                                                                                                                                                                                                                                                                       | Example                                                                             |
| ----------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| **destinationId** | String | **Required.** DestinationId associated with the New Relic destination. See [NerdGraph tutorial: Alerts destinations](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-destinations/) to configure a destination and retrieve its ID, and [Destinations](https://docs.newrelic.com/docs/alerts/get-notified/destinations/) for more information. | `123e4567-e89b-12d3-a456-426614174000`                                              |
| **text**          | String | **Optional.** Text message to send. Provide either `text` or `blocks`, but not both.                                                                                                                                                                                                                                                                                              | `Hello from Workflow Automation`                                                    |
| **blocks**        | List   | **Optional.** JSON array of Slack Block Kit elements. See [Supported block types](#newrelic-notification-sendslack-block-types). Provide either `text` or `blocks`, but not both.                                                                                                                                                                                                 | `[{"type":"section","text":{"type":"mrkdwn","text":"*Hello*"}},{"type":"divider"}]` |
| **channel**       | String | **Required.** Channel name to send the message to.                                                                                                                                                                                                                                                                                                                                | `help-nomad`                                                                        |
| **threadTs**      | String | **Optional.** Timestamp of the parent message, used to post a reply in a thread.                                                                                                                                                                                                                                                                                                  | `1770206770.789949`                                                                 |
| **selectors**     | List   | **Optional.** Selectors to extract specific fields from the output.                                                                                                                                                                                                                                                                                                               | `[{\"name\": \"success\", \"expression\": \".success\"}]`                           |

Supported block types

The sendSlack action supports only two block types and rejects any others during validation.

| Block type | Description                                                                                                                                               | Allowed keys   | Example                                                                        |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------------------------------------------------------------------------ |
| `section`  | This is the only block type that renders text. The `text` object's `type` must be either `mrkdwn` or `plain_text`, and `text` must be a non-blank string. | `type`, `text` | `{"type":"section","text":{"type":"mrkdwn","text":"*Service:* checkout-api"}}` |
| `divider`  | Renders a visual horizontal line.                                                                                                                         | `type`         | `{"type":"divider"}`                                                           |

For more information, see the [Slack Block Kit reference](https://api.slack.com/block-kit) and the [Slack Block Kit Builder](https://app.slack.com/block-kit-builder).

### Outputs

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

| Output         | Type    | Example                                                 |
| -------------- | ------- | ------------------------------------------------------- |
| `success`      | Boolean | `true/false`                                            |
| `sessionId`    | String  | `"sessionId": "7fa97f26-3791-492e-a39b-53793163dfb9"`   |
| `errorMessage` | String  | `Channel is a required field in the notification send"` |

### Example

| Workflow example with a text message                                                                                                                                                                                                                                                                                                                                                                                        |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: slack_notification_workflow description: This is a test workflow to test slack notification send action steps:   - name: SendMessageUsingSlackChannel     type: action     action: newrelic.notification.sendSlack     version: 1     inputs:       destinationId: xxxx-ed6f-xxxx-bc7d-b7ea982xxxx       text: Hi , Testing notifcation api using slack channel name       channel: test-channel-workflow ``` |

| Workflow example using blocks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ```yaml name: slack_notification_workflow description: This is a test workflow to test slack notification send action steps:   - name: sendSlackBlocks     type: action     action: newrelic.notification.sendSlack     version: '1'     inputs:       destinationId: xxxx-ed6f-xxxx-bc7d-b7ea982xxxx       channel: test-channel-workflow       blocks:       - type: section         text:           type: mrkdwn           text: "Investigation complete"       - type: divider       - type: section         text:           type: plain_text           text: "All systems normal" ``` |

## Run a workflow

Runs a workflow through the NerdGraph API. The action identifier is `newrelic.workflowAutomation.startWorkflowRun`.

### Inputs

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

| Input                   | Type   | Description                                                                                                                    | Example                                |
| ----------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------- |
| **definitionName**      | String | **Required.** Name of the workflow definition.                                                                                 |                                        |
| **definitionScopeType** | String | **Optional.** Scope type of the workflow definition. Must be either `ACCOUNT` or `ORGANIZATION`.                               |                                        |
| **definitionVersion**   | Int    | **Optional.** Version of the workflow definition.                                                                              |                                        |
| **idempotencyKey**      | String | **Optional.** A valid UUID to ensure idempotency of the request. The server validates this format and rejects non-UUID values. | `f47ac10b-58cc-4372-a567-0e02b2c3d479` |
| **workflowInputs**      | List   | **Optional.** Key-value pairs to pass as inputs to the workflow definition.                                                    |                                        |
| **runScopeType**        | String | **Required.** Scope type for the run. Must be `ACCOUNT`.                                                                       | `ACCOUNT`                              |
| **runScopeId**          | String | **Required.** Account ID for the run scope.                                                                                    | `12345678`                             |
| **selectors**           | List   | **Optional.** Selectors to extract specific fields from the output.                                                            |                                        |

#### Example

```yaml
steps:
  - name: startHealthyHeartbeat
    type: action
    action: newrelic.workflowAutomation.startWorkflowRun
    version: 1
    inputs:
      definitionName: "heartbeat_newrelicIngestSendEvents_10062025"
      definitionVersion: 1
      scopeType: "ACCOUNT"
      definitionScopeType: "d34568b7-ee0b-4191-b663-7b2925b0de5b"
      workflowInputs:
        - key: "cellName"
          value: "stg-joint-effort"
      runScopeType: "ACCOUNT"
      runScopeId: "11544325"
```

### Outputs

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

| Output           | Type    | Example                                   |
| ---------------- | ------- | ----------------------------------------- |
| **runId**        |         | Unique identifier for the workflow run.   |
| **success**      | Boolean | `true/false`                              |
| **errorMessage** | String  | Error message if the run failed to start. |

### Example

| Workflow example                                                                    |
| ----------------------------------------------------------------------------------- |
| ```json {   "success": true   "runId": "00dc031f-c1cc-4d26-a3fb-6153c553c66b" } ``` |

## Create a signal URL

Generates a URL to send to a user via Microsoft Teams, Slack, or email so they can send a signal to a running workflow. This action powers the [human-in-the-loop pattern](https://docs.newrelic.com/docs/workflow-automation/workflow-examples/advanced/human-in-the-loop), where a workflow pauses at a wait step until a person clicks the URL to approve, deny, or otherwise route the run.

> #### ⚠️ IMPORTANT
>
> This action provides no benefit on its own. Always use this action with:
>
> -   A **notification action** (`newrelic.notification.*` or `slack.chat.postMessage`) that delivers the generated URL to a person.
> -   A **wait step** that defines at least one signal for the workflow run to wait on.
>
>     The `waitStepName` you provide as input must match the name of a valid wait step in the same workflow definition, and that wait step must contain at least one signal. Otherwise the workflow definition fails validation when you create it.

### Inputs

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

| Input          | Type   | Description                                                                                                                                                                                                                                        | Example                                           |
| -------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| `waitStepName` | String | **Required.** The name of the wait step in the workflow that contains the signals the run waits for. Must match a valid wait step name in the workflow definition, and that step must contain at least one signal. Maximum length: 100 characters. | `waitForApproval`                                 |
| `selectors`    | List   | **Optional.** Selectors to extract specific fields from the output.                                                                                                                                                                                | `[{\"name\": \"url\", \"expression\": \".url\"}]` |

### Outputs

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

| Output         | Type    | Example                                                                      |
| -------------- | ------- | ---------------------------------------------------------------------------- |
| `url`          | String  | `https://one.newrelic.com/launcher/workflow-automation.launcher?pane={pane}` |
| `success`      | Boolean | `true | false`                                                               |
| `errorMessage` | String  | `Unable to create signal URL`                                                |

### Example

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: humanInTheLoopDemo steps:   - name: createApprovalUrls     type: action     action: newrelic.notification.createSignalUrl     version: 1     inputs:       waitStepName: waitForApproval   - name: newrelicNotificationMsTeam     type: action     action: newrelic.notification.sendMicrosoftTeams     version: 1     inputs:       destinationId: acc24dc2-d4fc-4eba-a7b4-b3ad0170f8aa       channel: "dev-channel"       teamName: "dev-team"       message: "To approve continue at: ${{ .steps.createApprovalUrls.outputs.url }}"   - name: waitForApproval     type: wait     seconds: 3900 # 1 hour 5 minutes     signals:       - name: "approve"         next: logApproval       - name: "deny"         next: logDenial     next: handleTimeout ``` |
