• /
  • EnglishEspañolFrançais日本語한국어Português
  • Inicia sesiónComenzar ahora

Send an email

|View as Markdown (English)

The action identifier is newrelic.notification.sendEmail.

Sends an email to New Relic email destinations, with or without attachments.

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

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

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

Workflow example: QUERY attachment

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

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'
Copyright © 2026 New Relic Inc.

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