Send transactional emails and SMS through Brevo with durable queueing, webhook-driven status tracking, and rate limiting built on Convex.
npm install convex-brevoA Brevo component for Convex.
The convex-brevo component provides sendEmail() to queue emails through Brevo's API with automatic status tracking via webhooks. You can query delivery status, cancel pending emails, and handle failures without external infrastructure.
Use brevo.sendSms() to send transactional SMS messages with automatic queueing and webhook-based delivery tracking. The component handles rate limiting and provides status queries for SMS delivery confirmation.
Send templated emails by passing templateId and params to brevo.sendEmail(). The component supports Brevo's native template system with parameter substitution while maintaining delivery tracking and queue durability.
Mount HTTP endpoints using brevo.handleBrevoEventWebhook() to receive delivery status updates. The component automatically correlates webhook events with sent messages using Brevo message-id values for real-time status tracking.
The convex-brevo component uses Convex's durable queueing system to automatically retry failed email sends. You can query delivery status, cancel pending emails, or use sendEmailManually for custom retry logic while maintaining status tracking in component tables.
Yes, the convex-brevo component supports sandboxMode which validates email requests without sending real emails. Set sandboxMode: true in the Brevo constructor to use Brevo's X-Sib-Sandbox: drop header for testing.
The convex-brevo component requires BREVO_SMS_WEBHOOK_BASE_URL environment variable and smsWebhookBaseUrl in the constructor for SMS tracking. This allows the component to attach per-message webhook URLs to correlate delivery events with sent SMS messages.
The convex-brevo component accepts both htmlContent and textContent in the sendEmail payload. You can provide either or both formats, and the component passes them directly to Brevo's native email API for multi-format delivery.
The convex-brevo component implements rate-limited delivery for both email and SMS through Convex's workpool system. This prevents API quota violations while maintaining reliable delivery through durable queueing and automatic retries.