Automation Rules Guide¶
Summary¶
Automation rules let you create "if this, then that" workflows in MAGIEVA. When certain conditions are met, MAGIEVA automatically takes actions for you—no manual work required.
Examples: - "When a high-priority task is created, send me a Slack notification" - "Every weekday at 8am, create a task to review my inbox" - "When someone uploads an asset tagged 'invoice', add it to my Accounting knowledge base"
Table of Contents¶
- How Automation Rules Work
- Creating Your First Rule
- Rule Components
- 10 Common Rule Patterns
- Advanced Rules
- Managing Rules
- Troubleshooting
- Best Practices
How Automation Rules Work¶
An automation rule has three parts:
- Trigger: What starts the rule (event, schedule, or manual)
- Conditions: What must be true for the rule to run (optional)
- Actions: What MAGIEVA does when conditions are met
TRIGGER CONDITIONS ACTIONS
─────────────── ────────────────── ───────────────────
When task AND priority >= 8 → Send notification
is created AND status = "pending" → Add to project "Urgent"
AND assigned to me
Rule Evaluation Flow¶
graph LR
A[Event Occurs] --> B{Trigger Matches?}
B -->|No| Z[Stop]
B -->|Yes| C{Conditions Met?}
C -->|No| Z
C -->|Yes| D[Execute Actions]
D --> E[Log Result]
Creating Your First Rule¶
Let's create a simple rule: "Send me a notification when high-priority tasks are created"
Step 1: Navigate to Automation Rules¶
- Open MAGIEVA and click your profile picture
- Select Settings → Automation
- Click Create New Rule
Step 2: Name Your Rule¶
Give your rule a descriptive name:
Rule Name: High-Priority Task Notifications
Description: Get notified immediately when urgent tasks are created
Step 3: Choose a Trigger¶
Select Event-Based Trigger and choose:
Step 4: Add Conditions¶
Click Add Condition and set:
Step 5: Add Actions¶
Click Add Action and configure:
Action Type: Send Notification
Channel: In-App + Email
Message: "New high-priority task: {{task.title}}"
Step 6: Save and Activate¶
- Click Test Rule to verify it works
- Click Save & Activate
Your rule is now live! Try creating a high-priority task to see it in action.
Rule Components¶
Triggers¶
Triggers define when your rule should evaluate. There are three types:
1. Event-Based Triggers¶
Rules fire when specific events occur in MAGIEVA.
Available Events:
| Event Type | When It Fires |
|---|---|
task.created |
New task is created |
task.updated |
Task details change |
task.completed |
Task is marked done |
task.overdue |
Task passes due date without completion |
asset.uploaded |
New file is uploaded |
asset.enriched |
Asset AI analysis completes |
message.received |
New message in conversation |
calendar.synced |
Calendar sync completes |
email.received |
New email arrives (if email integration enabled) |
Example:
Trigger: task.completed
Condition: task.title contains "client"
Action: Send message to #client-success Slack channel
2. Schedule-Based Triggers¶
Rules fire on a recurring schedule (using cron expressions).
Common Schedules:
| Description | Cron Expression |
|---|---|
| Every day at 9am | 0 9 * * * |
| Every weekday at 8am | 0 8 * * 1-5 |
| Every Monday at 2pm | 0 14 * * 1 |
| Every hour | 0 * * * * |
| Every 15 minutes | */15 * * * * |
| First day of month at 9am | 0 9 1 * * |
Example:
3. Manual Triggers¶
Rules that you run manually (on-demand).
Use Cases: - Bulk operations (e.g., "Archive all completed tasks from last month") - One-off workflows (e.g., "Export all assets to knowledge base") - Testing rules before automating
Example:
Conditions¶
Conditions determine if actions should execute. You can combine multiple conditions with AND/OR/NOT logic.
Condition Operators¶
| Operator | Description | Example |
|---|---|---|
== |
Equals | status == "pending" |
!= |
Not equals | priority != 5 |
> |
Greater than | priority > 7 |
< |
Less than | due_date < "2026-03-01" |
>= |
Greater than or equal | priority >= 8 |
<= |
Less than or equal | priority <= 3 |
contains |
Text contains substring | title contains "urgent" |
not_contains |
Text does not contain | title not_contains "draft" |
starts_with |
Text starts with | title starts_with "Client:" |
ends_with |
Text ends with | title ends_with "- Review" |
matches_regex |
Matches regex pattern | email matches_regex ".*@acme.com" |
in |
Value in list | status in ["pending", "in_progress"] |
not_in |
Value not in list | priority not_in [1, 2, 3] |
exists |
Field is not null | due_date exists |
not_exists |
Field is null | assigned_to not_exists |
Compound Conditions¶
Combine conditions with all (AND), any (OR), none (NOT):
Example 1: All Conditions (AND)
Example 2: Any Condition (OR)
Example 3: None (NOT)
Example 4: Nested Logic
All of:
- priority >= 8
- Any of:
- title contains "client"
- title contains "urgent"
- None of:
- status == "completed"
Actions¶
Actions define what MAGIEVA does when conditions are met.
Available Actions¶
| Action Type | Description | Configuration |
|---|---|---|
create_task |
Create a new task | Task template (title, description, priority, etc.) |
update_task |
Modify existing task | Fields to update |
send_notification |
Send user notification | Channel (in-app, email, Slack), message template |
add_to_project |
Add task to project | Project ID |
add_to_knowledge_base |
Add asset to KB | Knowledge base ID |
send_email |
Send transactional email | To, subject, template |
trigger_workflow |
Start a workflow | Workflow ID |
log_message |
Write to activity log | Message text |
webhook |
HTTP POST request | URL, payload |
Action Templates¶
Use template variables to personalize actions:
Available Variables:
- {{user.name}} - Current user's name
- {{user.email}} - Current user's email
- {{task.title}} - Task title
- {{task.priority}} - Task priority (1-10)
- {{task.due_date}} - Task due date
- {{task.id}} - Task UUID
- {{asset.filename}} - Asset filename
- {{asset.type}} - Asset MIME type
- {{event.timestamp}} - Event timestamp
Example:
Message: "Hey {{user.name}}, task '{{task.title}}' is due {{task.due_date}}!"
Result: "Hey Alice, task 'Finish quarterly report' is due 2026-02-15!"
10 Common Rule Patterns¶
1. High-Priority Task Alerts¶
Use Case: Get notified immediately when urgent tasks are created.
Configuration:
Trigger: task.created
Conditions:
- priority >= 8
Actions:
- Send notification (in-app + email)
Message: "🚨 High-priority task: {{task.title}}"
Why It's Useful: Ensures you never miss urgent work.
2. Daily Inbox Review Reminder¶
Use Case: Create a recurring task to review your inbox every morning.
Configuration:
Trigger: Schedule (0 9 * * 1-5) - Every weekday at 9am
Conditions: None
Actions:
- Create task
Title: "Review inbox and respond to emails"
Priority: 7
Due date: Today at 10am
Why It's Useful: Builds a consistent email management habit.
3. Auto-Archive Completed Tasks¶
Use Case: Automatically archive tasks 7 days after completion.
Configuration:
Trigger: Schedule (0 2 * * *) - Every day at 2am
Conditions:
- status == "completed"
- completed_at < 7 days ago
Actions:
- Update task
archived: true
Why It's Useful: Keeps your task list clean without manual effort.
4. Client Asset Auto-Organization¶
Use Case: Automatically add assets tagged "client" to your "Client Work" knowledge base.
Configuration:
Trigger: asset.uploaded
Conditions:
- tags contains "client"
Actions:
- Add to knowledge base "Client Work"
- Send notification "Asset added to Client Work KB: {{asset.filename}}"
Why It's Useful: Organizes assets automatically as you upload them.
5. Overdue Task Escalation¶
Use Case: Bump priority and notify when tasks become overdue.
Configuration:
Trigger: task.overdue
Conditions:
- priority < 9
Actions:
- Update task
priority: 9
- Send notification
Message: "⚠️ Task '{{task.title}}' is overdue! Priority increased to 9."
Why It's Useful: Ensures overdue work gets immediate attention.
6. Meeting Preparation Workflow¶
Use Case: Create a prep task 1 hour before every calendar meeting.
Configuration:
Trigger: calendar.event.upcoming
Conditions:
- event.type == "meeting"
- event.starts_in == 1 hour
Actions:
- Create task
Title: "Prepare for: {{event.title}}"
Description: "Review agenda and materials"
Due date: {{event.start_time}}
Priority: 8
Why It's Useful: Never walk into a meeting unprepared.
7. End-of-Week Report Generation¶
Use Case: Automatically generate and email a weekly status report every Friday.
Configuration:
Trigger: Schedule (0 17 * * 5) - Every Friday at 5pm
Conditions: None
Actions:
- Trigger workflow "Generate weekly report"
- Send email
To: manager@company.com
Subject: "Weekly Status Report - Week of {{current_week}}"
Body: {{report_content}}
Why It's Useful: Saves 30 minutes every week on manual reporting.
8. Smart Email-to-Task Conversion¶
Use Case: Auto-create tasks from emails containing "ACTION REQUIRED" in subject.
Configuration:
Trigger: email.received
Conditions:
- subject contains "ACTION REQUIRED"
Actions:
- Create task
Title: "Email action: {{email.subject}}"
Description: "From: {{email.from}}\n\n{{email.body}}"
Priority: 8
- Send notification "Task created from email: {{email.subject}}"
Why It's Useful: Turns action items into trackable tasks automatically.
9. Focus Time Protection¶
Use Case: Block calendar time every weekday morning for focused work.
Configuration:
Trigger: Schedule (0 8 * * 1-5) - Every weekday at 8am
Conditions:
- calendar.has_event_between(9am, 12pm) == false
Actions:
- Create calendar event
Title: "🎯 Focus Time (Do Not Disturb)"
Start: 9:00 AM
End: 12:00 PM
Description: "Deep work block - No meetings"
Why It's Useful: Protects your most productive hours from meetings.
10. Asset Enrichment Quality Check¶
Use Case: Review AI-generated descriptions for assets larger than 10MB.
Configuration:
Trigger: asset.enriched
Conditions:
- asset.size > 10MB
- enrichment.confidence < 0.85
Actions:
- Create task
Title: "Review AI description for {{asset.filename}}"
Description: "AI confidence: {{enrichment.confidence}}\nGenerated description: {{enrichment.description}}"
Priority: 6
- Add tag "needs-review" to asset
Why It's Useful: Ensures high-quality metadata for important assets.
Advanced Rules¶
Rate Limiting¶
Prevent rules from firing too frequently:
Configuration:
Use Case: Avoid notification spam from high-volume events.
Max Executions¶
Stop rules after a certain number of runs:
Configuration:
Use Case: Temporary rules (e.g., "Alert me 50 times, then stop").
Action Failure Handling¶
Control what happens when actions fail:
Options: - Continue: Execute remaining actions even if one fails - Stop: Halt execution on first failure - Retry: Retry failed action up to 3 times
Example:
Actions:
1. Send notification (on_failure: continue)
2. Create task (on_failure: retry)
3. Webhook (on_failure: stop)
Dry Run Mode¶
Test rules without executing actions:
Enable Dry Run: 1. Go to Settings → Automation 2. Click Edit on your rule 3. Toggle Dry Run Mode ON 4. Click Save
Result: Rule conditions are evaluated, but actions are logged (not executed). Review logs to verify logic before activating.
Managing Rules¶
Viewing All Rules¶
- Go to Settings → Automation
- You'll see a list of all your rules:
📋 My Automation Rules (8 active, 2 paused)
✅ High-Priority Task Alerts
Trigger: task.created | Last fired: 2 hours ago | Executions: 12
✅ Daily Inbox Review Reminder
Trigger: 0 9 * * 1-5 | Last fired: Today at 9:00 AM | Executions: 45
⏸️ End-of-Week Report (Paused)
Trigger: 0 17 * * 5 | Last fired: Feb 7 at 5:00 PM | Executions: 4
Editing Rules¶
- Click Edit on any rule
- Modify triggers, conditions, or actions
- Click Test Rule to verify changes
- Click Save
Note: Editing a rule does NOT reset execution count or statistics.
Pausing Rules¶
To temporarily disable a rule without deleting it:
- Click Pause on the rule
- The rule will stop firing but remain in your list
- Click Resume to reactivate
Use Cases: - Vacation (pause daily reminder rules) - Testing (pause production rules while debugging) - Temporary adjustments (pause weekly reports during holidays)
Deleting Rules¶
To permanently remove a rule:
- Click Delete on the rule
- Confirm the action
Warning: Deletion is permanent and cannot be undone. Consider pausing instead if you might need the rule later.
Viewing Execution History¶
To see when a rule fired and what happened:
- Click View History on any rule
- You'll see a log of recent executions:
Execution History: High-Priority Task Alerts
Feb 12, 2026 2:30 PM - Success ✅
Trigger: task.created (task_id: abc-123)
Conditions: MET (priority = 9)
Actions: 1/1 succeeded (Sent notification)
Feb 12, 2026 11:15 AM - Partial ⚠️
Trigger: task.created (task_id: def-456)
Conditions: MET (priority = 8)
Actions: 1/2 succeeded (Notification sent, webhook failed)
Error: Webhook timeout after 5 seconds
Feb 12, 2026 9:00 AM - Skipped ⏭️
Trigger: task.created (task_id: ghi-789)
Conditions: NOT MET (priority = 5)
Actions: None executed
Rule Statistics¶
View aggregated statistics for each rule:
- Total executions: How many times the rule has fired
- Success rate: Percentage of successful executions
- Average execution time: How long actions take
- Most recent error: Last failure message (if any)
Troubleshooting¶
Rule Not Firing¶
Problem: You created a rule, but it's not executing.
Solutions:
- Check if rule is active:
- Go to Settings → Automation
-
Verify rule shows green checkmark (✅), not pause icon (⏸️)
-
Verify trigger:
- For event-based triggers: Make sure the event is actually occurring
- For schedule-based triggers: Check if cron expression is correct (use https://crontab.guru/)
-
For manual triggers: You must click "Run" manually
-
Check conditions:
- Click View History to see if conditions are being met
- If it says "Conditions: NOT MET", review your condition logic
-
Try temporarily removing all conditions to test
-
Check rate limits:
- If you hit the rate limit (e.g., max 5 executions/hour), rule won't fire again until cooldown expires
- View Execution History to see if rate limiting is active
Actions Not Executing¶
Problem: Rule fires, but actions don't complete.
Solutions:
- Check execution history:
- Go to View History on your rule
-
Look for error messages next to failed actions
-
Common errors:
- "Webhook timeout": External service didn't respond in time (increase timeout or check service status)
- "Invalid template variable": You used
{{task.nonexistent_field}}(check available variables) - "Permission denied": Action requires permission you don't have (e.g., sending to Slack channel you're not in)
-
"Rate limit exceeded": Too many actions in short time (add cooldown period)
-
Test action independently:
- Edit the rule
- Click Test Action to run it manually
- Review error message
Template Variables Not Working¶
Problem: Action message shows {{task.title}} literally instead of actual task title.
Solutions:
- Check variable syntax:
- Must use double curly braces:
{{variable}} -
Variable names are case-sensitive:
{{task.Title}}won't work, use{{task.title}} -
Verify variable exists:
- Not all variables are available in all contexts
- For example,
{{task.title}}only works in task-related triggers -
Check Available Variables section
-
Use default values:
- Syntax:
{{task.due_date | default: "No due date"}} - Prevents blank values
Rule Firing Too Often¶
Problem: You're getting spammed with notifications from a rule.
Solutions:
- Add rate limiting:
- Edit rule → Advanced Options → Rate Limiting
- Set: Maximum 10 executions per hour
-
Set: Cooldown 5 minutes between executions
-
Refine conditions:
- Add more specific conditions to reduce false positives
-
Example: Instead of
priority >= 5, usepriority >= 8 AND assigned_to == me -
Change trigger:
- If using event-based trigger, consider schedule-based instead
-
Example: Instead of firing on every
task.updated, run daily at 9am to review updated tasks -
Pause rule temporarily:
- Click Pause while you debug the issue
Best Practices¶
Start Simple¶
- Create basic rules first (1 trigger + 1 action)
- Test thoroughly before adding complexity
- Add conditions and multiple actions gradually
Use Descriptive Names¶
Good: - ✅ "High-Priority Task Alerts (>= 8)" - ✅ "Daily 9am Inbox Review" - ✅ "Client Asset Auto-KB Organization"
Bad: - ❌ "Rule 1" - ❌ "Task thing" - ❌ "Test"
Test Before Activating¶
- Enable Dry Run Mode first
- Verify logs show expected behavior
- Disable Dry Run and activate rule
Monitor Execution History¶
- Check Execution History weekly
- Look for failed actions or unexpected behavior
- Refine conditions based on actual usage
Use Appropriate Rate Limits¶
- High-volume triggers (e.g.,
task.updated) → 5-10 executions/hour - Low-volume triggers (e.g.,
task.completed) → No limit needed - Notification actions → Always rate limit to avoid spam
Document Complex Rules¶
Add detailed descriptions to your rules:
Description: "This rule fires every weekday at 9am to create a daily
inbox review task. It skips weekends and holidays (detected by checking
if 'Holiday' calendar event exists). The created task is due at 10am to
allow 1 hour for review."
Group Related Rules¶
Use naming conventions to group rules:
📊 [Reports] Weekly Status Report
📊 [Reports] Monthly Revenue Summary
📊 [Reports] Quarterly Goal Review
🔔 [Alerts] High-Priority Tasks
🔔 [Alerts] Overdue Tasks
🔔 [Alerts] Client Emails
Avoid Infinite Loops¶
Problem: Rule A creates a task → triggers Rule B → creates a task → triggers Rule A (infinite loop).
Solution: Use condition checks to break loops:
Rule A:
Trigger: task.created
Conditions:
- created_by != "automation_rule" ← Prevents loop
Actions:
- Create task (mark as created_by: "automation_rule")
Use Workflows for Complex Logic¶
If your rule has 5+ actions or complex branching logic, consider using a workflow instead:
- Workflows support conditional branching
- Better visualization of complex logic
- Easier to debug and maintain
See Workflows Guide for details.
Need Help?¶
If you're stuck creating automation rules:
- Check Examples: Review the 10 Common Rule Patterns above
- Rule Templates: Go to Settings → Automation → Browse Templates for pre-built rules
- Help Center: https://docs.magieva.com
- Contact Support: Email support@magieva.com with your rule configuration
- Community: Discord
What's Next?¶
Now that you know how to create automation rules, explore:
- Temporal Triggers: Schedule one-time tasks with natural language → Temporal Triggers Guide
- Workflows: Build complex multi-step automations → Workflows Guide
- Calendar Integration: Sync tasks with your calendar automatically → Calendar Setup Guide
Last Updated: 2026-02-12 Version: 1.0.0 Feedback: If you have suggestions for this guide, email docs@magieva.com