Automation plugin for Medusa v2 with rule-based triggers and actions for notifications and workflows.
- Automation Triggers: Events, schedules, or manual actions (see details)
- Rule-Based Conditions: Arrays, relations, and multiple data types (see details)
- Rich Attribute Support: Products, Variants, Tags, Categories, Inventory (see available attributes)
- Multiple Action Types: Email, Slack, and custom actions (see details)
- Event Subscribers: Built-in subscribers for common Medusa events (see available events)
- Admin Panel: Manage automations directly from Medusa Admin (see details)
- Extensible: Add custom action handlers
- Type-Safe: Full TypeScript support with exported types and workflows
- Medusa Version:
>= 2.8.8 - Node Version:
>= 20
npm install @codee-sh/medusa-plugin-automations
# or
yarn add @codee-sh/medusa-plugin-automationsAdd to your medusa-config.ts:
module.exports = defineConfig({
plugins: [
"@codee-sh/medusa-plugin-automations"
]
})The plugin includes database migrations for automation models. Run migrations to set up the required tables:
medusa migrations runSee Database Migrations for more details about the created tables.
Navigate to Notifications > Automations in your Medusa Admin dashboard, or directly access:
/app/notifications/automations
Automations are triggered by:
- Events: Medusa events (e.g.,
inventory.inventory-level.updated,product.updated) - Schedule: Time-based triggers with configurable intervals
- Manual: Triggered manually from the admin panel
See Available Subscribers for a complete list of supported events.
Each automation can have multiple rules that define when actions should be executed. Rules support primitive fields, relations (arrays), nested objects, and various operators for complex conditions.
For detailed information, see:
- Available Attributes Reference - Complete list of attributes for each event type
- Rule Operators - All supported operators with examples
- Rule Values - Supported data types and usage
- Custom Action Handlers - Extend actions with custom handlers
When automation rules pass, actions are executed. Supported action types include:
- Email: Send email notifications
- Slack: Send Slack messages with Block Kit formatting
- Custom: Extend with custom action handlers
See Actions and Slack Notification Provider in the configuration documentation for details on configuring and extending actions.
Email and Slack templates are rendered by
@codee-sh/medusa-plugin-notification-emails.
Access the automations management interface in Medusa Admin at /app/notifications/automations. See Admin Panel Documentation for details.
- Configuration - Plugin configuration options and extending functionality
- Admin Panel - Admin interface usage and automation management
The plugin exports the following:
@codee-sh/medusa-plugin-automations/workflows- Workflow functions for automation management@codee-sh/medusa-plugin-automations/modules/mpn-automation- Automation module service@codee-sh/medusa-plugin-automations/utils- Utility functions
Automations management interface in Medusa Admin
For email and Slack template rendering, see @codee-sh/medusa-plugin-notification-emails.
MIT
Codee Team - https://codee.dev
