User guide for managing automations in the admin panel.
Navigate to Notifications > Automations in your Medusa Admin dashboard, or directly access:
/app/notifications/automations
The admin panel allows you to:
- View All Automations: See a list of all configured automations
- Create Automations: Set up new notification automations
- Edit Automations: Modify existing automation configurations
- Manage Triggers: Configure when automations should be triggered
- Define Rules: Set up conditions that must be met for notifications to be sent
- Configure Actions: Define what happens when rules are met
Automations can be triggered by:
- Events: Medusa events (e.g.,
inventory.inventory-level.updated,order.placed) - Schedule: Time-based triggers with configurable intervals in seconds
- Manual: Triggered manually from the admin panel
Each automation can have multiple rules that define conditions:
- Rule Attributes: Select from available attributes including:
- Primitive fields:
product.title,inventory_level.available_quantity - Relations:
product.tags.id,product.categories.name(arrays) - Nested objects:
inventory_level.inventory_item.*
- Primitive fields:
- Operators: Choose comparison operators:
- Basic:
equals,not equals,greater than,less than,greater than or equal,less than or equal - Array operations:
in,not in,contains,not contains - Null checks:
empty,not empty
- Basic:
- Values: Set values to compare against:
- Single values: Enter a single string or number (e.g.,
10,"Electronics") - Array values: Use the chip input to add multiple values (e.g., tag IDs, category names)
- No value: For
emptyandnot emptyoperators, no value input is required
- Single values: Enter a single string or number (e.g.,
When all rules pass, actions are executed:
- Channels: Configure delivery channels (email, slack etc.)
- Metadata: Add custom config for actions
Email and Slack actions use a Template Name field.
The template list loads dynamically and is grouped
as System, Database, and External.
- Navigate to Automations: Go to
/app/notifications/automations - Click Create: Start creating a new automation
- Configure Trigger: Set trigger type (event, schedule, or manual). If event, select the event name. If schedule, set interval in seconds. Set a name and description.
- Add Rules: Select rule attributes, choose operators, and set values. For array operators, use the chip input. For
empty/not empty, no value input is required. Add multiple rules as needed (all rules must pass for the automation to trigger). - Configure Actions:
- Set delivery channels
- Add config if needed
- Save: Save the automation configuration
- Select Automation: Click on an automation from the list
- Modify Settings: Update trigger, rules, or actions
- Save Changes: Save the updated configuration
- Active/Inactive: Toggle automations on or off
- Last Run: View when scheduled automations last ran
- Status: Monitor automation status and execution
Create an automation that sends a notification when inventory levels drop below a threshold:
- Trigger: Event
inventory.inventory-level.updated - Rule:
inventory_level.available_quantityis less than10 - Action: Send email notification
Create an automation that triggers when a product has specific tags:
- Trigger: Event
product.updated - Rule:
product.tags.idisin[tag-premium, tag-featured](use chip input for multiple tag IDs) - Action: Send Slack notification
Create an automation for products in specific categories:
- Trigger: Event
product.updated - Rule:
product.categories.namecontains"Electronics"(or useinoperator with multiple category names) - Action: Send email notification
Create an automation that triggers when inventory is empty:
- Trigger: Event
inventory.inventory-level.updated - Rule:
inventory_level.available_quantityisempty - Action: Send Slack notification
Create an automation for when inventory exceeds a certain level:
- Trigger: Event
inventory.inventory-level.updated - Rule:
inventory_level.stocked_quantityis greater than1000 - Action: Send Slack notification
- Use Descriptive Names: Give automations clear, descriptive names
- Test Rules: Verify that rules work as expected before activating
- Monitor Performance: Keep an eye on automation execution and performance
- Use Appropriate Triggers: Choose the right trigger type for your use case
- Combine Rules: Use multiple rules to create complex conditions
- Document Automations: Add descriptions to explain automation purpose
- Choose the Right Operator: Use
in/not infor exact array matches,contains/not containsfor partial matches, andempty/not emptyfor null checks - Use Array Values Correctly: For array operators, use the chip input to add multiple values
- Leverage Relations: Use relation-based attributes (e.g.,
product.tags.id,product.categories.name) to create powerful automations