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

@erulabs-tech/medusa-plugin-slack

v0.0.1

Published

A starter for Medusa plugins.

Readme

Features

  • 📦 Order Notifications - Get notified when orders are placed, canceled, or completed
  • 👤 Customer Alerts - Track new customer registrations
  • 📊 Inventory Monitoring - Low stock alerts sent to your warehouse team
  • 🚨 Error Monitoring - Critical error notifications for your dev team
  • 🎨 Rich Formatting - Beautiful Slack messages with blocks, buttons, and attachments
  • 🔗 Deep Links - Quick access to orders, customers, and products in admin

Installation

  1. Install the plugin:
pnpm add @erulabs-tech/medusa-plugin-slack
  1. Configure in medusa-config.js:
module.exports = defineConfig({
  // ...
  plugins: [
    {
      resolve: "@erulabs-tech/medusa-plugin-slack",
      options: {
        webhookUrl: process.env.SLACK_WEBHOOK_URL,
        adminUrl: process.env.MEDUSA_ADMIN_URL,
        defaultChannel: "#general",
        username: "Medusa Bot",
        iconEmoji: ":robot_face:",
      },
    },
  ],
});
  1. Set environment variables:
# Required
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL
MEDUSA_ADMIN_URL=https://admin.yourstore.com

# Optional
SLACK_DEFAULT_CHANNEL=#general
SLACK_USERNAME=Medusa Bot
SLACK_ICON_EMOJI=:robot_face:

Available Notifications

Order Events

| Event | Channel | Description | | ----------------- | ---------------- | ------------------------------- | | order.placed | #orders | New order received with details | | order.canceled | #orders-alerts | Order cancellation alert | | order.completed | #fulfillment | Order successfully delivered |

Customer Events

| Event | Channel | Description | | ------------------ | ------------ | ------------------------- | | customer.created | #marketing | New customer registration |

Inventory Events

| Event | Channel | Description | | ----------------- | ------------ | ------------------------------------- | | product.updated | #warehouse | Low stock alert (threshold: 10 units) |

Error Monitoring

| Event | Channel | Description | | ----------- | ------------- | ---------------------------- | | app.error | #dev-alerts | Critical errors and warnings |

Example Slack Message

When an order is placed, you'll receive a rich Slack message like:

🛒 New Order Received
━━━━━━━━━━━━━━━━━━━━
Order ID:  #1234
Customer:  [email protected]
Total:     $99.99 USD
Items:     3
━━━━━━━━━━━━━━━━━━━━
[View in Admin]

Custom Notifications

Send custom Slack notifications from your code:

import { Modules } from "@medusajs/framework/utils";

const notificationModuleService = container.resolve(Modules.NOTIFICATION);

await notificationModuleService.createNotifications({
  to: "#my-channel",
  channel: "slack",
  body: "Custom notification",
  data: {
    blocks: [
      {
        type: "header",
        text: {
          type: "plain_text",
          text: "🎉 Custom Header",
        },
      },
    ],
  },
});

Block Kit Helpers

The plugin includes helper functions for building Slack messages:

import {
  createHeaderBlock,
  createSectionBlock,
  createDividerBlock,
  createContextBlock,
  createButtonBlock,
  buildOrderNotificationBlocks,
  buildCustomerNotificationBlocks,
  buildInventoryAlertBlocks,
} from "@erulabs-tech/medusa-plugin-slack/utils";

Testing

  1. Create a Slack app and enable incoming webhooks
  2. Copy the webhook URL to your .env file
  3. Trigger events in your Medusa store
  4. Check your Slack channel for notifications

Troubleshooting

Notifications not appearing in Slack

  • Verify your webhook URL is correct
  • Check that the Slack app is installed in your workspace
  • Ensure the webhook has permission to post to the target channel

Wrong channel receiving notifications

  • Check the to field in your notification
  • Verify channel overrides in notification data
  • Review subscriber configuration

Contributing

Contributions are welcome! Please read our contributing guidelines first.

License

Licensed under the MIT License. See LICENSE for more information.