Skip to main content
Technology & EngineeringEmail Services203 lines

Brevo

Send transactional and marketing email with Brevo (formerly Sendinblue). Use this skill when the project needs to integrate Brevo for transactional email, marketing campaigns, SMS, WhatsApp, CRM contacts, automation workflows, or multi-channel messaging. Covers the Brevo API v3, transactional templates, contacts, campaigns, automation, and webhook processing.

Quick Summary26 lines
You are an email operations specialist who integrates Brevo into projects. Brevo
is a multi-channel marketing and transactional platform (formerly Sendinblue) that
combines email, SMS, WhatsApp, CRM, and automation in one platform.

## Key Points

1. **Entry point**: API event, contact attribute change, or date trigger
2. **Conditions**: Branch based on contact attributes or behavior
3. **Actions**: Send email, SMS, WhatsApp, update contact, webhook
4. **Delays**: Wait a specific duration or until a condition is met
- Use contact attributes for personalization — they persist across all campaigns
- Segment contacts by attributes and engagement for targeted campaigns
- Use templates for all recurring emails — manage content in Brevo dashboard
- Separate transactional sends from marketing campaigns
- Use automation workflows for multi-step sequences (welcome, onboarding, retention)
- Monitor deliverability statistics in Brevo's dashboard
- Use double opt-in for marketing lists
- Using transactional API for bulk marketing sends

## Quick Example

```bash
npm install @getbrevo/brevo
```
skilldb get email-services-skills/brevoFull skill: 203 lines
Paste into your CLAUDE.md or agent config

Brevo Email Integration

You are an email operations specialist who integrates Brevo into projects. Brevo is a multi-channel marketing and transactional platform (formerly Sendinblue) that combines email, SMS, WhatsApp, CRM, and automation in one platform.

Core Philosophy

Multi-channel from one platform

Brevo's strength is combining email, SMS, and WhatsApp in a single API and automation builder. If your project needs multiple channels, Brevo eliminates the need for separate providers.

Contacts are CRM records

Brevo treats every contact as a CRM record with attributes, lists, segments, and engagement history. Design your integration around contact attributes — they power segmentation, personalization, and automation.

Automation replaces manual campaigns

Build automation workflows visually in Brevo's dashboard. Application code triggers entry points, and the workflow handles timing, branching, and multi-step sequences.

Setup

Install

npm install @getbrevo/brevo

Initialize

import * as brevo from '@getbrevo/brevo';

const apiInstance = new brevo.TransactionalEmailsApi();
apiInstance.setApiKey(
  brevo.TransactionalEmailsApiApiKeys.apiKey,
  process.env.BREVO_API_KEY
);

Key Techniques

Transactional send

const sendSmtpEmail = new brevo.SendSmtpEmail();
sendSmtpEmail.to = [{ email: 'user@example.com', name: 'Alice' }];
sendSmtpEmail.sender = { email: 'noreply@yourdomain.com', name: 'App' };
sendSmtpEmail.subject = 'Your password reset link';
sendSmtpEmail.htmlContent = '<p>Click <a href="...">here</a> to reset.</p>';
sendSmtpEmail.textContent = 'Reset: https://...';
sendSmtpEmail.tags = ['security', 'password_reset'];
sendSmtpEmail.params = { userId: '123' };

await apiInstance.sendTransacEmail(sendSmtpEmail);

Template send

Create templates in Brevo's dashboard with {{ params.variable }} syntax.

const sendSmtpEmail = new brevo.SendSmtpEmail();
sendSmtpEmail.to = [{ email: 'user@example.com' }];
sendSmtpEmail.templateId = 1;
sendSmtpEmail.params = {
  name: 'Alice',
  resetUrl: 'https://...',
  expiresIn: '1 hour',
};

await apiInstance.sendTransacEmail(sendSmtpEmail);

Contact management

const contactsApi = new brevo.ContactsApi();
contactsApi.setApiKey(brevo.ContactsApiApiKeys.apiKey, process.env.BREVO_API_KEY);

// Create contact
await contactsApi.createContact({
  email: 'user@example.com',
  attributes: {
    FIRSTNAME: 'Alice',
    PLAN: 'pro',
    SIGNUP_DATE: '2025-01-15',
  },
  listIds: [1], // Add to list
});

// Update contact attributes
await contactsApi.updateContact('user@example.com', {
  attributes: { PLAN: 'enterprise' },
});

Campaign creation

const campaignsApi = new brevo.EmailCampaignsApi();
campaignsApi.setApiKey(brevo.EmailCampaignsApiApiKeys.apiKey, process.env.BREVO_API_KEY);

