Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/content/docs/alerts/get-notified/destinations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ The supported destination platforms include:
* AWS EventBridge: Available in [workflows](/docs/alerts-applied-intelligence/applied-intelligence/incident-workflows/incident-workflows/).
* PagerDuty: Available in [workflows](/docs/alerts-applied-intelligence/applied-intelligence/incident-workflows/incident-workflows/).
* New Relic Mobile Push: Available in [workflows](/docs/alerts-applied-intelligence/applied-intelligence/incident-workflows/incident-workflows/).
* Microsoft Teams: Available in [workflows](/docs/alerts/get-notified/microsoft-teams-integrations/).
* Microsoft Teams: Available in [workflows](/docs/alerts/get-notified/microsoft-teams-integrations/).
* **Workflow Automation**: Available in [workflows](/docs/alerts-applied-intelligence/applied-intelligence/incident-workflows/incident-workflows/). Triggers [automated incident response workflows](/docs/workflow-automation/setup-and-configuration/create-destinations#trigger-from-alerts) when alert conditions are breached.

For more on these and other destinations, see [notification integrations](/docs/alerts-applied-intelligence/notifications/notification-integrations).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ When templates don't fit your needs, [Create Your Own](https://onenr.io/0OQM47Kg

This guide shows you how to build workflows using concepts and a complete example. Choose your learning path:

- **Learn core concepts first** Read [Core concepts](#core-concepts) and [Workflow patterns](#workflow-patterns) to understand the fundamentals, then apply them
- **Follow the example** Jump to [Example walkthrough](#example-walkthrough) to build an EC2 auto-resize workflow step-by-step
- **Reference patterns** Use the [Workflow patterns](#workflow-patterns) section as a quick reference when building your own workflows
- **Learn core concepts first**: Read [Core concepts](#core-concepts) and [Workflow patterns](#workflow-patterns) to understand the fundamentals, then apply them
- **Follow the example**: Jump to [Example walkthrough](#example-walkthrough) to build an EC2 auto-resize workflow step-by-step
- **Reference patterns**: Use the [Workflow patterns](#workflow-patterns) section as a quick reference when building your own workflows

<Callout variant="tip">
**New to workflows?** Start with core concepts, then follow the example. The EC2 workflow demonstrates all key patterns in a real-world scenario.
Expand Down Expand Up @@ -116,7 +116,7 @@ Understand these fundamentals before you build:

<tr>
<td>
Loops
[Loops](/docs/workflow-automation/workflow-examples#loop-structure)
</td>

<td>
Expand All @@ -134,7 +134,7 @@ Understand these fundamentals before you build:
</td>

<td>
Mandatory field for loop functions to define iteration count
Required parameter for loop functions to define iteration count
</td>

<td>
Expand Down Expand Up @@ -183,7 +183,7 @@ For detailed error handling patterns, see [Best practices](/docs/workflow-automa
Build your first workflow in five steps:

1. Navigate to **[one.newrelic.com](https://one.newrelic.com) > All Capabilities > Workflow Automation** and select **[Create Your Own](https://onenr.io/0OQM47KgxjG)**
2. Define parameters for credentials (from secrets manager: `${{ :secrets:keyName }}`), configuration (regions, instance types), and runtime data (account IDs, alert IDs)
2. Define parameters for credentials (from [secrets manager](/docs/workflow-automation/limitations-and-faq/workflow-best-practices/#secure-credentials): `${{ :secrets:keyName }}`), configuration (regions, instance types), and runtime data (account IDs, alert IDs)
3. Drag actions from the [catalog](/docs/workflow-automation/setup-and-configuration/actions-catalog/actions-catalog), connect them with `${{ .steps.stepName.outputs.field }}` syntax to pass data
4. Insert switches for conditional branching, loops for processing lists or polling, approval gates for human decisions
5. Run after each section to catch errors early, then [start or schedule](/docs/workflow-automation/create-a-workflow-automation/start-schedule) your workflow
Expand Down Expand Up @@ -218,6 +218,8 @@ Four essential patterns handle most automation scenarios. Each pattern is demons

**Use loops when:** Processing multiple items or repeating actions

For detailed information about loop structure, parameters, and advanced usage (including break/continue), see [Loop structure](/docs/workflow-automation/workflow-examples#loop-structure).

**Key syntax:**
```yaml
# Send progress updates using range loop
Expand All @@ -242,7 +244,7 @@ Four essential patterns handle most automation scenarios. Each pattern is demons

### Approval gates and waiting

**Use approval gates when:** Human judgment needed before destructive operations or compliance sign-off required
**Use approval gates when:** Human judgment is needed before destructive operations or compliance sign-off is required

**Key syntax:**
```yaml
Expand Down Expand Up @@ -314,7 +316,7 @@ Before building this workflow, ensure you have:
- **AWS**: Credentials with EC2 and Systems Manager permissions
- **Slack**: Bot token and channel for notifications
- **New Relic**: Alert condition monitoring EC2 CPU
- **Secrets manager**: Configured (see [secrets management](/docs/infrastructure/host-integrations/installation/secrets-management/))
- **Secrets manager**: Configured (see [secrets manager](/docs/workflow-automation/limitations-and-faq/workflow-best-practices/#secure-credentials))

### Workflow overview [#workflow-overview]

Expand All @@ -332,10 +334,10 @@ This example demonstrates key patterns you'll use in custom workflows: querying
**Skip if you're reading for concepts.** This table details the 12 parameters this workflow uses. You can reference it when building, but it's not essential for understanding the flow.
</Callout>

This workflow requires credentials, configuration, and runtime context as inputs. Sensitive values come from secrets manager using `${{ :secrets:keyName }}` syntax.
This workflow requires credentials, configuration, and runtime context as inputs. Sensitive values come from [secrets manager](/docs/workflow-automation/limitations-and-faq/workflow-best-practices/#secure-credentials) using `${{ :secrets:keyName }}` syntax.

**Input categories:**
- **Authentication**: AWS and Slack credentials from secrets manager
- **Authentication**: AWS and Slack credentials from [secrets manager](/docs/workflow-automation/limitations-and-faq/workflow-best-practices/#secure-credentials)
- **Alert context**: Account ID and issue ID from New Relic
- **Configuration**: Region, instance type, timezone, Slack channel

Expand Down Expand Up @@ -370,7 +372,7 @@ This workflow requires credentials, configuration, and runtime context as inputs
`${{ :secrets:awsAccessKeyId }}`
</td>
<td>
AWS Access Key ID retrieved from secrets manager for authenticating with AWS services.
AWS Access Key ID retrieved from [secrets manager](/docs/workflow-automation/limitations-and-faq/workflow-best-practices/#secure-credentials) for authenticating with AWS services.
</td>
</tr>
<tr>
Expand All @@ -384,7 +386,7 @@ This workflow requires credentials, configuration, and runtime context as inputs
`${{ :secrets:awsSecretAccessKey }}`
</td>
<td>
AWS Secret Access Key retrieved from secrets manager. Pairs with the access key ID.
AWS Secret Access Key retrieved from [secrets manager](/docs/workflow-automation/limitations-and-faq/workflow-best-practices/#secure-credentials). Pairs with the access key ID.
</td>
</tr>
<tr>
Expand Down Expand Up @@ -606,7 +608,7 @@ Now let's build each part of the workflow. Each step includes the specific actio
The workflow resizes the instance through AWS Systems Manager (SSM):

* **`createSsmDocument`**: Creates an SSM Automation document that stops the instance, modifies type, and restarts it.
* **`generateIdempotencyToken`**: Creates a unique UUID. Prevents duplicate resizes if the workflow runs twice.
* **`generateIdempotencyToken`**: Creates a unique UUID to prevent duplicate resizes if the workflow runs twice.
* **`startResizing`**: Executes the SSM document with instance ID and new type.
* **`progressLoop` (Loop)**: Posts Slack updates every 10 seconds (5 times total).
* **`waitForCompletion`**: Polls SSM status with 2-minute timeout.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ freshnessValidatedDate: never
This feature is currently provided as part of a preview program pursuant to our [pre-release policies](/docs/licenses/license-information/referenced-policies/new-relic-pre-release-policy).
</Callout>

Once you've created a workflow, you can run it manually on demand or schedule it to run automatically at specific times. Both methods use the [NerdGraph API](/docs/apis/nerdgraph/get-started/nerdgraph-explorer) to trigger workflow execution.
Once you've created a workflow, you can trigger it in three ways: from alerts, manually on demand, or on a schedule.

## Choose your trigger method

Select the right approach for your use case:

| **Use on-demand** | **Use scheduled** |
|-------------------|-------------------|
| Testing new workflows | Regular health checks |
| Manual approval workflows | Periodic data processing |
| Alert-triggered responses | Daily/weekly reports |
| Ad-hoc maintenance tasks | Scheduled maintenance windows |
| One-time operations | Recurring backups or cleanups |
| **Trigger from alerts** | **Run on-demand** | **Run on schedule** |
|------------------------|-------------------|---------------------|
| Automated incident response | Testing new workflows | Regular health checks |
| Auto-remediation (resize EC2, rollback) | Manual operations | Periodic data processing |
| Enriched alert notifications | Ad-hoc maintenance | Daily/weekly reports |
| **Setup**: [Configure as alert destination](/docs/workflow-automation/setup-and-configuration/create-destinations#trigger-from-alerts) | **API**: [StartWorkflowRun](#on-demand) | **API**: [CreateSchedule](#scheduled) |

<Callout variant="tip">
**Alert-triggered workflows**: When alert conditions are breached, New Relic can automatically trigger workflows by configuring Workflow Automation as a destination. The `issueId` and `accountId` are passed automatically. See [Send notifications from workflows](/docs/workflow-automation/setup-and-configuration/create-destinations#trigger-from-alerts) for setup instructions.
</Callout>

## Before you begin

Expand All @@ -38,7 +41,7 @@ Before triggering workflows, ensure you have:
- **Account ID**: Your New Relic account ID (found in [Account settings](/docs/accounts/accounts-billing/account-structure/account-id)).
- **Workflow name**: The exact name from your workflow definition.
- **Required inputs**: Values for any parameters your workflow expects.
- **Secrets configured**: AWS credentials, Slack tokens, or other secrets stored in [secrets manager](/docs/infrastructure/host-integrations/installation/secrets-management/).
- **Secrets configured**: AWS credentials, Slack tokens, or other secrets stored in [secrets manager](/docs/workflow-automation/limitations-and-faq/workflow-best-practices/#secure-credentials).

<Callout variant="tip">
**New to workflows?** Create your first workflow before trying to trigger it. Start with [Use a template](/docs/workflow-automation/create-a-workflow-automation/use-a-template) for pre-built workflows.
Expand Down Expand Up @@ -95,9 +98,9 @@ The following workflow definition invokes an AWS Lambda function and logs the ou
- message: 'The lambda function message output is:${{ .steps.invoke1.outputs.payload.body }}'
```

To start this workflow, use the following NerdGraph mutation. Before running this mutation, ensure you've stored your AWS credentials using the `secretsManagementCreateSecret` mutation. For more information, see [Introduction to secrets management](/docs/apis/nerdgraph/examples/nerdgraph-secrets-management).
To start this workflow, use the following NerdGraph mutation. Before running this mutation, ensure you've stored your AWS credentials using the `secretsManagementCreateSecret` mutation. For more information, see [secrets manager](/docs/workflow-automation/limitations-and-faq/workflow-best-practices/#secure-credentials).

```graphql
```yaml
mutation {
workflowAutomationStartWorkflowRun(
# Specify the account where the workflow is defined
Expand Down Expand Up @@ -165,7 +168,7 @@ Schedules use cron expressions to define when workflows run. Format: `minute hou

The following example schedules the `lambda1` workflow to run every day at 9 AM Eastern Time:

```graphql
```yaml
mutation {
workflowAutomationCreateSchedule(
# Specify the account where the workflow is defined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ freshnessValidatedDate: never

Workflow Automation connects New Relic with your existing tools to automate incident response, infrastructure management, and operational tasks—without writing code. Build workflows that respond to alerts, integrate with AWS and Slack, manage approvals, and execute complex automation logic.

**Trigger workflows in three ways:**
- **From alerts**: Automatically start workflows when alert conditions are breached (see [Send notifications from workflows](/docs/workflow-automation/setup-and-configuration/create-destinations#trigger-from-alerts))
- **On demand**: Manually trigger workflows via API when needed
- **On schedule**: Run workflows automatically at specific times using cron expressions

<img
title="Create and manage workflows in New Relic"
alt="Screenshot showing the workflow automation interface"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Store all sensitive values in New Relic's secrets manager. Never hardcode creden

Store AWS credentials, API tokens, and passwords:

```graphql
```yaml
mutation {
secretsManagementCreateSecret(
scope: {type: ACCOUNT id: "YOUR_NR_ACCOUNT_ID"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,22 @@ freshnessValidatedDate: never
<td>50KB</td>
</tr>
<tr>
<td>No of Workflow definitions (Including all versions)</td>
<td>No of Workflow definitions at account level(excluding versions count)</td>
<td></td>
<td>1000</td>
</tr>
<tr>
<td>No of Workflow definitions at org level (including all versions)</td>
<td>No of Workflow definitions at org level (excluding versions count)</td>
<td></td>
<td>1000</td>
</tr>
<tr>
<td>No of versions per workflow definition at account level</td>
<td></td>
<td>1000</td>
</tr>
<tr>
<td>No of versions per workflow definition at org level</td>
<td></td>
<td>1000</td>
</tr>
Expand All @@ -67,7 +77,7 @@ freshnessValidatedDate: never
<tr>
<td>Length of a workflow input value</td>
<td></td>
<td>1000 characters</td>
<td>1000 Characters</td>
</tr>
<tr>
<td>Workflow concurrent runs (per account)</td>
Expand Down
Loading
Loading