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",
},
],
});

delivery

object[] Required

List of intended recipients for the notification

message

string Required

Body text of the notification

title

string Optional

Title text identifying the notification. This will be included in the subject for email notifications.

Returns

null

Did this section clearly explain what you wanted to learn?