Multi-Channel AlertsAI Workflow
Broadcast notifications across Slack, email, and mobile push from a single event bus. Add or remove channels without touching business logic.
Prerequisites
Environment variables
SLACK_BOT_TOKENRESEND_KEYFCM_KEYInstall
npx radzor@latest recipe add multi-channel-alertsAI Prompt
“Run `npx radzor@latest add event-bus slack-bot email-send push-notification` to install 4 Radzor components. Then read components/radzor/event-bus/radzor.manifest.json, components/radzor/slack-bot/radzor.manifest.json, components/radzor/email-send/radzor.manifest.json, components/radzor/push-notification/radzor.manifest.json and each component's llm/integration.md. Wire them together to broadcast notifications across Slack, email, and mobile push from a single event bus. Add or remove channels without touching business logic. Use the manifest's inputs (check envVar for required environment variables), outputs (check fields for object shapes), composability (check mapField for field extraction), and actions — don't invent custom interfaces.”
Paste this into Claude Code, Cursor, Windsurf, or any AI coding agent.
Pipeline
EventBus
Dispatches alert events to all channels
SlackBot
Posts alert to a Slack channel
EmailSend
Sends alert email to the team
PushNotification
Sends mobile push to on-call user
Scaffolded Code
// npx radzor@latest add event-bus slack-bot email-send push-notification
import { EventBus } from "./components/radzor/event-bus"
import { SlackBot } from "./components/radzor/slack-bot"
import { EmailSend } from "./components/radzor/email-send"
import { PushNotification } from "./components/radzor/push-notification"
const bus = new EventBus({ asyncHandlers: true })
const slack = new SlackBot({ botToken: process.env.SLACK_BOT_TOKEN! })
const mail = new EmailSend({ provider: "resend", apiKey: process.env.RESEND_KEY!, from: "alerts@myapp.com" })
const push = new PushNotification({ provider: "fcm", fcmServerKey: process.env.FCM_KEY! })
// Subscribe each channel to the same "alert" event
bus.subscribe("alert", async (payload: { title: string; body: string; email: string; deviceToken: string }) => {
await slack.sendMessage("#ops-alerts", `🚨 ${payload.title}: ${payload.body}`)
})
bus.subscribe("alert", async (payload: { title: string; body: string; email: string; deviceToken: string }) => {
await mail.send({ to: payload.email, subject: payload.title, html: `<p>${payload.body}</p>` })
})
bus.subscribe("alert", async (payload: { title: string; body: string; email: string; deviceToken: string }) => {
await push.sendToDevice(payload.deviceToken, { title: payload.title, body: payload.body })
})
// Fire from anywhere in your app
await bus.publish("alert", {
title: "CPU > 90%",
body: "Production server us-east-1 is overloaded.",
email: "oncall@myapp.com",
deviceToken: "fcm_device_token_xxx",
})Components used
LLM tip
Pass all 4 radzor.manifest.json files to your agent at once. It will read the outputs of each step and match them against the inputs of the next — wiring the full pipeline without any extra instructions.