> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/resilience-testing/shared-capabilities/integrations/cicd/pipeline-notifications.md).

# Integrate experiment pipeline with notifications

Guide to execute chaos experiment in a pipeline and receive notifications about experiment execution.

This tutorial describes how you can execute chaos experiment in a pipeline and integrate it with notifications and approvals.

## Why is a pipeline required in chaos experiment execution? <a href="#why-is-a-pipeline-required-in-chaos-experiment-execution" id="why-is-a-pipeline-required-in-chaos-experiment-execution"></a>

Let us take examples to understand the importance of executing chaos experiments as a pipeline.

* Suppose you want to execute two chaos faults in parallel in a chaos experiment, where both the faults are present in two different zones and clusters. HCE introduces a layer of orchestration at the pipeline level, that helps execute these faults within the chaos module by leveraging the pipelines.

In all, pipelines facilitate orchestrating chaos experiments across infrastructure (or host or cluster) within a project.

* Pipelines also facilitate **approvals** and **notifications**. Approval is a step introduced in the pipeline, that requires a person to approve the step in the pipeline before it is executed.

Go to [Approvals](https://developer.harness.io/harness-platform/use-harness-platform/approvals/approvals-tutorial) for more details.

* You can also configure pipelines to receive notifications about various steps that executed or failed in a pipeline. This helps you keep track of the experiment in real-time.

Go to [Notifications](https://developer.harness.io/harness-platform/use-harness-platform/notifications-alerts-and-banners/notifications/notifications-overview) for more details.

## Permissions required <a href="#permissions-required" id="permissions-required"></a>

To execute an experiment in a pipeline, your role must have the **Execute** permission on **Chaos Experiment** and the **Execute Chaos Experiment** permission on the target environment. Go to **Project Settings** > **Access Control** > **Roles** to add both permissions, or ask your project admin to assign you a role that includes them. Go to [RBAC](https://developer.harness.io/resilience-testing/shared-capabilities/rbac.md#environment-permission-required-to-run-experiments) to review the permissions.

{% hint style="warning" %}
**EXECUTE VIA PIPELINE PERMISSION REMOVED**

The **Execute via Pipeline** permission is deprecated and removed. Pipeline-based experiment execution now uses the **Execute** permission on **Chaos Experiment**.
{% endhint %}

## Integrate experiment pipeline with notification <a href="#integrate-experiment-pipeline-with-notification" id="integrate-experiment-pipeline-with-notification"></a>

You can create a chaos experiment (on **Kubernetes dedicated infrastructure**, **Harness Delegate**, **Linux**, or **Windows infrastructure**) as a pipeline and integrate it to receive notifications about the status of the experiment. Go to [create experiment](https://developer.harness.io/resilience-testing/chaos-testing/experiments.md) to create a chaos experiment as a pipeline.

Go to [Pipeline concepts](https://developer.harness.io/continuous-integration/new-to-harness-ci/key-concepts) and [Pipeline Modeling Overview](https://developer.harness.io/continuous-delivery/troubleshooting-and-resources/resources/new-user/cd-pipeline-modeling-overview) for more details.

To integrate the pipeline to receive notifications, follow the steps below: Go to **Pipelines** and select the pipeline that you want to receive notifications about.

1. Click **Notify** to set up notifications.

   ![](https://3217710372-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRmV5EkLS9r45VPaoUnJZ%2Fuploads%2Fgit-blob-ab3ca13570e30c0381f36d4cc9151a6c56b40282%2Fnotify-1.png?alt=media)
2. Click **Notifications** to configure a notification for the pipeline. Provide a name for the notification and click **Continue**.

   ![](https://3217710372-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRmV5EkLS9r45VPaoUnJZ%2Fuploads%2Fgit-blob-58f7078f56df5f5f49acce01ae00a3e02f9d347e%2Fcreate-2.png?alt=media)
3. You can choose one of the notification methods. For example, Slack. Provide the relevant parameters, which in this case, is the **Slack Webhook URL**. Click **Finish**.

   ![](https://3217710372-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRmV5EkLS9r45VPaoUnJZ%2Fuploads%2Fgit-blob-51d3d3240accf51406f16d50df230af021f07f0c%2Fprovide-params-4.png?alt=media)

## Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

<details>

<summary>I cannot execute a chaos experiment in a pipeline</summary>

Your role must have the **Execute** permission on **Chaos Experiment** and the **Execute Chaos Experiment** permission on the target environment. The **Execute via Pipeline** permission is deprecated and removed, so enabling it no longer grants access. Go to [Permissions required](#permissions-required) to review the setting.

</details>

{% @harness-feedback/feedback %}
