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

# notifications

# `prefect.blocks.notifications`

## Classes

### `AbstractAppriseNotificationBlock` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L25](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L25)</sup>

An abstract class for sending notifications using Apprise.

**Methods:**

#### `anotify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L55](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L55)</sup>

```python theme={null}
anotify(self, body: str, subject: str | None = None) -> None
```

#### `block_initialization` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L52](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L52)</sup>

```python theme={null}
block_initialization(self) -> None
```

#### `logger` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/abstract.py#L89](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/abstract.py#L89)</sup>

```python theme={null}
logger(self) -> LoggerOrAdapter
```

Returns a logger based on whether the NotificationBlock
is called from within a flow or task run context.
If a run context is present, the logger property returns a run logger.
Else, it returns a default logger labeled with the class's name.

**Returns:**

* The run logger or a default logger with the class's name.

#### `notify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L78](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L78)</sup>

```python theme={null}
notify(self, body: str, subject: str | None = None) -> None
```

#### `notify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/abstract.py#L105](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/abstract.py#L105)</sup>

```python theme={null}
notify(self, body: str, subject: str | None = None) -> None
```

Send a notification.

**Args:**

* `body`: The body of the notification.
* `subject`: The subject of the notification.

#### `raise_on_failure` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/abstract.py#L117](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/abstract.py#L117)</sup>

```python theme={null}
raise_on_failure(self) -> Generator[None, None, None]
```

Context manager that, while active, causes the block to raise errors if it
encounters a failure sending notifications.

### `AppriseNotificationBlock` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L101](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L101)</sup>

A base class for sending notifications using Apprise, through webhook URLs.

**Methods:**

#### `anotify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L120](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L120)</sup>

```python theme={null}
anotify(self, body: str, subject: str | None = None) -> None
```

#### `anotify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L55](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L55)</sup>

```python theme={null}
anotify(self, body: str, subject: str | None = None) -> None
```

#### `block_initialization` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L52](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L52)</sup>

```python theme={null}
block_initialization(self) -> None
```

#### `notify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L136](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L136)</sup>

```python theme={null}
notify(self, body: str, subject: str | None = None) -> None
```

#### `notify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L78](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L78)</sup>

```python theme={null}
notify(self, body: str, subject: str | None = None) -> None
```

### `SlackWebhook` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L154](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L154)</sup>

Enables sending notifications via a provided Slack webhook.

Supports both standard Slack webhooks (hooks.slack.com) and Slack GovCloud
webhooks (hooks.slack-gov.com).

**Examples:**

Load a saved Slack webhook and send a message:

```python theme={null}
from prefect.blocks.notifications import SlackWebhook

slack_webhook_block = SlackWebhook.load("BLOCK_NAME")
slack_webhook_block.notify("Hello from Prefect!")
```

**Methods:**

#### `anotify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L120](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L120)</sup>

```python theme={null}
anotify(self, body: str, subject: str | None = None) -> None
```

#### `block_initialization` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L194](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L194)</sup>

```python theme={null}
block_initialization(self) -> None
```

Initialize the Slack webhook client.

This method handles both standard Slack webhooks and Slack GovCloud webhooks.
Apprise's built-in Slack plugin only supports hooks.slack.com, so we need to
manually construct the NotifySlack instance for slack-gov.com URLs to ensure
notifications are sent to the correct host.

