2301 Understanding Automation
Understanding Automation in Tadabase
Automation Fundamentals
The Anatomy of Automation
1. Triggers
Types of Triggers
- Record Created - Runs when a new record is added to the table
- Record Edited - Runs when an existing record is modified
- Record Created or Edited - Runs on both creation and modification
- Form Submitted - Runs when a specific form is submitted
- Action Link Clicked - Runs when a user clicks an action button
- Scheduled Time - Runs at specific times or intervals
2. Conditions
Condition Logic
- Equals - Field value matches exactly
- Does not equal - Field value doesn't match
- Is greater than - Numeric or date comparisons
- Is less than - Numeric or date comparisons
- Contains - Text field includes specific text
- Is empty - Field has no value
- Is not empty - Field has any value
- Is during the last X days - Date-based conditions
Combining Conditions
- AND - All conditions must be true
- OR - At least one condition must be true
Example (AND): Status equals "Pending" AND Total is greater than $1,000
Example (OR): Priority equals "High" OR Days Overdue is greater than 30
3. Actions
Available Actions
- Update This Record - Modify fields in the current record
- Update Connected Records - Modify related records in connected tables
- Insert Connected Record - Create a new related record in a connected table
- Insert New Record - Create a new record in any table
- Send Email - Send email notifications with dynamic content
- Send SMS - Send text messages to mobile numbers
- Generate PDF - Create PDF documents from templates
The Four Types of Automation
1. Table Rules
Characteristics
- Location: Data Builder → Select Table → Rules Tab
- Scope: Database-level, applies to all data entry methods
- Triggers: Record Created, Record Edited, Record Created or Edited
- Execution: Automatic, runs in the background
When to Use Table Rules
- Enforcing data integrity across all entry points (forms, API, imports)
- Applying core business logic that should always execute
- Cascading updates to related records
- Logging changes for audit purposes
- Maintaining calculated fields or summaries
Example Scenario
Scenario: In a CRM, whenever a Lead is created, automatically set the "Status" to "New", "Date Added" to current date, and "Assigned To" to the logged-in user.
This should be a Table Rule because it must happen regardless of how the lead is created—whether through a web form, mobile app, API integration, or data import.
2. Record Rules
Characteristics
- Location: Page Builder → Edit Form Component → Rules Tab → Record Rules
- Scope: Form-specific, only runs for that specific form
- Triggers: Form submission (creation or editing)
- Execution: Automatic when the form is submitted
When to Use Record Rules
- Auto-populating fields based on form data
- Different automation for different forms on the same table
- Creating related records specific to a workflow
- Implementing form-specific business logic
- Using values entered in the form to update other records
Example Scenario
Scenario: You have two forms for creating Support Tickets: a "Customer Portal Form" and an "Internal Form". When customers submit tickets, you want to automatically set Priority to "Medium" and create a notification for support staff. When staff create tickets internally, you want to set Status to "In Progress" immediately.
This should be Record Rules (one for each form) because the automation differs based on which form is used, even though both forms create records in the same table.
3. Action Rules
Characteristics
- Location: Page Builder → Edit Component → Links Tab → Action Link → Action Rules
- Scope: User-initiated, requires explicit action
- Triggers: User clicks the action link/button
- Execution: Manual trigger, immediate execution
When to Use Action Rules
- Actions requiring user confirmation or decision
- Approval workflows and status changes
- Optional actions that shouldn't happen automatically
- Performing actions on demand (send email, generate PDF)
- Multi-step processes where users control the flow
Example Scenario
Scenario: In a purchase order system, managers need to approve orders over $5,000. When they click "Approve", the system should update the status to "Approved", send an email to the requester and purchasing department, set the approval date, and create an audit log entry.
This should be an Action Rule because approval requires an explicit manager decision. It shouldn't happen automatically—the manager reviews the order and chooses to approve or deny it.
4. Scheduled Tasks
Characteristics
- Location: Automation → Scheduled Tasks
- Scope: Batch processing, can affect many records
- Triggers: Time-based schedules (daily, weekly, monthly, custom)
- Execution: Automatic at scheduled times
When to Use Scheduled Tasks
- Sending recurring reminders or notifications
- Batch processing at specific intervals
- Generating periodic reports
- Data cleanup and maintenance
- Updating records based on time conditions
- Creating recurring invoices or subscriptions
Example Scenario
Scenario: A rental management system needs to generate monthly invoices on the 1st of each month for all active leases, send reminder emails to tenants 5 days before rent is due, and mark leases as "Overdue" if payment hasn't been received within 5 days of the due date.
These should be Scheduled Tasks because they need to process multiple records at specific times on a recurring schedule.
Comparing Automation Types
| Feature | Table Rules | Record Rules | Action Rules | Scheduled Tasks |
|---|---|---|---|---|
| Trigger | Record change | Form submit | User click | Time/schedule |
| Scope | All data entry | Specific form | User-initiated | Batch/multiple records |
| Execution | Automatic | Automatic | Manual | Automatic |
| Location | Data Builder | Form Component | Action Link | Automation Section |
| Best For | Core business logic | Form-specific automation | User decisions | Recurring workflows |
Automation Best Practices
1. Choose the Right Type
- Should this happen always? → Table Rule
- Is this form-specific? → Record Rule
- Do users need to trigger this? → Action Rule
- Should this run on a schedule? → Scheduled Task
2. Start Simple, Then Build Complexity
3. Use Descriptive Names
- Good: "Set Lead Status to New on Creation"
- Bad: "Rule 1"
4. Document Your Rules
- What the rule does
- Why it exists
- Any special considerations
- Dependencies on other rules
5. Avoid Circular Logic
- Rule A updates Record X → triggers Rule B → updates Record X → triggers Rule A again
- Use conditions to prevent endless loops
- Consider using "Record Created" instead of "Record Created or Edited" when appropriate
6. Test with Sample Data
- Create test records to verify rules work as expected
- Check that conditions filter correctly
- Ensure actions produce the desired results
- Verify email content and recipients
7. Use Conditions Wisely
- Don't send emails if the email field is empty
- Don't create related records if they already exist
- Don't update records unless values have changed
8. Consider Performance
- Limit the number of rules on frequently-modified tables
- Use specific conditions to reduce processing
- Avoid complex nested loops in scheduled tasks
- For scheduled tasks, consider processing only changed records
9. Plan Your Automation Strategy
- What needs to be automated
- Which automation type fits each need
- How rules interact with each other
- The order in which actions should execute
10. Organize with Folders
- Group related rules in folders
- Use consistent naming conventions
- Keep active rules separate from disabled/testing rules
Common Automation Patterns
Pattern 1: Auto-Populate Fields
Scenario: When creating a task, auto-populate the "Assigned To" field with the logged-in user and "Date Created" with the current date.
Solution: Use a Record Rule or Table Rule
- Action: Update This Record
- Condition: Always (or only when fields are empty)
- Values: Set "Assigned To" to Auto Logged User, "Date Created" to Current Date
Pattern 2: Cascade Updates
Scenario: When a project's status changes to "Completed", update all associated tasks to "Completed" as well.
Solution: Use a Table Rule
- Trigger: Record Edited
- Condition: Status equals "Completed"
- Action: Update Connected Records (Tasks)
- Values: Set Task Status to "Completed"
Pattern 3: Approval Workflow
Scenario: Managers approve expense reports by clicking an "Approve" button, which updates status, sends notifications, and logs the approval.
Solution: Use an Action Rule
- Trigger: User clicks "Approve" action link
- Actions:
- Update This Record: Set Status to "Approved", Approval Date to Current Date
- Send Email: Notify the submitter
- Insert New Record: Create audit log entry
Pattern 4: Recurring Reminders
Scenario: Every day at 8 AM, send reminder emails to customers with appointments scheduled for that day.
Solution: Use a Scheduled Task
- Schedule: Daily at 8:00 AM
- Table: Appointments
- Condition: Appointment Date equals Today AND Status equals "Confirmed"
- Action: Send Email with appointment details
Pattern 5: Create Related Records
Troubleshooting Automation
Rule Not Executing
- Check if the rule is enabled - Rules can be disabled via toggle
- Verify conditions - Ensure the conditions match your test data
- Check trigger type - Is it set to "Record Created" but you're editing a record?
- Review field values - Are you comparing the right field types?
Wrong Values Being Set
- Check field mappings - Ensure you're setting the correct fields
- Verify value sources - Custom value vs Form value vs Connected value
- Check data types - Text fields can't be set to date values
- Review order of execution - Multiple rules may be overwriting each other
Emails Not Sending
- Verify email addresses - Ensure the email field has valid addresses
- Check conditions - Is the condition preventing the email action?
- Review email content - Ensure merge fields are correctly formatted
- Check plan limits - Some plans have email sending limits
Performance Issues
- Too many rules - Consolidate rules where possible
- Circular triggers - Rules triggering each other repeatedly
- Complex conditions - Simplify or optimize condition logic
- Batch operations - For scheduled tasks, process records in smaller batches
Building an Automation Strategy
Step 1: Identify Repetitive Tasks
- What do users do repeatedly?
- What data gets copied from one place to another?
- What emails are sent manually?
- What updates happen on a schedule?
Step 2: Map Business Logic
- What should happen when X occurs?
- What conditions must be met before Y happens?
- Who needs to be notified when Z changes?
Step 3: Choose Automation Types
- Must it always happen? → Table Rule
- Is it form-specific? → Record Rule
- Does it need user approval? → Action Rule
- Should it run on a schedule? → Scheduled Task
Step 4: Implement in Phases
- Start with critical automation (data integrity, required fields)
- Add user convenience features (auto-populate, notifications)
- Implement approval workflows
- Set up scheduled tasks and batch processing
Step 5: Test and Refine
- Test with real-world scenarios
- Gather user feedback
- Monitor for errors or unexpected behavior
- Refine conditions and actions as needed
Real-World Automation Examples
Example 1: CRM Automation
Scenario: Sales team uses a CRM to manage leads and opportunities.
Automation Strategy:
- Table Rule: When Lead is created, set Status to "New", Date Added to current date
- Record Rule: When Lead form is submitted by website, set Source to "Website" and notify sales team
- Action Rule: "Convert to Customer" button creates customer record, updates lead status, sends welcome email
- Scheduled Task: Daily task to find leads with no activity in 30 days and mark as "Cold"
Example 2: Help Desk System
Scenario: Support team manages customer tickets.
Automation Strategy:
- Table Rule: When ticket is created, assign ticket number, set "Date Opened" to current date
- Record Rule: When customer submits ticket form, create notification for support team, send confirmation email to customer
- Action Rule: "Resolve Ticket" button updates status, sends resolution email, creates satisfaction survey
- Scheduled Task: Hourly task to escalate tickets open more than 24 hours with no response
Example 3: E-Commerce Order Processing
Scenario: Online store processes customer orders.
Automation Strategy:
- Table Rule: When order is created, calculate totals, set order number, update inventory
- Record Rule: When checkout form submitted, create order, send confirmation email, create shipping record
- Action Rule: "Ship Order" button updates status, generates shipping label PDF, sends tracking email
- Scheduled Task: Daily task to process subscription renewals and generate recurring orders
Next Steps
- Table Rules - Creating database-level automation
- Record Rules - Building form-specific automation
- Action Rules - Implementing user-triggered workflows
- Scheduled Tasks - Setting up time-based batch processing
We'd love to hear your feedback.