Skip to main content

ctx.notify

Sends a custom notification to Interval users via email or Slack. To send Slack notifications, you'll need to connect your Slack workspace to the Interval app in your organization settings.

await ctx.notify({
message: "A charge of $500 was refunded",
title: "Refund over threshold",
delivery: [
{
to: "#interval-notifications",
method: "SLACK",
},
{
to: "foo@example.com",
},
],
});
deliveryRequired array of objectsList of intended recipients for the notification
messageRequired stringBody text of the notification
titleOptional stringTitle text identifying the notification. This will be included in the subject for email notifications.

Returns: Null

Was this section useful?