• /
  • EnglishEspañolFrançais日本語한국어Português
  • Se connecterDémarrer

Passing data between steps

Reference outputs from previous steps using template syntax to chain actions and build complex automation.

Requirements:

  • New Relic account with appropriate permissions
  • Slack workspace with appropriate permissions
  • Slack bot token configured as a secret in workflow automation
  • Access to Slack channels where messages will be sent

Basic data passing

Query alert issues from New Relic and send notifications to Slack for each active issue.

What this workflow does:

  • Execute NerdGraph query to retrieve active alert issues

  • Loop through each alert issue

  • Send Slack notification for each issue with issue details

    name: alertSlack
    description: "query Alert Issues and send notifications to Slack"
    workflowInputs:
    accountId:
    type: Int
    steps:
    - name: getAlert
    type: action
    action: newrelic.nerdgraph.execute
    version: 1
    inputs:
    graphql: |
    query GetAlertIssues($accountId: Int!) {
    actor {
    account(id: $accountId) {
    aiIssues {
    issues(filter: {states: ACTIVATED}) {
    issues {
    issueId
    priority
    state
    title
    }
    }
    }
    }
    }
    }
    variables:
    accountId: ${{ .workflowInputs.accountId }}
    - name: loopStep
    type: loop
    for:
    in: ${{ .steps.getAlert.outputs.data.actor.account.aiIssues.issues.issues }}
    steps:
    - name: sendToSlack
    type: action
    action: slack.chat.postMessage
    version: 1
    inputs:
    token: ${{ :secrets:your_slack_token }}
    channel: incident-channel
    text: >
    issueId: ${{ .steps.loopStep.loop.element.issueId }}
    priority: ${{ .steps.loopStep.loop.element.priority }}
    state: ${{ .steps.loopStep.loop.element.state }}
    title: ${{ .steps.loopStep.loop.element.title | tostring }}

Key actions: newrelic.nerdgraph.execute, slack.chat.postMessage

What's next

Droits d'auteur © 2026 New Relic Inc.

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