Event-Based Automation Engine

Elementum’s Automation System is an event-driven framework that responds to activities within your system. Automations monitor system events and execute predefined actions when specific conditions are met. The system operates on a trigger-based model where events in your workflow automatically initiate response sequences without manual intervention.

How Event-Based Automation Works

The Listen-Think-Act Framework

Every automation follows this pattern:
  1. Listen (Triggers) - Monitor for specific events happening in your system
  2. Think (Conditions & AI) - Evaluate the event and determine what should happen
  3. Act (Actions) - Execute the appropriate response automatically
Event Occurs → Automation Listens → AI Analyzes → Actions Execute → Process Continues

Example: Customer Support Workflow

Manual Process:
  • Customer emails support → Email sits in inbox → Agent reads email → Agent searches for customer → Agent creates ticket → Agent assigns ticket → Agent sends confirmation
Automated Process:
  • Customer emails support → Email Received trigger fires → AI analyzes email content → Search Records finds customer → Create Record generates ticket → AI Classification determines priority → Make Assignment routes to appropriate agent → Send Email Notification confirms receipt

Understanding Events

Events represent activities within your system. Every interaction, data change, or scheduled occurrence can trigger an automation.

Event Categories

Record Events
  • Record is Created: New data enters your system
  • Record is Updated: Existing data changes
  • Approval Process Status Updated: Approval workflows advance
Content Events
  • Attachment is Added: Files uploaded to records
  • Comment Added: Team members communicate on records
Data Events
  • Data Mine: Scheduled data collection from external sources
  • Email Received: Incoming emails that need processing
Time Events
  • Time-Based: Scheduled executions (daily, weekly, monthly)
  • Survey: Responses submitted through forms
Workflow Events
  • On-Demand Trigger: Custom triggers with inputs/outputs for complex workflows
  • Agent Conversation Ended: AI agent interactions complete with context

Event-Driven Design Patterns

Example: Invoice Processing
  • Traditional: “I need to process invoices daily”
  • Event-driven: “When an invoice attachment is added to a vendor record, extract the data, validate it, and route for approval”
Example: Customer Onboarding
  • Traditional: “I need to onboard new customers”
  • Event-driven: “When a new customer record is created, generate welcome materials, create project records, and assign account managers”

AI Integration in Automations

AI actions process information and make decisions within your automation workflows. These actions receive specific data through variables and produce structured outputs.

AI Actions Available

AI Classification Categorizes unstructured data into predefined groups.
Event: Support ticket created
AI Classification: Analyzes ticket content → Categorizes as "Bug", "Feature Request", or "Support"
Result: Automatic routing to appropriate team
AI Summarization Condenses lengthy content into key insights.
Event: Long customer feedback received
AI Summarization: Extracts key points and sentiment
Result: Executive summary for leadership review
Transform Data with AI Cleans, normalizes, and enhances data automatically.
Event: Customer data imported from external system
Transform Data: Standardizes addresses, phone numbers, company names
Result: Clean, consistent data ready for use
AI File Analysis Extracts information from documents automatically.
Event: Contract PDF uploaded
AI File Analysis: Extracts key terms, dates, and obligations
Result: Structured data for tracking and alerts

Using Variables with AI

Variables control what information AI receives:
Customer Data (variable) → AI Classification → Determines Customer Tier
Support Ticket Content (variable) → AI Summarization → Executive Summary
Contract Document (variable) → AI File Analysis → Key Terms Extracted
For detailed information on all available actions, see the Automation Actions Reference. For complete trigger details and configuration examples, see the Automation Triggers Reference.

Building Your First Automation

Step 1: Choose Your Event (Trigger)

Selected Trigger: Email Received Purpose: Captures customer support requests

Step 2: Add AI Actions

AI Classification: Analyze the email content
  • Input: Email content (from Email Received trigger)
  • Output: Category (Bug, Feature Request, General Support)
  • Variable: email_category
AI Summarization: Create issue summary
  • Input: Email content (from Email Received trigger)
  • Output: Brief summary of customer issue
  • Variable: issue_summary

Step 3: Add Response Actions

Search Records: Find existing customer
  • Input: Email address (from Email Received trigger)
  • Output: Customer record
  • Variable: customer_record
Create Record: Generate support ticket
  • Input: Customer record, email category, issue summary
  • Output: New ticket record
  • Variable: support_ticket
Make Assignment: Route to appropriate team
  • Input: Email category (determines team assignment)
  • Output: Assigned team member
  • Variable: assigned_agent
Send Email Notification: Confirm receipt
  • Input: Support ticket number, assigned agent, issue summary
  • Output: Confirmation email to customer

