> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kadoa.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Email

> Receive email notifications when workflow events occur

## Setup

<CodeGroup>
  ```typescript title="Node SDK" theme={null}
  import { KadoaClient } from "@kadoa/node-sdk";

  const client = new KadoaClient({ apiKey: "YOUR_API_KEY" });

  // Use your account email
  await client.notification.setupForWorkflow({
    workflowId: "YOUR_WORKFLOW_ID",
    events: ["workflow_finished", "workflow_failed"],
    channels: { EMAIL: true },
  });

  // Or specify custom recipients
  await client.notification.setupForWorkflow({
    workflowId: "YOUR_WORKFLOW_ID",
    events: ["workflow_data_change"],
    channels: {
      EMAIL: {
        name: "team-alerts",
        recipients: ["team@company.com", "alerts@company.com"],
      },
    },
  });
  ```

  ```python title="Python SDK" theme={null}
  from kadoa_sdk import KadoaClient, KadoaClientConfig
  from kadoa_sdk.notifications import SetupWorkflowNotificationSettingsRequest

  client = KadoaClient(KadoaClientConfig(api_key="YOUR_API_KEY"))

  # Use your account email
  client.notification.setup_for_workflow(
      SetupWorkflowNotificationSettingsRequest(
          workflow_id="YOUR_WORKFLOW_ID",
          events=["workflow_finished", "workflow_failed"],
          channels={"EMAIL": True},
      )
  )

  # Or specify custom recipients
  client.notification.setup_for_workflow(
      SetupWorkflowNotificationSettingsRequest(
          workflow_id="YOUR_WORKFLOW_ID",
          events=["workflow_data_change"],
          channels={
              "EMAIL": {
                  "name": "team-alerts",
                  "recipients": ["team@company.com", "alerts@company.com"],
              }
          },
      )
  )
  ```
</CodeGroup>

For API configuration, see the [API reference](/api-reference/notifications).

### Dashboard Setup

1. Go to **Notifications** in the sidebar
2. Click **Add Channel** → **Email**
3. Add a single or group of recipient email addresses
4. Save changes

<Tabs>
  <Tab title="Single recipient">
    <img src="https://mintcdn.com/kadoa/J2BP2lmQhWDWhIB8/images/notifications/emails/emails-ui.png?fit=max&auto=format&n=J2BP2lmQhWDWhIB8&q=85&s=cbc3e43b88a9e340b32aa57067322e25" alt="Email Channel UI" width="1016" height="626" data-path="images/notifications/emails/emails-ui.png" />
  </Tab>

  <Tab title="Group of recipients">
    <img src="https://mintcdn.com/kadoa/J2BP2lmQhWDWhIB8/images/notifications/emails/emails-ui-group.png?fit=max&auto=format&n=J2BP2lmQhWDWhIB8&q=85&s=cda7622628669bdd28eea2e1351ed4e9" alt="Email Channel Group UI" width="998" height="872" data-path="images/notifications/emails/emails-ui-group.png" />
  </Tab>
</Tabs>

## Email Templates

Each event type has a dedicated email template with relevant information.

<Tabs>
  <Tab title="workflow_data_change">
    <img src="https://mintcdn.com/kadoa/J2BP2lmQhWDWhIB8/images/notifications/emails/emails-data-change.png?fit=max&auto=format&n=J2BP2lmQhWDWhIB8&q=85&s=4e3ae6f8c1c23f968268059bd7b3e672" alt="Data change email" width="896" height="680" data-path="images/notifications/emails/emails-data-change.png" />
  </Tab>

  <Tab title="workflow_finished">
    <img src="https://mintcdn.com/kadoa/J2BP2lmQhWDWhIB8/images/notifications/emails/emails-finished.png?fit=max&auto=format&n=J2BP2lmQhWDWhIB8&q=85&s=0f66b43ae2c9f685412497934cc1dd04" alt="Workflow finished email" width="836" height="389" data-path="images/notifications/emails/emails-finished.png" />
  </Tab>

  <Tab title="workflow_failed">
    <img src="https://mintcdn.com/kadoa/J2BP2lmQhWDWhIB8/images/notifications/emails/emails-failed.png?fit=max&auto=format&n=J2BP2lmQhWDWhIB8&q=85&s=ef5dafc8b7353989720a1f7a570a78f8" alt="Workflow failed email" width="850" height="462" data-path="images/notifications/emails/emails-failed.png" />
  </Tab>

  <Tab title="workflow_validation_anomaly_change">
    <img src="https://mintcdn.com/kadoa/J2BP2lmQhWDWhIB8/images/notifications/emails/emails-data-quality.png?fit=max&auto=format&n=J2BP2lmQhWDWhIB8&q=85&s=4f8307176c67dc7d5c2cf1158343bcfe" alt="Validation anomaly email" width="816" height="808" data-path="images/notifications/emails/emails-data-quality.png" />
  </Tab>
</Tabs>

## System Emails

These emails are sent automatically and cannot be configured.

<Tabs>
  <Tab title="workflow_sample_finished">
    Sent to the workflow author when preview data is ready for review.

    <img src="https://mintcdn.com/kadoa/J2BP2lmQhWDWhIB8/images/notifications/emails/emails-sample-finished.png?fit=max&auto=format&n=J2BP2lmQhWDWhIB8&q=85&s=b2a0d276e207bb5dd4f5b8118884b88e" alt="Sample ready email" width="808" height="441" data-path="images/notifications/emails/emails-sample-finished.png" />
  </Tab>
</Tabs>
