Skip to content

ctx.notify

Sends a notification via email or Slack. To send Slack notifications, refer to our guide

ts
await ctx.notify({
  message: `Customer ${name} signed up!`,
  title: "New Customer Alert! 🚨",
  delivery: [
    {
      to: "#forge-customer-notifications",
      method: "SLACK",
    },
    {
      to: "[email protected]",
    },
  ],
})
python
# the python SDK requires you to import ctx differently for pages vs actions
from forgeapp_sdk import ctx_var, action_ctx_var

# ctx = action_ctx_var.get() for actions
ctx = ctx_var.get()

await ctx.notify(
    message="Customer OpenAI signed up!",
    title="New Customer Alert! 🚨",
    delivery=[
        {
            "to": "#forge-customer-notifications",
            "method": "SLACK",
        },
        {
            "to": "[email protected]",
        },
    ],
)

example of context.notify