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

@codee-sh/medusa-plugin-notification-emails

v1.0.0

Published

Medusa plugin for notifications emails.

Readme

Medusa plugin notification emails

A comprehensive notification plugin for Medusa v2 that provides a flexible, block-based template system for multiple channels (Email and Slack) with internationalization support, custom translations, and seamless integration with Medusa's notification module.

Features

  • Multi-Channel Templates: Pre-built templates for Email and Slack channels
  • Block-Based System: Templates are built using a flexible block system that can be stored in a database for future builder functionality
  • Email Templates: Customizable email templates built with React Email for common use cases
  • Slack Templates: Slack Block Kit compatible templates for Slack notifications
  • Template Service Architecture: Unified AbstractTemplateService with channel-specific implementations (EmailTemplateService, SlackTemplateService)
  • Automatic Interpolation: Smart variable interpolation system that processes {{data.*}} and {{translations.*}} placeholders recursively
  • Internationalization: Built-in support for multiple locales (Polish, English)
  • Customizable: Override translations and customize templates without modifying core files
  • Integration: Integrates with Medusa's notification module
  • Admin Panel: Preview and test templates directly from Medusa Admin
  • Type-Safe: Full TypeScript support with exported types
  • HTML & Plain Text: Automatically generates both HTML and plain text versions of emails

Compatibility

  • Medusa Version: >= 2.8.8
  • Node Version: >= 20

Installation

npm install @codee-sh/medusa-plugin-notification-emails
# or
yarn add @codee-sh/medusa-plugin-notification-emails

Quick Start

1. Register the Plugin

Add to your medusa-config.ts:

module.exports = defineConfig({
  plugins: [
    "@codee-sh/medusa-plugin-notification-emails"
  ]
})

2. Configure Notification Provider

Set up a notification provider - see Configuration Documentation for details.

3. Use Templates

The plugin includes built-in subscribers that automatically send email notifications for various events. You can also use templates directly in your code:

Email Templates

import { emailService, TEMPLATES_NAMES } from "@codee-sh/medusa-plugin-notification-emails/templates/emails"

const { html, text, subject } = await emailService.render({
  templateName: TEMPLATES_NAMES.ORDER_PLACED,
  data: templateData,
  options: { locale: "pl" }
})

Slack Templates

import { slackService, TEMPLATES_NAMES } from "@codee-sh/medusa-plugin-notification-emails/templates/slack"

const { blocks } = await slackService.render({
  templateName: TEMPLATES_NAMES.INVENTORY_LEVEL,
  data: templateData,
  options: { locale: "en" }
})

Note: Templates use a block-based system where each template is defined as an array of blocks. The system automatically interpolates variables like {{data.order.id}} and {{translations.headerTitle}} throughout the blocks.

See Templates Documentation for detailed usage examples.

Available Templates

Email Templates

  • Order Placed (order-placed) - Order confirmation email template
  • Order Completed (order-completed) - Order completion notification template
  • Contact Form (contact-form) - Contact form submission email template
  • Order Updated (order-updated) - Order update notification template
  • Inventory Level (inventory-level) - Inventory level notification template

Slack Templates

  • Inventory Level (inventory-level) - Inventory level notification for Slack
  • Product (product) - Product notification for Slack
  • Product Variant (product-variant) - Product variant notification for Slack

See Templates Documentation for general template information and Blocks Documentation for details on the block system.

Built-in Subscribers

The plugin includes automatic email notifications for the following events:

  • order.placed - Sends order confirmation email when an order is placed
  • order.completed - Sends order completion notification when an order is completed

These subscribers automatically:

  • Fetch order data from Medusa
  • Render email templates using React Email
  • Send notifications via Medusa's notification module
  • Respect custom translations configured in plugin options

See Configuration Documentation for details on customizing subscriber behavior.

Admin Panel

Access the template preview in Medusa Admin at /app/notifications/render. See Admin Panel Documentation for details.

Documentation

Exports

The plugin exports the following:

  • @codee-sh/medusa-plugin-notification-emails/templates/emails - Email template service and types
  • @codee-sh/medusa-plugin-notification-emails/templates/slack - Slack template service and types
  • @codee-sh/medusa-plugin-notification-emails/templates/shared - Shared template utilities
  • @codee-sh/medusa-plugin-notification-emails/utils - Utility functions

License

MIT

Author

Codee Team - https://codee.dev