Step 4: The Complete Flow

Email Received → AI Classification → AI Summarization → Search Records → Create Record → Make Assignment → Send Email Notification

Automation Patterns

Decision Tree Pattern

Use conditions to create branching logic:
Record is Updated → IF customer tier = "Enterprise"
  → Send Message to Teams (priority channel)
  → Make Assignment (senior agent)
OTHERWISE IF customer tier = "Standard"
  → Send Email Notification (standard response)
  → Make Assignment (general queue)

Data Processing Pipeline

Chain multiple AI actions for complex data transformation:
File Uploaded → AI File Analysis → Transform Data with AI → AI Classification → Create Record → Send Email Notification

Approval Workflow

Combine AI with human decision-making:
Record is Created → AI Classification → IF amount > $10,000
  → Start Approval Process (CFO approval)
  → Send Message to Teams (finance team)
OTHERWISE
  → Update Record Fields (auto-approved)

Implementation Examples

1. Document Processing Automation

Setup: Process incoming invoices automatically Trigger: Attachment is Added (invoice PDF) AI Integration: AI File Analysis extracts vendor, amount, due date Actions: Create Record, Start Approval Process, Send Email Notification
PDF Uploaded → AI File Analysis → Create Invoice Record → IF amount > $5,000
  → Start Approval Process
OTHERWISE
  → Update Record Fields (approved) → Send Email Notification

2. Customer Onboarding Automation

Setup: Welcome new customers and set up accounts Trigger: Record is Created (new customer) AI Integration: AI Classification determines customer type and needs Actions: Generate Reports, Send Email Notification, Create Record (project setup)
New Customer Created → AI Classification → Generate Report (welcome packet) → Send Email Notification → Create Record (project) → Make Assignment (account manager)

3. Sales Lead Processing

Setup: Qualify and route sales leads Trigger: Record is Created (lead form submission) AI Integration: AI Classification analyzes lead quality and fit Actions: Update Record Fields, Make Assignment, Send Email Notification
Lead Form Submitted → AI Classification → Update Record Fields (lead score) → IF score > 80
  → Make Assignment (senior sales rep) → Send Email Notification (immediate follow-up)
OTHERWISE
  → Make Assignment (lead nurturing queue)

4. Project Status Monitoring

Setup: Track project progress and alert stakeholders Trigger: Record is Updated (project status change) AI Integration: AI Summarization creates status updates Actions: Generate Report, Send Message to Teams, Send Email Notification
Project Status Updated → AI Summarization → Generate Report → Send Message to Teams → IF status = "At Risk"
  → Send Email Notification (escalation)

Variables: Data Flow Management

Variables carry information between automation actions. They connect outputs from one action to inputs of another.

Variable Types

Trigger Variables: Data from the initiating event
  • trigger.record_id - ID of the record that triggered the event
  • trigger.user_email - Email of the user who caused the event
  • trigger.timestamp - When the event occurred
Action Variables: Outputs from executed actions
  • search_result.customer_name - Customer name from Search Records
  • ai_classification.category - Category from AI Classification
  • new_record.record_id - ID of newly created record

Variable Management

Naming Convention: Use descriptive names like customer_priority_level instead of priority Chaining: Use outputs from one action as inputs to the next Validation: Use IF conditions to check variable values before using them

Logic Actions

IF Conditions

Create decision points in your automation: Basic IF:
IF customer_tier = "Enterprise"
  → Send Message to Teams
  → Make Assignment (priority queue)
IF with OTHERWISE:
IF order_amount > $1000
  → Start Approval Process
OTHERWISE
  → Update Record Fields (auto-approved)
Multiple Conditions:
IF customer_tier = "Enterprise" AND order_amount > $5000
  → Start Approval Process (CFO approval)
OTHERWISE IF customer_tier = "Standard" AND order_amount > $2000
  → Start Approval Process (manager approval)
OTHERWISE
  → Update Record Fields (auto-approved)

Repeat for Each

