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

# Notifications

> Learn how to implement notifications from your workflows

`ctx.notify` allows you to send notifications from your Workflows. Currently supported channels are email and slack.

<Note>
  `ctx.notify` will *not* pause the workflow, if you would like to do so see [Human in the Loop](/pages/human-in-the-loop).

  The `notification` input defined here is the same as what is passed to `Interrupt.approval()`.
</Note>

## Usage

The following example shows how to send a notification from a workflow

### Email

<Note>Emails will be delivered from `no-reply@workflows.inferable.ai`</Note>

```typescript
deleteUserWorkflow.version(1).define(async (ctx, input) => {
  ctx.notify({
    message: "Hello from this workflow!",
    destination: {
      type: "email",
      // The email address to notify
      email: "test@example.com",
    },
  });
  //...
});
```

### Slack

If enabled, the [Slack integration](/pages/slack) can also be used to notify users / channels.

```typescript
deleteUserWorkflow.version(1).define(async (ctx, input) => {
  ctx.notify({
    message: "Hello from this workflow!",
    destination: {
      type: "slack",
      // The email address of the Slack user to notify
      email: "test@example.com",
      // Or Slack user ID
      userId: "U0123456789",
      // Or Slack channel ID
      channelId: "C0123456789",
    },
  });
  //...
});
```
