Skip to content

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:

  1. Trigger: What starts the rule (event, schedule, or manual)
  2. Conditions: What must be true for the rule to run (optional)
  3. 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

  1. Open MAGIEVA and click your profile picture
  2. Select SettingsAutomation
  3. 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:

Event Type: task.created

Step 4: Add Conditions

Click Add Condition and set:

Field: priority
Operator: Greater than or equal to (>=)
Value: 8

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

  1. Click Test Rule to verify it works
  2. 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:

Trigger: 0 9 * * 1-5  (Every weekday at 9am)
Action: Create task "Review inbox" with priority 7

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:

Trigger: Manual
Action: Run workflow "Monthly report generation"

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)

All of these must be true:
- priority >= 8
- status == "pending"
- assigned_to == me

Example 2: Any Condition (OR)

Any of these must be true:
- priority >= 9
- title contains "urgent"
- due_date < tomorrow

Example 3: None (NOT)

None of these must be true:
- status == "completed"
- status == "cancelled"

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:

Rate Limit: Maximum 5 executions per hour
Cooldown: 10 minutes between executions

Use Case: Avoid notification spam from high-volume events.


Max Executions

Stop rules after a certain number of runs:

Configuration:

Max Executions: 50
Action on Max: Pause rule and notify user

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 SettingsAutomation 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

  1. Go to SettingsAutomation
  2. 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

  1. Click Edit on any rule
  2. Modify triggers, conditions, or actions
  3. Click Test Rule to verify changes
  4. Click Save

Note: Editing a rule does NOT reset execution count or statistics.

Pausing Rules

To temporarily disable a rule without deleting it:

  1. Click Pause on the rule
  2. The rule will stop firing but remain in your list
  3. 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:

  1. Click Delete on the rule
  2. 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:

  1. Click View History on any rule
  2. 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:

  1. Check if rule is active:
  2. Go to SettingsAutomation
  3. Verify rule shows green checkmark (✅), not pause icon (⏸️)

  4. Verify trigger:

  5. For event-based triggers: Make sure the event is actually occurring
  6. For schedule-based triggers: Check if cron expression is correct (use https://crontab.guru/)
  7. For manual triggers: You must click "Run" manually

  8. Check conditions:

  9. Click View History to see if conditions are being met
  10. If it says "Conditions: NOT MET", review your condition logic
  11. Try temporarily removing all conditions to test

  12. Check rate limits:

  13. If you hit the rate limit (e.g., max 5 executions/hour), rule won't fire again until cooldown expires
  14. View Execution History to see if rate limiting is active

Actions Not Executing

Problem: Rule fires, but actions don't complete.

Solutions:

  1. Check execution history:
  2. Go to View History on your rule
  3. Look for error messages next to failed actions

  4. Common errors:

  5. "Webhook timeout": External service didn't respond in time (increase timeout or check service status)
  6. "Invalid template variable": You used {{task.nonexistent_field}} (check available variables)
  7. "Permission denied": Action requires permission you don't have (e.g., sending to Slack channel you're not in)
  8. "Rate limit exceeded": Too many actions in short time (add cooldown period)

  9. Test action independently:

  10. Edit the rule
  11. Click Test Action to run it manually
  12. Review error message

Template Variables Not Working

Problem: Action message shows {{task.title}} literally instead of actual task title.

Solutions:

  1. Check variable syntax:
  2. Must use double curly braces: {{variable}}
  3. Variable names are case-sensitive: {{task.Title}} won't work, use {{task.title}}

  4. Verify variable exists:

  5. Not all variables are available in all contexts
  6. For example, {{task.title}} only works in task-related triggers
  7. Check Available Variables section

  8. Use default values:

  9. Syntax: {{task.due_date | default: "No due date"}}
  10. Prevents blank values

Rule Firing Too Often

Problem: You're getting spammed with notifications from a rule.

Solutions:

  1. Add rate limiting:
  2. Edit rule → Advanced OptionsRate Limiting
  3. Set: Maximum 10 executions per hour
  4. Set: Cooldown 5 minutes between executions

  5. Refine conditions:

  6. Add more specific conditions to reduce false positives
  7. Example: Instead of priority >= 5, use priority >= 8 AND assigned_to == me

  8. Change trigger:

  9. If using event-based trigger, consider schedule-based instead
  10. Example: Instead of firing on every task.updated, run daily at 9am to review updated tasks

  11. Pause rule temporarily:

  12. 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

  1. Enable Dry Run Mode first
  2. Verify logs show expected behavior
  3. 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."

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:

  1. Check Examples: Review the 10 Common Rule Patterns above
  2. Rule Templates: Go to SettingsAutomationBrowse Templates for pre-built rules
  3. Help Center: https://docs.magieva.com
  4. Contact Support: Email support@magieva.com with your rule configuration
  5. 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