Process multiple items systematically: Example: Processing Multiple Orders
Search Records (today's orders) → Repeat for Each order:
  → Run Calculation (shipping cost)
  → Update Record Fields (add shipping)
  → Send Email Notification (shipping confirmation)

Communication Actions

Send Email Notification

Sends emails to up to 25 recipients with rich content support. Features:
  • Multiple recipients
  • HTML formatting
  • Variable insertion
  • Attachment support
  • Professional templates
Use Cases:
  • Customer confirmations
  • Team notifications
  • Executive summaries
  • Alert escalations

Send Message to Teams

Integrates with Microsoft Teams for team communication. Example:
High Priority Ticket Created → Send Message to Teams → "High priority ticket #{{ticket_number}} created. Customer: {{customer_name}}. Issue: {{issue_summary}}"

Post Comment

Documents process steps and decisions on records. Example:
AI Classification Complete → Post Comment → "AI classified this ticket as {{category}} with {{confidence}}% confidence"

File Actions

Read File

Extracts information from uploaded documents. Supported Formats: PDF, DOC, DOCX, TXT, CSV, Excel Output: Structured text data for further processing

AI File Analysis

Processes document content intelligently. Contract Analysis: Extract parties, dates, terms, obligations Invoice Processing: Extract vendor, amount, line items, due dates Resume Screening: Extract skills, experience, education Report Analysis: Extract key metrics, trends, insights

Unzip File

Processes multiple files uploaded in archives. Use Case: Process monthly reports uploaded as ZIP files

Data Actions

Run Calculation

Performs mathematical operations automatically. Examples:
  • Calculate shipping costs
  • Determine discounts
  • Compute taxes
  • Analyze metrics

Set Variable

Stores calculated values for later use. Example:
Run Calculation (discount amount) → Set Variable (discount_value) → Update Record Fields (apply discount)

Transform Data with AI

Cleans, normalizes, and enhances data using AI. Address Standardization: “123 main st” → “123 Main Street” Phone Formatting: “5551234567” → “(555) 123-4567” Company Name Matching: “Microsoft Corp” → “Microsoft Corporation”

External Integration

Send API Request

Connects with external systems and services. Examples:
  • Check inventory levels
  • Validate addresses
  • Process payments
  • Update CRM systems

Run Function

Executes custom business logic when built-in actions aren’t sufficient. Use Cases:
  • Complex calculations
  • Custom integrations
  • Specialized processing
  • Advanced analytics

Monitoring and Debugging

Automation History

Track execution details:
  • Execution Status: Success or failure
  • Timestamp: When the automation ran
  • Actions Executed: Steps completed
  • Variables Used: Data passed between actions
  • Error Messages: Detailed failure information

Debugging Strategies

Use Post Comment: Add comments to track progress Check Variable Values: Verify data flows correctly Test Conditions: Ensure IF statements work as expected Monitor Performance: Track execution times Access automation history through the main interface or App Health.

Best Practices

1. Event-Driven Design

Design automations around events rather than tasks:
  • Think: “What event should trigger this process?”
  • Not: “What tasks do I need to automate?“

2. Strategic AI Usage

Use AI actions for:
  • Information categorization
  • Content analysis
  • Decision-making based on data
  • Transforming unstructured data

3. Maintainable Automation

Clear Names: Use descriptive automation names Document Logic: Add comments for complex conditions Test Thoroughly: Verify all automation paths

4. Performance Optimization

Consolidate Similar Automations: Combine related triggers Use Specific Search Criteria: Avoid broad searches Minimize Nested Loops: Avoid complex nested structures

5. Error Handling

Validate Data: Check that variables contain expected values Plan for Failures: Handle external API failures Test with Real Data: Use actual business data for testing

Common Patterns

Customer Journey Automation

Create connected automations for complete customer processes:
Lead Created → Qualification → Proposal → Contract → Onboarding → Support → Renewal

Approval Workflow

Combine AI decision-making with human approval:
Request Created → AI Classification → Route to Appropriate Approver → Decision → Notification → Next Steps

Data Pipeline

Chain multiple data processing steps:
Data Received → AI Analysis → Transform Data → Validation → Storage → Notification

Alert System

Monitor conditions and escalate appropriately:
Condition Met → Assessment → IF Critical → Immediate Alert OTHERWISE → Standard Notification

Troubleshooting

Automation Not Triggering

Check:
  • Automation is published (not draft)
  • Testing with correct event type
  • Record/data meets trigger conditions

Empty Variables

Check:
  • Correct variable names being used
  • Previous action completed successfully
  • Accessing correct variable structure level

AI Actions Not Working

Check:
  • Input data is in expected format
  • Sufficient context provided
  • AI action receiving correct variables

Performance Issues

Check:
  • Search scope is appropriate
  • Number of separate automations
  • Data processing efficiency

Advanced Implementation

Automation Chaining

Create automations that trigger other automations for complex workflows.

Dynamic Variable Creation

Use Set Variable to create data structures that evolve throughout your automation.

Conditional Logic Trees

Build complex decision trees using nested IF conditions for sophisticated business logic.

Integration Patterns

Connect multiple external systems through single automation workflows.
For complete action details and examples, see the Automation Actions Reference. For trigger configuration and use cases, see the Automation Triggers Reference.