> ## Documentation Index
> Fetch the complete documentation index at: https://elementary-more-explicit-webhook-instructions.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Setup Slack Alerts

## Setup Slack Integration

<Info>
  **Before you start**

  Before you can start using the alerts, make sure to [install the dbt package](/oss/quickstart/quickstart-cli-package), [configure a profile and install the CLI](/oss/quickstart/quickstart-cli).
  This is **required for the alerts to work.**

  <br />
</Info>

<Snippet file="setup-slack-integration.mdx" />

## Execute the CLI

Make sure to run the following command after your dbt runs and tests:

```
edr monitor --slack-token <your_slack_token> --slack-channel-name <slack_channel_to_post_at> --group-by [table | alert]
```

Or just `edr monitor` if you used `config.yml`. Please note that when you specify the --slack-channel-name, it's the
default channel name to which all the alerts will be sent that are not attributed to any custom channel. Therefore,
if you execute several `edr monitor` commands at the same time with different `slack-channel-name` arguments, they can
be sent to the wrong one due to the overlap accessing the backend table of elementary. For avoiding this problem,
[the guide](/oss/guides/alerts/alerts-configuration#custom-channel) can be followed.

***

## Alert on source freshness failures

*Not supported in dbt cloud*

To alert on source freshness, you will need to run `edr run-operation upload-source-freshness` right after each execution of `dbt source freshness`.
This operation will upload the results to a table, and the execution of `edr monitor` will send the actual alert.

* Note that `dbt source freshness` and `upload-source-freshness` needs to run from the same machine.
* Note that `upload-source-freshness` requires passing `--project-dir` argument.

## Continuous alerting

In order to monitor continuously, use your orchestrator to execute it regularly (we recommend running it right after
your dbt job ends to monitor the latest data updates).

Read more about how to deploy [Elementary in production](/oss/deployment-and-configuration/elementary-in-production).
If you need help or wish to consult on this, reach out to us
on [Slack](https://elementary-data.com/community).
