Appearance
Lovable
Add multi-channel notifications to your Lovable app using Sendivent's API.
Overview
Lovable builds full-stack web apps from natural language prompts. This guide shows how to add notification support — email, SMS, Slack, push, and more — to apps built with Lovable.
Prerequisites
- A Sendivent account with an API key
- At least one event configured in your Sendivent dashboard
- A Lovable project connected to Supabase
Integration Steps
1. Add your API key to Supabase
In your Supabase dashboard, add SENDIVENT_API_KEY as a secret:
- Go to Project Settings → Edge Functions → Secrets
- Add a new secret:
SENDIVENT_API_KEY= yourlive_*ortest_*key
2. Prompt Lovable
Paste this prompt into Lovable's chat:
Add Sendivent notification support to this app. Create a Supabase Edge
Function that sends notifications via the Sendivent API.
API details:
- Endpoint: POST https://api.sendivent.com/v1/send/{event}
- Auth: Authorization: Bearer SENDIVENT_API_KEY (read from environment)
- Request body: { "to": "user@example.com", "payload": { ...dynamic data } }
- Response: { "id": "notification-uuid", "event": "welcome", "status": "accepted" }
The Edge Function should:
1. Read SENDIVENT_API_KEY from Deno.env
2. Accept event name, recipient, and payload as parameters
3. POST to the Sendivent API with Bearer token auth
4. Return the response to the client
To send to a specific channel, use: POST /v1/send/{event}/{channel}
Supported channels: email, sms, slack, push, telegram, whatsapp, discord3. Test the integration
- Trigger a notification flow in your app
- Check the Activity tab in your Sendivent dashboard to verify delivery
Using Templates
Your Sendivent events use Handlebars templates configured in the dashboard. Pass dynamic data via the payload field:
Update the Edge Function to send an order confirmation:
Event name: order.confirmed
Recipient: the user's email
Payload: { "orderNumber": order.id, "total": order.total, "items": order.items }The template is managed in the Sendivent dashboard — no HTML in your code.
Use Cases
- Contact forms — Send form submissions via email
- Signup flows — Welcome notifications on registration
- Order confirmations — Multi-channel order updates (email + SMS)
- Password resets — Secure reset links via email
- Team alerts — Slack notifications for admin events
Troubleshooting
Notifications not sending
- Verify
SENDIVENT_API_KEYis set in Supabase Edge Function secrets - Check the event exists in your Sendivent dashboard
- Use a
test_*key withapi-sandbox.sendivent.comfor development
401 Unauthorized
- Confirm the API key is correct and not expired
- Check the key prefix matches the API URL (
test_*→ sandbox,live_*→ production)
Next Steps
- MCP Server — Give Lovable's AI direct access to Sendivent tools
- Events — How events and channels work
- Templates — Template variables and rendering
- API Reference — Full endpoint docs