const campaign = await campaignsApi.createEmailCampaign({
  name: 'March Newsletter',
  subject: 'What shipped this month',
  sender: { email: 'updates@yourdomain.com', name: 'Updates' },
  htmlContent: newsletterHtml,
  recipients: { listIds: [1] },
  scheduledAt: '2025-03-15T09:00:00Z',
});

SMS sending

const smsApi = new brevo.TransactionalSMSApi();
smsApi.setApiKey(brevo.TransactionalSMSApiApiKeys.apiKey, process.env.BREVO_API_KEY);

await smsApi.sendTransacSms({
  sender: 'App',
  recipient: '+1234567890',
  content: 'Your verification code: 123456',
  tag: 'otp',
});

Webhook Processing

EventAction
deliveredMark delivered
hardBounceSuppress address permanently
softBounceLog, monitor
complaintSuppress from marketing
unsubscribedUpdate subscription state
openedUpdate engagement
clickedUpdate engagement
export async function POST(req: Request) {
  const body = await req.json();
  const { event, email } = body;

  switch (event) {
    case 'hardBounce':
      await suppressAddress(email, 'hard_bounce');
      break;
    case 'complaint':
      await suppressAddress(email, 'complaint');
      break;
    case 'unsubscribed':
      await updateSubscription(email, false);
      break;
  }

  return new Response('OK');
}

Automation Workflows

Build automations in Brevo's visual workflow builder:

  1. Entry point: API event, contact attribute change, or date trigger
  2. Conditions: Branch based on contact attributes or behavior
  3. Actions: Send email, SMS, WhatsApp, update contact, webhook
  4. Delays: Wait a specific duration or until a condition is met

Trigger automation entry from code:

// Fire a custom event that starts an automation
await apiInstance.sendTransacEmail({
  to: [{ email: 'user@example.com' }],
  templateId: 5, // Automation trigger template
  params: { event_type: 'trial_started', plan: 'pro' },
  tags: ['automation_trigger'],
});

Best Practices

  • Use contact attributes for personalization — they persist across all campaigns
  • Segment contacts by attributes and engagement for targeted campaigns
  • Use templates for all recurring emails — manage content in Brevo dashboard
  • Separate transactional sends from marketing campaigns
  • Use automation workflows for multi-step sequences (welcome, onboarding, retention)
  • Monitor deliverability statistics in Brevo's dashboard
  • Use double opt-in for marketing lists

Anti-Patterns

  • Using transactional API for bulk marketing sends
  • Not setting contact attributes — limits segmentation and personalization
  • Building automation logic in code instead of Brevo's workflow builder
  • Ignoring hard bounce events — damages sender reputation
  • Sending to unsubscribed contacts — violates compliance and Brevo TOS
  • Not configuring domain authentication (SPF, DKIM, DMARC)

Install this skill directly: skilldb add email-services-skills

Get CLI access →

Related Skills

Courier

Send transactional notifications including email with Courier. Use this skill when the project needs to integrate Courier for multi-channel notification orchestration, email delivery through multiple providers, template management with a visual designer, routing rules, user preference management, bulk sends, and delivery tracking. Covers the Send API, automations, user preferences, and provider failover.

Email Services317L

Customerio

Send transactional and marketing email with Customer.io. Use this skill when the project needs to integrate Customer.io for behavioral email automation, transactional messages via the Transactional API, event-driven campaigns, segment-based messaging, webhook handling, and customer data management. Covers the Track API, Transactional API, campaign workflows, and data-driven personalization.

Email Services275L

Email Deliverability

Optimize email deliverability across any provider. Use this skill when the project needs to improve inbox placement, configure SPF, DKIM, and DMARC, manage sender reputation, handle bounces and complaints, warm new IPs or domains, or debug delivery issues. Provider-agnostic best practices for getting email into the inbox.

Email Services182L

Loops

Send transactional and marketing email with Loops. Use this skill when the project needs to integrate Loops for event-driven email, automated sequences, transactional sends, contact management, or product-led email marketing. Covers the Loops API, events, transactional sends, contacts, and audience management.

Email Services177L

Mailchimp Transactional

Send transactional email with Mailchimp Transactional (formerly Mandrill). Use this skill when the project needs to integrate Mandrill/Mailchimp Transactional for reliable transactional email, template-based sending, metadata tracking, subaccounts, webhook processing, or inbound email routing. Covers the Mandrill API, templates, subaccounts, metadata, and webhooks.

Email Services200L

Mailgun

Send transactional and marketing email with Mailgun. Use this skill when the project needs to integrate Mailgun for email sending via API or SMTP, mailing lists, email validation, template management, route-based inbound processing, event tracking, or deliverability optimization. Covers the Mailgun REST API, templates, mailing lists, routes, webhooks, and email validation.

Email Services235L