npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

strapi-plugin-brevo-template-sender

v1.0.2

Published

HTML or Brevo template emails by content-type and event; send via Brevo

Downloads

38

Readme

Logo - Brevo Template Sender

Demo - Brevo Template Sender

Features

  • Brevo config: API key, sender (email / name), optional OpenAI API key for AI-generated templates
  • Templates per content-type: one template (subject + HTML or Brevo template) per content-type, tied to Create, Update, Delete, Publish, Unpublish events
  • Template modes: HTML (subject + HTML in Strapi) or Brevo template (ID of template created in Brevo)
  • Send API: endpoint POST /api/brevo-template-sender/send with body { params: { ... } } only. Template and recipients from Strapi config.
  • AI generation: “Generate with AI” button in the template editor (requires OpenAI key in config or OPENAI_API_KEY)

Installation

Requirements

  • Strapi v5
  • Brevo account (API key)
  • Optional: OpenAI key for “Generate with AI”

Enable the plugin in Strapi

In config/plugins.ts:

Local install (plugin inside your Strapi project). Config is optional: by default the plugin uses its own content-type plugin::brevo-template-sender.email-template and logoUrl from STRAPI_LOGO_URL (or empty).

export default ({ env }) => ({
  "brevo-template-sender": {
    enabled: true,
    resolve: "./src/plugins/strapi-plugin-brevo-template-sender",
    // Optional config: only add when overriding defaults
    // config: {
    //   templateContentType: "api::email-template.email-template", // project custom content-type
    //   logoUrl: env("STRAPI_LOGO_URL", ""),                      // or leave default (env)
    //   // OpenAI: set OPENAI_API_KEY in .env or in plugin Config (admin) for "Generate with AI"
    // },
  },
});

To use an Email Template content-type defined in your project (e.g. api::email-template.email-template) or to set the logo URL in config instead of an env variable, uncomment and fill in config.

Rebuild Strapi

npm run build
npm run develop

or with yarn:

yarn build
yarn develop

Usage

1) Configuration page (admin)

In the Brevo Template Sender menu:

  • Config: Brevo API key, sender email and name, OpenAI key (optional)
  • Active Content-Type templates: “Manage content types” to enable events per content-type, “Edit Template” for subject / HTML / recipients
  • Send Email API: default template for the send endpoint, configurable via “Configure template”

2) Template editor (Edit Template)

For each enabled content-type, “Edit Template” lets you set:

  • Subject: with {{variable}} placeholders
  • Message (HTML) or Brevo template: HTML mode (editor) or Brevo template ID
  • Recipients: Recipients field (used by the Send API)
  • Generate with AI: button to create or adapt HTML via OpenAI

3) Send API

Body: { params: { ... } } only. Template and recipients are set in Strapi (plugin → Configure template).

Example:

POST /api/brevo-template-sender/send
{
  "params": {
    "firstname": "Jean",
    "message": "Content..."
  }
}

Email Template content-type

By default the plugin uses its own content-type plugin::brevo-template-sender.email-template. If you set templateContentType (e.g. api::email-template.email-template), your project content-type must expose at least: name, code (unique), subject, html. Variables in subject and HTML use the {{variable_name}} syntax.

Template variables

  • Subject and HTML: {{variable_name}} (optional spaces). Keys in params replace these placeholders.
  • {{logo_url}}: injected automatically by the plugin (config logoUrl or STRAPI_LOGO_URL).

Example subject: New message: {{subject}} — HTML: <p><img src="{{logo_url}}" alt="Logo" /></p><p>From: {{email}}</p><p>{{message}}</p>

Template codes and variables are defined by your project: create the templates you need in Strapi (or in Brevo) and reference them by code or document ID when calling the API.

Preview

In the template editor, a preview on the right replaces variables with sample values (including {{logo_url}} when configured).

Technical requirements

  • Brevo: BREVO_API_KEY and sender (admin config or .env / BREVO_SENDER)
  • OpenAI (optional): key in Config or OPENAI_API_KEY for “Generate with AI”
  • Project uses the @getbrevo/brevo package

Contributors

License

MIT — see repository.