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 is enabled) |
Example:
Trigger: task.completed
Condition: task.title contains "client"
Action: Send message to a Slack channel
2. Schedule-Based Triggers¶
Rules fire on a recurring schedule, defined using standard cron-style 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 whether 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 |
add_to_knowledge_base |
Add asset to a knowledge base | Knowledge base |
send_email |
Send transactional email | To, subject, template |
trigger_workflow |
Start a workflow | Workflow |
log_message |
Write to activity log | Message text |
webhook |
Send an HTTP POST request to an external URL | 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 identifier
- {{asset.filename}} - Asset filename
- {{asset.type}} - Asset file 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 a set number of 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 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 time on manual reporting every week.
8. Smart Email-to-Task Conversion¶
Use Case: Auto-create tasks from emails containing "ACTION REQUIRED" in the 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 larger assets.
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 a rule from firing too frequently by capping how often it can execute and setting a cooldown between runs. This is helpful for avoiding notification spam from high-volume events.
Max Executions¶
Stop a rule after it has run a certain number of times, and choose whether it should pause automatically and notify you when that limit is reached. This is useful for temporary rules that only need to run a fixed number of times.
Action Failure Handling¶
Control what happens when an action fails:
- Continue: Execute remaining actions even if one fails
- Stop: Halt execution on first failure
- Retry: Retry the failed action automatically
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:
- Go to Settings → Automation
- Click Edit on your rule
- Toggle Dry Run Mode ON
- Click Save
Result: Rule conditions are evaluated, but actions are logged rather than executed. Review the logs to verify your logic before activating the rule for real.
Managing Rules¶
Viewing All Rules¶
- Go to Settings → Automation
- You'll see a list of all your rules, including their trigger, last-fired time, and execution count:
📋 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 its 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 to complete
- 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 the rule is active:
- Go to Settings → Automation
-
Verify the rule shows a green checkmark (✅), not a pause icon (⏸️)
-
Verify the trigger:
- For event-based triggers: Make sure the event is actually occurring
- For schedule-based triggers: Double-check that your cron expression matches the schedule you intend
-
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 a configured rate limit, the rule won't fire again until the cooldown expires
- View Execution History to see if rate limiting is active
Actions Not Executing¶
Problem: The 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": The external service didn't respond in time (increase the timeout or check the service's status)
- "Invalid template variable": You used a variable that doesn't exist for this context (check the available variables list)
- "Permission denied": The action requires a permission you don't have (e.g., sending to a Slack channel you're not in)
-
"Rate limit exceeded": Too many actions ran in a short time (add a cooldown period)
-
Test the action independently:
- Edit the rule
- Click Test Action to run it manually
- Review the error message
Template Variables Not Working¶
Problem: The action message shows {{task.title}} literally instead of the 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 the variable exists:
- Not all variables are available in all contexts
- For example,
{{task.title}}only works in task-related triggers -
Check the 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 a maximum number of executions per hour and a cooldown between them
-
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 an event-based trigger, consider a schedule-based one instead
-
Example: Instead of firing on every
task.updated, run daily at 9am to review updated tasks -
Pause the 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 the logs show the expected behavior
- Disable Dry Run and activate the rule
Monitor Execution History¶
- Check Execution History regularly
- Look for failed actions or unexpected behavior
- Refine conditions based on actual usage
Use Appropriate Rate Limits¶
- High-volume triggers (e.g.,
task.updated) benefit from a lower cap on executions per hour - Low-volume triggers (e.g.,
task.completed) usually don't need a limit - Notification actions should generally always be rate limited 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 a '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 again, causing an 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 many actions or complex branching logic, consider using a workflow instead. Workflows support conditional branching and give you a clearer picture of complex logic, making them easier to debug and maintain.
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
What's Next?¶
Now that you know how to create automation rules, explore:
- Temporal Triggers: Schedule one-time tasks using natural language
- Workflows: Build complex multi-step automations
- Calendar Integration: Sync tasks with your calendar automatically