Running Automations
Execute automations on devices and collect results
Once your automation is ready, you can run it on connected devices through the dashboard. This guide covers the execution flow and data collection.
The Automation Runner
Access the runner from the DEVICES -> AUTOMATIONS section in your dashboard. The runner allows you to:
Select Devices
Choose one or more connected devices to run the automation on. Each device will execute the automation independently.
Configure Automation Parameters
Fill in automation parameters defined in your project. These are validated before execution starts.
Provide Job Variables
Enter job-specific data like account credentials. These values are accessible via agent.arguments.jobVariables.
Monitor & Collect Results
View collected data, download results, and track automation status in the data section.
Execution Flow
- Select automation from your available automations
- Select devices to run on (must be connected)
- Fill parameters as defined in your automation schema
- Fill job variables for the specific task
- Click Start to begin execution
- Monitor progress via status updates
- View/download results when complete
Parameter Validation
Parameters are validated against your schema before execution:
// Your schema definition{ "fields": [ { "name": "maxRetries", "type": "number", "required": true, "min": 1, "max": 10, "integer": true }, { "name": "targetUrl", "type": "string", "required": true, "pattern": "^https?://.*" } ]}
// Validation errors shown to user:// - "maxRetries: Value must be at least 1"// - "targetUrl: Value does not match pattern"Data Collection
Data submitted via submitTask() is collected and displayed in the runner:
// In your automationawait agent.utils.job.submitTask("success", { email: "user@example.com", orderId: "12345", itemsProcessed: 10, completedAt: new Date().toISOString()});
// Don't forget to stop the automation!stopCurrentAutomation();
// This data appears in the runner as:// | Device | email | orderId | itemsProcessed | completedAt |// |------------|------------------|---------|----------------|----------------------|// | Device-001 | user@example.com | 12345 | 10 | 2024-01-15T10:30:00Z |Downloading Results
Collected data can be downloaded as CSV for analysis:
Click the Download button in the data section to export all collected data as a CSV file. The file includes all fields submitted via submitTask().
Start and Stop Commands
// When you click "Start":POST /api/v1/device/automation{ "device_ids": ["device-001", "device-002"], "automationId": "automation-uuid", "command": "start", "automationParameters": { ... }, "jobVariables": { ... }}
// When you click "Stop":POST /api/v1/device/automation{ "device_ids": ["device-001", "device-002"], "automationId": "automation-uuid", "command": "stop"}Multi-Device Execution
Running on multiple devices simultaneously:
Same Parameters
All selected devices receive the same automation parameters. Use this for consistent configuration across devices.
Same Job Variables
Job variables are also shared. If you need different data per device, you will need to run separate automation jobs with different job variable sets.
Independent Execution
Each device executes independently. One device failing doesn't affect others. Results are collected separately per device.
Status Updates
The runner shows submitted data for each execution (click refresh to update).
Monitoring logs
On the devices page, click on top-right of device card to go to 'live control' page of that device. Click 'Live Automation Logs' to see real-time console logs from the automation running on that device.
Debugging Tips
Check Device Connection
Ensure devices show as "Connected" before starting. Disconnected devices won't receive the automation command.
Review Parameter Values
Double-check parameter values before starting. Invalid values will cause validation errors or unexpected behavior.
Check Console Output
Console logs from your automation are viewable in device logs. Use console.log() liberally for debugging.
Review Submitted Data
Check the collected data table for insights. Failed tasks often include error details in the submitted data.
Requirements Check
Before execution, the system verifies:
- Device meets minimum Android version requirement (only when running through a job)
- Device has minimum app version installed (only when running through a job)
- User has execution permission for the automation
- All required parameters are provided and valid
Version Requirements
If your automation uses features like dpad() orinputKey(), set the minimum Android version to 13+ (API 33) in your project configuration.