See: [https://github.com/caronc/apprise/issues/XXXX](https://github.com/caronc/apprise/issues/XXXX) (upstream issue)

#### `notify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L136](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L136)</sup>

```python theme={null}
notify(self, body: str, subject: str | None = None) -> None
```

### `MicrosoftTeamsWebhook` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L254](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L254)</sup>

Enables sending notifications via a provided Microsoft Teams webhook.

**Examples:**

Load a saved Teams webhook and send a message:

```python theme={null}
from prefect.blocks.notifications import MicrosoftTeamsWebhook
teams_webhook_block = MicrosoftTeamsWebhook.load("BLOCK_NAME")
teams_webhook_block.notify("Hello from Prefect!")
```

**Methods:**

#### `anotify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L120](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L120)</sup>

```python theme={null}
anotify(self, body: str, subject: str | None = None) -> None
```

#### `block_initialization` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L295](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L295)</sup>

```python theme={null}
block_initialization(self) -> None
```

see [https://github.com/caronc/apprise/pull/1172](https://github.com/caronc/apprise/pull/1172)

#### `notify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L136](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L136)</sup>

```python theme={null}
notify(self, body: str, subject: str | None = None) -> None
```

### `PagerDutyWebHook` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L312](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L312)</sup>

Enables sending notifications via a provided PagerDuty webhook.
See [Apprise notify\_pagerduty docs](https://github.com/caronc/apprise/wiki/Notify_pagerduty)
for more info on formatting the URL.

**Examples:**

Load a saved PagerDuty webhook and send a message:

```python theme={null}
from prefect.blocks.notifications import PagerDutyWebHook
pagerduty_webhook_block = PagerDutyWebHook.load("BLOCK_NAME")
pagerduty_webhook_block.notify("Hello from Prefect!")
```

**Methods:**

#### `anotify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L429](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L429)</sup>

```python theme={null}
anotify(self, body: str, subject: str | None = None) -> None
```

Apprise will combine subject and body by default, so we need to move
the body into the custom\_details field. custom\_details is part of the
webhook url, so we need to update the url and restart the client.

#### `anotify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L55](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L55)</sup>

```python theme={null}
anotify(self, body: str, subject: str | None = None) -> None
```

#### `block_initialization` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L403](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L403)</sup>

```python theme={null}
block_initialization(self) -> None
```

#### `block_initialization` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L52](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L52)</sup>

```python theme={null}
block_initialization(self) -> None
```

#### `notify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L450](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L450)</sup>

```python theme={null}
notify(self, body: str, subject: str | None = None) -> None
```

Apprise will combine subject and body by default, so we need to move
the body into the custom\_details field. custom\_details is part of the
webhook url, so we need to update the url and restart the client.

#### `notify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L78](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L78)</sup>

```python theme={null}
notify(self, body: str, subject: str | None = None) -> None
```

### `TwilioSMS` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L471](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L471)</sup>

Enables sending notifications via Twilio SMS.
Find more on sending Twilio SMS messages in the [docs](https://www.twilio.com/docs/sms).

**Examples:**

Load a saved `TwilioSMS` block and send a message:

```python theme={null}
from prefect.blocks.notifications import TwilioSMS
twilio_webhook_block = TwilioSMS.load("BLOCK_NAME")
twilio_webhook_block.notify("Hello from Prefect!")
```

**Methods:**

#### `anotify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L55](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L55)</sup>

```python theme={null}
anotify(self, body: str, subject: str | None = None) -> None
```

#### `block_initialization` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L522](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L522)</sup>

```python theme={null}
block_initialization(self) -> None
```

#### `block_initialization` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L52](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L52)</sup>

```python theme={null}
block_initialization(self) -> None
```

#### `notify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L78](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L78)</sup>

```python theme={null}
notify(self, body: str, subject: str | None = None) -> None
```

### `OpsgenieWebhook` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L543](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L543)</sup>

Enables sending notifications via a provided Opsgenie webhook.
See [Apprise notify\_opsgenie docs](https://github.com/caronc/apprise/wiki/Notify_opsgenie)
for more info on formatting the URL.

**Examples:**

Load a saved Opsgenie webhook and send a message:

```python theme={null}
from prefect.blocks.notifications import OpsgenieWebhook
opsgenie_webhook_block = OpsgenieWebhook.load("BLOCK_NAME")
opsgenie_webhook_block.notify("Hello from Prefect!")
```

**Methods:**

#### `anotify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L55](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L55)</sup>

```python theme={null}
anotify(self, body: str, subject: str | None = None) -> None
```

#### `block_initialization` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L631](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L631)</sup>

```python theme={null}
block_initialization(self) -> None
```

#### `block_initialization` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L52](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L52)</sup>

```python theme={null}
block_initialization(self) -> None
```

#### `notify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L78](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L78)</sup>

```python theme={null}
notify(self, body: str, subject: str | None = None) -> None
```

### `MattermostWebhook` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L667](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L667)</sup>

Enables sending notifications via a provided Mattermost webhook.
See [Apprise notify\_Mattermost docs](https://github.com/caronc/apprise/wiki/Notify_Mattermost) # noqa

**Examples:**

Load a saved Mattermost webhook and send a message:

```python theme={null}
from prefect.blocks.notifications import MattermostWebhook

mattermost_webhook_block = MattermostWebhook.load("BLOCK_NAME")

mattermost_webhook_block.notify("Hello from Prefect!")
```

**Methods:**

#### `anotify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L55](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L55)</sup>

```python theme={null}
anotify(self, body: str, subject: str | None = None) -> None
```

#### `block_initialization` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L735](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L735)</sup>

```python theme={null}
block_initialization(self) -> None
```

#### `block_initialization` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L52](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L52)</sup>

```python theme={null}
block_initialization(self) -> None
```

#### `notify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L78](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L78)</sup>

```python theme={null}
notify(self, body: str, subject: str | None = None) -> None
```

### `DiscordWebhook` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L770](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L770)</sup>

Enables sending notifications via a provided Discord webhook.
See [Apprise notify\_Discord docs](https://github.com/caronc/apprise/wiki/Notify_Discord) # noqa

**Examples:**

Load a saved Discord webhook and send a message:

```python theme={null}
from prefect.blocks.notifications import DiscordWebhook

discord_webhook_block = DiscordWebhook.load("BLOCK_NAME")

discord_webhook_block.notify("Hello from Prefect!")
```

**Methods:**

#### `anotify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L55](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L55)</sup>

```python theme={null}
anotify(self, body: str, subject: str | None = None) -> None
```

#### `block_initialization` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L850](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L850)</sup>

```python theme={null}
block_initialization(self) -> None
```

#### `block_initialization` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L52](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L52)</sup>

```python theme={null}
block_initialization(self) -> None
```

#### `notify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L78](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L78)</sup>

```python theme={null}
notify(self, body: str, subject: str | None = None) -> None
```

### `CustomWebhookNotificationBlock` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L874](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L874)</sup>

Enables sending notifications via any custom webhook.

All nested string param contains `{{key}}` will be substituted with value from context/secrets.

Context values include: `subject`, `body` and `name`.

**Examples:**

Load a saved custom webhook and send a message:

```python theme={null}
from prefect.blocks.notifications import CustomWebhookNotificationBlock

custom_webhook_block = CustomWebhookNotificationBlock.load("BLOCK_NAME")

custom_webhook_block.notify("Hello from Prefect!")
```

**Methods:**

#### `anotify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L1007](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L1007)</sup>

```python theme={null}
anotify(self, body: str, subject: str | None = None) -> None
```

#### `block_initialization` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L989](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L989)</sup>

```python theme={null}
block_initialization(self) -> None
```

#### `logger` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/abstract.py#L89](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/abstract.py#L89)</sup>

```python theme={null}
logger(self) -> LoggerOrAdapter
```

Returns a logger based on whether the NotificationBlock
is called from within a flow or task run context.
If a run context is present, the logger property returns a run logger.
Else, it returns a default logger labeled with the class's name.

**Returns:**

* The run logger or a default logger with the class's name.

#### `notify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L1027](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L1027)</sup>

```python theme={null}
notify(self, body: str, subject: str | None = None) -> None
```

#### `notify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/abstract.py#L105](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/abstract.py#L105)</sup>

```python theme={null}
notify(self, body: str, subject: str | None = None) -> None
```

Send a notification.

**Args:**

* `body`: The body of the notification.
* `subject`: The subject of the notification.

#### `raise_on_failure` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/abstract.py#L117](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/abstract.py#L117)</sup>

```python theme={null}
raise_on_failure(self) -> Generator[None, None, None]
```

Context manager that, while active, causes the block to raise errors if it
encounters a failure sending notifications.

### `SendgridEmail` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L1045](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L1045)</sup>

Enables sending notifications via any sendgrid account.
See [Apprise Notify\_sendgrid docs](https://github.com/caronc/apprise/wiki/Notify_Sendgrid)

**Examples:**

Load a saved Sendgrid and send a email message:

```python theme={null}
from prefect.blocks.notifications import SendgridEmail

sendgrid_block = SendgridEmail.load("BLOCK_NAME")

sendgrid_block.notify("Hello from Prefect!")
```

**Methods:**

#### `anotify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L1122](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L1122)</sup>

```python theme={null}
anotify(self, body: str, subject: str | None = None) -> None
```

#### `anotify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L55](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L55)</sup>

```python theme={null}
anotify(self, body: str, subject: str | None = None) -> None
```

#### `block_initialization` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L1090](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L1090)</sup>

```python theme={null}
block_initialization(self) -> None
```

#### `block_initialization` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L52](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L52)</sup>

```python theme={null}
block_initialization(self) -> None
```

#### `notify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L1131](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L1131)</sup>

```python theme={null}
notify(self, body: str, subject: str | None = None) -> None
```

#### `notify` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L78](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/blocks/notifications.py#L78)</sup>

```python theme={null}
notify(self, body: str, subject: str | None = None) -> None
```
