• /
  • EnglishEspañolFrançais日本語한국어Português
  • ログイン今すぐ開始

Send a notification

|View as Markdown (English)

The action identifier is newrelic.notification.send.

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 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 to configure a destination and retrieve its ID, and 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"}]

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

[{
"blobId": "43werdtfgvhiu7y8t6r5e4398yutfgvh",
"rowCount": 100
}]

重要

This action doesn't support attachments when sending to a Slack destination.

Workflow example: Slack

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

Workflow example: Email

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'
Copyright © 2026 New Relic株式会社。

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.