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 | Required array of objects | List of intended recipients for the notification |
message | Required string | Body text of the notification |
title | Optional string | Title text identifying the notification. This will be included in the subject for email notifications. |
Returns: Null
Was this section useful?