Automations
Automations let you define rules that fire automatically when specific events occur — without manual intervention. They are configured once by an admin and then run continuously in the background.
How Automations Work
Event occurs in Aptli
↓
System checks all automations for matching trigger
↓
Conditions evaluated (if any)
↓
Action(s) executed
Automations use an event-driven model. The system does not poll or run on a schedule (for scheduled tasks like nightly alerts, see Work Order notifications below); instead, automations react instantly when the triggering event fires.
Trigger Types
GIS Import Events
| Trigger | When It Fires |
|---|---|
geo.import.created | A file upload is accepted and the import job is queued |
geo.import.completed | The background conversion finishes; features are ready to review |
geo.import.failed | The file conversion fails (error, corrupt file, etc.) |
Context available:
job— the import job record (id, filename, fileType, featureCount, status)actor— the user who uploaded the file (null for system-initiated imports)
Work Order Events
| Trigger | When It Fires |
|---|---|
workorder.created | A new work order is saved |
assignment.statusChanged | Status transitions (pending → in-progress, completed, cancelled) |
assignment.cancelled | A work order is cancelled |
assignment.reassigned | Assigned users change |
assignment.pickupCompleted | A QR pickup scan completes the inventory transfer |
Report and Validation Events
| Trigger | When It Fires |
|---|---|
report.created | A work report is created |
report.submitted | A report is submitted for validation |
report.validated | A report passes validation |
report.rejected | A report is rejected by a validator |
validation.created | A validation record is created |
validation.statusChanged | A validation status transitions |
Project and Task Events
| Trigger | When It Fires |
|---|---|
project.created | A new project is created |
task.created | A new task is created |
Inventory Events
| Trigger | When It Fires |
|---|---|
inventory.created | New inventory is received |
inventory.updated | Existing inventory is modified |
stock.batchReceived | A batch receipt of inventory arrives |
stock.adjusted | A manual stock adjustment is made |
stock.converted | A unit conversion is applied |
stock.transferred | Stock moves between sites |
stock.low | Stock falls below minimum level |
stock.staged.allocated | Staged inventory is allocated to a resource |
User Events
| Trigger | When It Fires |
|---|---|
user.invited | A new user invitation is sent |
user.oauthLinked | A user links an OAuth provider |
user.deactivated | A user account is deactivated |
Help Request Events
| Trigger | When It Fires |
|---|---|
helpRequest.created | A new help request is submitted |
helpRequest.statusChanged | A help request status changes |
Version and File Events
| Trigger | When It Fires |
|---|---|
version.submittedForReview | A GIS version is submitted for admin review |
version.committed | A GIS version is committed (goes live) |
file.uploaded | A file attachment is uploaded |
file.quarantine_failed | A file fails the security scan |
file.deleted | A file attachment is deleted |
Scheduled Triggers
| Trigger | When It Fires |
|---|---|
schedule.daily | Once per day |
schedule.weekly | Once per week |
schedule.monthly | Once per month |
Conditions
Conditions narrow when an automation fires. They are evaluated against the event context. Examples:
job.fileType == 'gdb'— only fire for GDB importsworkOrder.status == 'completed'— only fire on completion, not cancellationactor.email endsWith '@myorg.com'— only fire for internal usersjob.featureCount > 1000— only fire for large imports
Conditions use a simple expression language. Multiple conditions are ANDed together (all must pass).
Actions
The following action types are available when building automations:
| Action | Description |
|---|---|
send_notification | Send a push notification to a user or group |
send_email | Send an email to a user or group |
call_webhook | POST a JSON payload to an external HTTPS URL |
create_workorder | Create a new work order |
create_assignment | Create a new assignment |
create_task | Create a new task |
update_field | Update a field on the triggering record |
run_calculation | Execute a configured calculation rule |
send_notification / send_email
Parameters:
to— user ID, role name, orcreator/assignedTokeywordssubject— email subject line (supports template variables)body— message body (template variables:{{job.filename}},{{workOrder.name}}, etc.)channel—email,push, orboth
call_webhook
POST a JSON payload to an external URL.
Parameters:
url— HTTPS endpoint to callheaders— optional custom headers (e.g., Authorization)includeContext— whether to include the full event context in the payload
Creating an Automation
- Navigate to Admin → Automations
- Click New Automation
- Fill in:
- Name — descriptive label
- Trigger — select from the trigger type list
- Conditions (optional) — add filter expressions
- Actions — add one or more actions
- Set Active toggle to enable
- Click Save
Testing an Automation
From the automation detail page:
- Click Test Run
- Select a sample event from recent activity (or paste a JSON context manually)
- Click Run — the system evaluates conditions and executes actions in a dry-run mode (actions are logged but not actually sent / called)
- Review the test output for errors
Monitoring
The Automation History tab shows:
- Last 50 executions
- Trigger event that fired it
- Conditions result (pass / skip)
- Action results (success / error per action)
- Timestamp and duration
Failed actions appear in red. Click a row to see the full error.
Best Practices
Start with notifications. The most common use case is sending an alert when a job completes or fails. Test this before building complex chains.
Use conditions liberally. An automation that fires on every event is noisy. Add conditions to target only the situations that matter.
Keep actions idempotent. If an automation fails partway and retries, the actions should be safe to run twice (e.g., send-email is idempotent because a duplicate notification is at worst annoying, not harmful).
Avoid long chains. Automations that trigger other automations are powerful but hard to debug. Document the chain clearly in the automation names and descriptions.
Permissions
| Action | Required Right |
|---|---|
| View automations | automationsView |
| Create / edit automations | automationsModify |