Base Concepts Creating the First Flow Creating a Custom Widget Main Screens Triggers Conditions Actions
Actions Answer Ringing Call Call Number Clear Automagic Log Close System Dialogs Connect/Disconnect Bluetooth Device Control Audio Player Control UI Copy File Copy Files Copy Text from Clipboard Copy Text to Clipboard Create Calendar Event Create Directories Delete Files Dismiss Slide to Unlock Keyguard Download URL Dropbox Delete Files Dropbox Download Files Dropbox Upload File Dropbox Upload Files Enable WiFi Access Point End Call Execute Command Execute Flows Execute Root Command Export Flows/Widgets Flashlight FTP Delete Files FTP Download Files FTP Upload File FTP Upload Files Gleeo Create Entry
Gleeo Filesystem Export Gleeo Start Recording Gleeo Stop Recording Google Drive Delete Files (Experimental) Google Drive Download Files (Experimental) Google Drive Upload Files (Experimental) Hide Custom Widget Overlay HTTP Request Import Flows/Widgets Init Variable File List Init Variable Image File Init Variable Location Init Variable Random Number Init Variable System Setting Init Variable Text File Init Variables Call Log Init Variables Device Orientation Init Variables File Info Init Variables Gleeo Recording Init Variables Phone Info Input Dialog Input Speech (Experimental) Kill App Kill App Process Launch App Launch Shortcut Lock Device Mail with Gmail Map Values Message Dialog Modify Call Log Modify Image Move Files Notification on Screen Notification on Statusbar Open URL in Browser Perform Action on Notification on Statusbar Plugin (Experimental) Post Tweet Post Twitter Direct Message Query Content Provider Reboot Remove Notification Missed Calls Remove Notification on Statusbar Request Sync Reregister Media Button Receiver Restore Audio Volumes Save Variable in Image File Scan Barcode Script Send Broadcast Send SMS Send Wake on LAN Packet Set Airplane Mode Set Alarm Set Audio Manager Mode Set Audio Volume Set Auto Sync State Set Auto-rotate Screen State Set Bluetooth SCO State Set Bluetooth State Set Bluetooth Tethering State
Set Car UI Mode Set Data Roaming State Set Default Input Method Set Default Ringtone Set Flow State Set GPS State Set Keyguard State Set Lock Pattern State Set Lock PIN/Password Set Microphone Mute Set Mobile Datanetwork State Set Mobile Network Mode (2G/3G) Set Network Location State Set NFC State Set Night Mode Set Ringer Mode Set Screen Brightness Set Screen Orientation Set Screen Timeout Set Speakerphone State Set System Locale Set System Setting Set Telephony Radio State Set Timer Set USB Debugging State Set USB Tethering State Set Vibrate on Ring State Set Wallpaper Set WiFi Access Point Priority Set WiFi Sleep Policy Set WiFi State Set Wifi Tethering State Show Call Log Show Custom Widget Overlay Show Home Screen Show Input Method Selector Shutdown Silence Ringer Sleep Sound Speech Output Start Activity Start Daydream Start Recording Audio Start Service Stop Action Sound Stop Action Speech Output Stop Flows Stop Recording Audio Store Audio Volumes Take Picture Turn Screen On Unzip Files Vibrate Voice Search (Experimental) WiFi Reassociate WiFi Scan Write HTTP Response File (Experimental) Write HTTP Response Text (Experimental) Write to File Write to Log Zip Files
Answer Ringing Call
The action Answer Ringing Call answers the currently-ringing call. Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Examples: Automatically answer a call when you are prepared to answer calls but don't have your hands free. Settings
Method Defines the method to use to answer the call.
Call Number
The action Call Number calls a number by opening the telephone application and directly calling the supplied number. Example: Automatically call a contact at 6pm. Settings Number The number to call. Variables are supported. Directly initiate call Whether the call should be initiated automatically or to only start the dialer interface without calling the number.
Clear Automagic Log
The action Clear Automagic Log clears the internal log of Automagic (not the log on the SD-card when enabled in the preferences).
Close System Dialogs
The action Close System Dialogs closes system dialogs like the expanded notification area, the expanded quick settings or the power-menu.
Whether dialog is classified as a system dialog or not is controlled by the dialog itself. Regular dialogs and windows can not be closed using this action.
Connect/Disconnect Bluetooth Device
The action Connect/Disconnect Bluetooth Device tries to connect/disconnect to/from a paired bluetooth device (Android 3+ required).
Warning: This function is not officially supported by Android and might not work on all devices.
Examples: Connect to the bluetooth headset when a shortcut is pressed. Settings Bluetooth Profile Defines the type of connection to establish. Bluetooth Device Address The address of the bluetooth device. Variables are supported. Bluetooth Device Name The name of the bluetooth device. Connect or disconnect Whether to connect or disconnect.
Control Audio Player
The action Control Audio Player can launch and control the default audio player of Android. Note that device and manufacturer specific audio players will probably not work. Warning: This function is not officially supported by Android and might not work on all devices.
Examples: Pause the audio player when the headphones are disconnected.
Settings Control Type
Defines the method used to control the media player: Media Button: Simulates the press of a media button Broadcast: Sends a broadcast to the audio service Media Button
The button to press (not all apps handle all buttons): Play: Starts to play (Android >3) Play/Pause: Toggles between play and pause Pause: Pauses the audio player (Android >3) Stop: Stops the audio player Previous: Plays the previous track Next: Plays the next track Fast forward: Fast forward Rewind: Rewind Eject: Ejects the media (for example a CD tray) (Android >3) Close: Closes the media tray (for example a CD tray) (Android >3) Record: Starts to record (Android >3) Track: Switches the audio track (Android >4.4) send to specified app Whether to let the system choose the app to handle the media button or if the media button event should be sent to a specific app. This is mostly useful when multiple audio players are installed and the event is not handled by the desired player. Package Name The app to send the media button event to. Variables are supported. Class Name The component inside the app that should handle the media button. Variables are supported. Action The action to execute: Launch: Launches the audio player Play: Starts to play Play/Pause: Toggles between play and pause Pause: Pauses the audio player Stop: Stops the audio player Previous: Plays the previous track Next: Plays the next track Cycle Repeat: Activates the next cycle mode Toggle Shuffle: Toggles the shuffle mode on/off
Control UI
The action Control UI uses the accessibility features of the device to control the user interface and allows to automatically press buttons, long-click elements, scroll lists and change the values of checkboxes and radio buttons. Note: This action controls the user interface by simulating user input, therefore the screen has to be active, unlocked and the user interface must be showing on screen.
The accessibility service of Automagic needs to be enabled in the preferences for this action to work. At least Android 4.1 (Jelly Bean) is required.
Examples: Start the location settings page and enable/disable GPS. Start the device update check by pressing the "Check now" button. Settings Script
Defines the actions to execute. See action Script for a description of the basic features of the scripting language. Warning: The following example scripts are highly device specific! Please only use the scripts for reference and don't just copy/paste the scripts. It might click the wrong control elements on your device.
Clear all notifications: notifications();//to expand the notifications
sleep(1000);//wait one second for animations to complete
clicked = click("Clear all notifications");//click the button if(not clicked) //check whether the button has been successfully clicked { }
back();//hide the notification when the clear button was not available
Toggle GPS on/off: Use an action Launch App: Settings/Location services to directly start the GPS settings page sleep(1000);//wait for settings page to show
click("GPS satellites");//toggle setting on/off sleep(500);
back();//go back to the previous screen
Open the Apps drawer: home();//ensure the main home screen is showing
sleep(1000);//wait one second for animations to complete click("Apps");//open the apps drawer
Supported Functions Boolean sleep(Number milliseconds)
Waits for the specified amount of milliseconds. Boolean sleep(String duration)
Waits for the specified amount of milliseconds. Boolean back()
Presses the back key. Boolean home()
Presses the home key. Boolean notifications()
Opens the notifications.
Boolean quickSettings()
Opens the quick settings. Boolean recents()
Opens the recent application list. Boolean click(String pattern)
Clicks on the element containing the given glob pattern. Boolean click(Number x, Number y)
Clicks on the element at the specified location. Boolean longclick(String pattern)
Longclicks on the element containing the given glob pattern. Boolean longclick(Number x, Number y)
Longclicks on the element at the specified location. Boolean check(String pattern)
Checks the element containing the given glob pattern. Boolean check(Number x, Number y)
Checks the element at the specified location. Boolean isChecked(String pattern)
Tests whether the element containing the given glob pattern is checked. Boolean isChecked(Number x, Number y)
Tests whether the element at the specified location is checked. Boolean uncheck(String pattern)
Unchecks the element containing the given glob pattern. Boolean uncheck(Number x, Number y)
Unchecks the element at the specified location. Boolean scrollForward(String pattern)
Scrolls the element containing the given glob pattern. Boolean scrollForward(Number x, Number y)
Scrolls the element at the specified location. Boolean scrollBackward(String pattern)
Scrolls the element containing the given glob pattern. Boolean scrollBackward(Number x, Number y)
Scrolls the element at the specified location. Boolean select(String pattern)
Selects the element containing the given glob pattern. Boolean select(Number x, Number y)
Selects the element at the specified location. Boolean clearSelection(String pattern)
Unselects the element containing the given glob pattern. Boolean clearSelection(Number x, Number y)
Unselects the element at the specified location. Boolean expand(String pattern)
Expands the element containing the given glob pattern. (Android 4.4+) Boolean expand(Number x, Number y)
Expands the element at the specified location. (Android 4.4+) Boolean collapse(String pattern)
Collapses the element containing the given glob pattern. (Android 4.4+) Boolean collapse(Number x, Number y)
Collapses the element at the specified location. (Android 4.4+) Boolean cut(String pattern)
Cuts the text of the element containing the given glob pattern. (Android 4.3+) Boolean cut(Number x, Number y)
Cuts the text of the element at the specified location. (Android 4.3+) Boolean copy(String pattern)
Copies the text of the element containing the given glob pattern. (Android 4.3+) Boolean copy(Number x, Number y)
Copies the text of the element at the specified location. (Android 4.3+) Boolean paste(String pattern)
Pastes text to the element containing the given glob pattern. (Android 4.3+) Boolean paste(Number x, Number y)
Pastes text to the element at the specified location. (Android 4.3+) Boolean dismiss(String pattern)
Dismisses the element containing the given glob pattern. (Android 4.4+) Boolean dismiss(Number x, Number y)
Dismisses the element at the specified location. (Android 4.4+) String getText(String pattern)
Returns the text of the element containing the given glob pattern. String getText(Number x, Number y)
Returns the text of the element at the specified location. List getBounds(String pattern)
Returns the bounds of the element containing the given glob pattern in a list with the values [x, y, width, height]. Boolean sendKey(Number keyCode)
Simulates the specified key (Automagic input method required). Boolean sendKey(String keyCodeName)
Simulates the specified key (Automagic input method required). Boolean sendText(String text)
Sends the text to the focused component (Automagic input method required). Boolean setText(String text)
Sets the text of the focused component (Automagic input method required). Boolean setSelection(Number start, Number end)
Sets the selection of the focused component (Automagic input method required).
Boolean selectAll()
Selects the text of the focused component (Automagic input method required).
Copy File
The action Copy File locally copies a file.
Examples: Create a weekly backup of the Automagic flows to a file containing the timestamp
Settings Source File The absolute path of the file to copy. Variables are supported.
Examples: /mnt/sdcard/export_{triggertime,dateformat,yyyy_MM_dd}.csv becomes /mnt/sdcard/ export_2011_02_13.csv
Target File (including filename) The absolute path of the target file. The path has to include the filename of the target file. Variables are supported.
Copy Files
The action Copy Files locally copies one or a list of files to the specified target directory or file.
Examples: Backup all files in directory /mnt/sdcard/xyz/ to the folder /mnt/sdcard/xyz_backup/ Settings Source Files
A comma separated list of files or directories to copy. Glob patterns can be used to match multiple files. Variables are supported.
Examples: /mnt/sdcard/export* matches all files with a name starting with export in folder /mnt/sdcard
When multiple files are matched the target has to be a directory. The directory will be created when it does not exist yet.
A directory with an ending slash (like /mnt/sdcard/) matches the files contained in the directory like using /mnt/sdcard/*.
Target
The absolute path of the target file or directory. Variables are supported. Show progress notification Whether or not to show a notification on the statusbar indicating the progress of the operation.
Copy Text from Clipboard
The action Copy Text from Clipboard copies the text on the clipboard to the specified variable.
Examples: Send the text on the clipboard directly by sms or text.
Settings Variable The name of the variable to store the content of the clipboard.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables clip_data
the text of the clipboard
Copy Text to Clipboard
The action Copy Text to Clipboard copies the specified text to the clipboard.
Examples: Copy the scanned barcode value to the clipboard to paste it in the browser. Copy the text of an incoming SMS to the clipboard to paste it in a mail.
Settings Text The text to copy to the clipboard. Variables are supported.
Create Calendar Event
The action Create Calendar Event creates an event on the specified calendar of the device (Android 4+ required)
Examples: create a calendar event based on the text of a received SMS create a calendar event for every received call
Settings Calendar The name of calendar to create the event in. Variables are supported. Start/End Type Whether the event should be created relative to the time when the action is executed or absolute. Start in The start offset of the event from now. 1h creates an event that starts in one hour. Variables are supported. Duration The desired duration of the event like 1h or 45m. Variables are supported. From A script whose last statement must evaluate to a date (milliseconds since 1970) to use as the start time of the event. To A script whose last statement must evaluate to a date (milliseconds since 1970) to use as the end time of the event. All day When checked creates an event lasting the whole day, the event spans all days intersecting the time span specified in Start in/Duration or From/To. Title The title. Variables are supported. Description The description. Variables are supported. Location The event location. Variables are supported. Reminders The reminders to create. Variables are supported. Event Availability The availability (not all calendars support Tentative).
Create Directories
The action Create Directories locally creates one or multiple directories.
Examples: Create a target directory /mnt/sdcard/backup/ before copying files into this directory Settings Directories
A comma separated list of directories to create. Variables are supported.
Delete Files
The action Delete Files locally deletes one or multiple files or folders including contained files.
Examples: Monthly delete all files in the /mnt/sdcard/download/ folder Settings Source Files
A comma separated list of files or directories to delete. Glob patterns can be used to match multiple files. Variables are supported.
Examples: /mnt/sdcard/download/* matches all files and subfolders in the download directory
Show progress notification Whether or not to show a notification on the statusbar indicating the progress of the operation.
Dismiss Slide to Unlock Keyguard
The action Dismiss Slide to Unlock Keyguard unlocks the device when the slid-to-unlock keyguard is used. This action can not unlock a secure keyguard that requires to enter a password, PIN or pattern. Warning: This function is not officially supported by Android and might not work on all devices.
Some devices require that the screen is off to dismiss the keyguard.
Some devices turn off the screen when the keyguard is dismissed. You can mitigate the problem by adding an action Turn Screen On to the flow after dismissing the keyguard.
Download URL
The action Download URL directly downloads a file in the background to the defined directory.
Examples: Download a PDF newspaper every morning
Settings URL The URL to download. Variables can be used to create dynamic urls based on time.
Examples: http://example.com/newspaper_{triggertime,dateformat,yyyyMMdd}.pdf becomes http://example.com/
newspaper_20110213.pdf
Directory The directory to place the downloaded file in Show progress notification Whether or not to show a notification on the statusbar indicating the progress of the operation.
Dropbox Delete Files
The action Dropbox Delete Files deletes the defined files on Dropbox.
Examples: Delete all files in a folder before uploading new files to this folder to get rid of files you don't need anymore.
Settings Dropbox Access Whether Dropbox access is currently possible or not and allows to sign in to your Dropbox account. Dropbox Paths
A comma separated list of files or directories to delete on Dropbox. Glob patterns can be used to match multiple files. Variables are supported.
Examples: /backup/export* matches all files with a name starting with export in folder /backup
Show progress notification Whether or not to show a notification on the statusbar indicating the progress of the operation.
Dropbox Download Files
The action Dropbox Download Files downloads multiple files and directories recursively to your device. Warning: This action downloads all specified files and overwrites already existing target files. The files will be downloaded even when the same file already exists on the device. Warning: Dropbox limits the amount of data each user can transfer.
Examples: Download each morning the newest file of keypass containing your passwords to ensure you have the newest offline copy available.
Settings Dropbox Access Whether Dropbox access is currently possible or not and allows to sign in to your Dropbox account. Dropbox Paths
A comma separated list of files or directories to download from Dropbox. Glob patterns can be used to match multiple files. Variables are supported.
Examples: /backup/export* matches all files with a name starting with export in folder /backup
Target The absolute path of the target directory to download the files to. Variables are supported. Show progress notification Whether or not to show a notification on the statusbar indicating the progress of the operation.
Dropbox Upload File
The action Dropbox Upload File uploads one file to your Dropbox.
Examples: Upload a backup of all data in Gleeo Time Tracker to the your Dropbox
Settings Dropbox Access Whether Dropbox access is currently possible or not and allows to sign in to your Dropbox account. Local File The absolute path of the local file to upload. Variables are supported.
Examples: /mnt/sdcard/export_{triggertime,dateformat,yyyy_MM_dd}.csv becomes /mnt/sdcard/ export_2011_02_13.csv
Path on Dropbox (including filename) The absolute path of the file on Dropbox. The path has to include the filename of the target file. This allows you to store the file using a different name on your Dropbox. Variables are supported. Show progress notification Whether or not to show a notification on the statusbar indicating the progress of the operation.
Dropbox Upload Files
The action Dropbox Upload Files uploads one or multiple files and directories recursively to your Dropbox. Warning: This action uploads all specified files and overwrites already existing target files. The files will be uploaded even when the same file already exists on Dropbox. Warning: Dropbox limits the amount of data each user can transfer.
Examples: Upload a backup of all data in Gleeo Time Tracker to the your Dropbox
Settings Dropbox Access Whether Dropbox access is currently possible or not and allows to sign in to your Dropbox account. Source Files
A comma separated list of files or directories to upload to Dropbox. Glob patterns can be used to match multiple files. Variables are supported.
Examples: /mnt/sdcard/export* matches all files with a name starting with export in folder /mnt/sdcard
Path on Dropbox The absolute path of the target on Dropbox to upload the files to. Variables are supported. Show progress notification Whether or not to show a notification on the statusbar indicating the progress of the operation.
Enable WiFi Access Point
The action Enable WiFi Access Point enables one of the access point configurations and optionally prevents to connect to other access points by disabling them.
Examples: Enable a free access point at home and disable a paid access point.
Settings SSID The SSID of the access point configuration to enable. Disable other access points Whether to disable all other access point configurations or not.
End Call
The action End Call hangs up the current call. Warning: This function is not officially supported by Android and might not work on all devices.
Example: Let the phone call home for 15 seconds and automatically terminate the call to notify something.
Execute Command
The action Execute Command executes a shell command and stores the output in variables.
Examples: ls -l to list all files in the working directory
ps to store the running processes in the defined variable ps > file.txt to store the running processes in a file cat file1.txt > file2.txt
to copy a file cat /proc/wakelocks to show the wake locks preventing your device from sleeping
String variables are replaced before the command is passed to the interpreter.
You can use this for example to create a filename based on the current date: ps > file-
{triggertime,datetime,yyyyMMdd}.txt.
Special characters in the command have to be escaped using backslash or placed in quotes as appropriate: cat 'Test File1.txt' > 'Test File2.txt' cat Test\ File1.txt > Test\ File2.txt
Settings Command
Enter the shell command to execute in this field. The command is passed to /bin/sh to be interpreted. The available commands vary from device to device.
Working Directory The path the command is executed in. Variable to store the standard output The output written by the command to the standard output is stored in the variable defined in this field. Variable to store the error output The output written by the command to the error output is stored in the variable defined in this field. Variable to store the exit code The exit code of the command is stored in the variable defined in this field.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables stdout
the standard output of the command stderr
the standard error output of the command exit_code
the exit code of the command
Execute Flows
The action Execute Flows executes one or multiple flows specified in the field Flow pattern list.
The executed flow will inherit the execution context with all variables of the parent flow.
The variables usually supplied by the trigger of the target flow will not be available since the trigger of the target flow is bypassed when using this action.
Examples: Execute all flows with the words battery save in the name when the battery reaches a critical level Settings Flow pattern list A comma separated list of flow names to execute. Glob patterns * and ? can be used to match similar named flows.
Examples: Test Flow
Test Flow, SMS Flow *battery save*
Exclude flow pattern list A comma separated list of flow names to not execute even when the field Flow pattern list includes the flow. Wait for called flows to finish Whether the action should wait until all called flows have been finished or not. Return variables to the calling flow Whether the local variables of the called flow should be returned to the calling flow.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables flow_count
the number of flows to execute
Execute Root Command
The action Execute Root Command executes a shell command as root by passing the command to su and stores the output in variables. Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Examples: reboot to reboot the device reboot -p to shutdown
String variables are replaced before the command is passed to the interpreter.
You can use this for example to create a filename based on the current date: ps > file-
{triggertime,datetime,yyyyMMdd}.txt.
Special characters in the command have to be escaped using backslash or placed in quotes as appropriate: cat 'Test File1.txt' > 'Test File2.txt' cat Test\ File1.txt > Test\ File2.txt
Settings Command
Enter the shell command to execute in this field. The command is passed to su to be interpreted. The available commands vary from device to device.
Working Directory The path the command is executed in. Variable to store the standard output The output written by the command to the standard output is stored in the variable defined in this field. Variable to store the error output The output written by the command to the error output is stored in the variable defined in this field. Variable to store the exit code The exit code of the command is stored in the variable defined in this field.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables stdout
the standard output of the command
stderr
the standard error output of the command exit_code
the exit code of the command
Export Flows
The action Export Flows exports the selected flows to the specified file.
Examples: Export all flows to a file and upload the file to Dropbox as a backup
Settings Flow pattern list A comma separated list of flow names to export. Glob patterns * and ? can be used to match similar named flows. Variables are supported.
Examples: Test Flow
Test Flow, SMS Flow *time tracking*
Exclude flow pattern list A comma separated list of flow names to not export even when the field Flow pattern list includes the flow. Glob patterns * and ? can be used to match similar named flows. Variables are supported. Widget pattern list A comma separated list of widget names to export. Glob patterns * and ? can be used to match similar named widgets. Variables are supported.
Exclude widget pattern list A comma separated list of widget names to not export even when the field Widget pattern list includes the widget. Glob *
?
patterns
and
can be used to match similar named widgets. Variables are supported.
Target File The path of the target file. Variables are supported.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables export_path
the path of the created file
Flashlight
The action Flashlight enables or disables the flashlight of the device.
Examples: Turn on or off the flashlight using a toggle widget.
Settings Flashlight Whether to turn the flashlight on or off.
FTP Delete Files
The action FTP Delete Files deletes the files specified on the FTP server.
Examples: Recursively delete all files in a directory on the server before uploading new files
Settings Server/Port The name or IP and port (default 21) of the FTP server. Variables are supported. Username The username to connect. Variables are supported. Password The password to connect. Variables are supported. Paths on Server
A comma separated list of files or directories to delete on the server. Glob patterns can be used to match multiple files. Variables are supported.
Examples: /pub/export* matches all files with a name starting with export in folder /pub
Control Encoding Whether to use a special encoding for the control channel or not (Encoding of file names, not the encoding of the content of text files). Variables are supported. Show progress notification Whether or not to show a notification on the statusbar indicating the progress of the operation.
FTP Download Files
The action FTP Download Files downloads files and folders stored on an FTP server.
Examples: Recursively download a directory with music every morning
Settings Server/Port The name or IP and port (default 21) of the FTP server. Variables are supported. Username The username to connect. Variables are supported. Password The password to connect. Variables are supported. Paths on Server
A comma separated list of files or directories to download from the server. Glob patterns can be used to match multiple files. Variables are supported.
Examples: /pub/export* matches all files with a name starting with export in folder /pub
Local Directory The absolute path of the target directory to download the files to. Variables are supported. Control Encoding Whether to use a special encoding for the control channel or not (Encoding of file names, not the encoding of the content of text files). Variables are supported. Show progress notification Whether or not to show a notification on the statusbar indicating the progress of the operation.
FTP Upload File
The action FTP Upload File uploads one file to an FTP server.
Examples: Upload a backup of all data in Gleeo Time Tracker to the your company server
Settings Server/Port The name or IP and port (default 21) of the FTP server. Variables are supported. Username The username to connect. Variables are supported. Password The password to connect. Variables are supported. Local File The absolute path of the local file to upload. Variables are supported.
Examples: /mnt/sdcard/export_{triggertime,dateformat,yyyy_MM_dd}.csv becomes /mnt/sdcard/ export_2011_02_13.csv
Path on Server (including filename) The absolute path of the file on the FTP server. The path has to include the filename of the target file. This allows you to store the file using a different name on your server. Variables are supported. Control Encoding Whether to use a special encoding for the control channel or not (Encoding of file names, not the encoding of the content of text files). Variables are supported. Show progress notification Whether or not to show a notification on the statusbar indicating the progress of the operation.
FTP Upload Files
The action FTP Upload Files uploads files and folders to an FTP server.
Examples: Recursively upload a directory with photos every morning to an FTP server
Settings Server/Port The name or IP and port (default 21) of the FTP server. Variables are supported. Username The username to connect. Variables are supported. Password The password to connect. Variables are supported. Local Paths
A comma separated list of files or directories to upload to the server. Glob patterns can be used to match multiple files. Variables are supported.
Examples: /mnt/sdcard/export* matches all files with a name starting with export in folder /mnt/sdcard
Server Directory The absolute path of the target directory on the server to upload the files to. Variables are supported. Control Encoding Whether to use a special encoding for the control channel or not (Encoding of file names, not the encoding of the content of text files). Variables are supported. Show progress notification Whether or not to show a notification on the statusbar indicating the progress of the operation.
Gleeo Create Entry
The action Gleeo Create Entry creates an entry of the specified project and task in Gleeo Time Tracker.
Examples: Track the amount of time spent in the Twitter app and create an entry in Gleeo Time Tracker at the end of the day.
Settings Project
The name of the project to create an entry for. The project has to already exist in Gleeo Time Tracker. Task
The task of the entry to create. The task will be created in Gleeo Time Tracker when it not already exists.
The task name can be defined dynamically using variables.
Examples: Phone Support for {incoming_number} becomes Phone Support for 17001111111
Visiting {trigger} becomes Visiting Customer X (use different location triggers named Customer X, Customer Y etc.)
Variable containing the start time
The name of the variable (without curly braces) containing the start time. Variables are supported. Variable containing the end time
The name of the variable (without curly braces) containing the start time. Variables are supported. Move to Background Whether to move Gleeo Time Tracker to the background when the entry has been created.
Gleeo Filesystem Export
The action Gleeo Filesystem Export creates a CSV export of the defined projects and time range.
Examples: Backup all data in Gleeo Time Tracker to the SD card Export the current month by pressing a shortcut on the launcher and attach the created file to a Google Mail message draft Each month export all recorded entries of the month to the SD card and send the file by mail to your employer
Settings Projects to Export The list of projects to export. Time Range The time range to export. CSV Column Delimiter The delimiter used to separate two columns. Excel users can set this to Semicolon to simplify the import in Excel. Target File The file to store the exported data in. Variables can be used to create dynamic file names based on time.
Examples: /mnt/sdcard/export_{triggertime,dateformat,yyyy_MM_dd}.csv becomes /mnt/sdcard/ export_2011_02_13.csv
/mnt/sdcard/export_{export_start_time,dateformat,yyyy_MM_dd}-{export_end_time,dateformat, yyyy_MM_dd}.csv becomes /mnt/sdcard/export_2011_03_01-2011_03_31.csv
Attach to Mail Opens the desired Mail App and attaches the CSV file.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables export_start_time
the start time of the exported time range export_end_time
the end time of the exported time range
export_path
the absolute path of the exported file
Gleeo Start Recording
The action Gleeo Start Recording starts recording the defined project and task in Gleeo Time Tracker when this task is not already recording.
Examples: Start tracking the time when you arrive at your office. Start tracking the time when your employer calls. Start tracking the time when you press a shortcut on the launcher.
Settings Project
The name of the project to start recording. The project has to already exist in Gleeo Time Tracker. Variables are supported. Task
The task to start recording. The task will be created in Gleeo Time Tracker when it not already exists. Variables are supported.
Examples: Phone Support for {incoming_number} becomes Phone Support for 17001111111
Visiting {trigger} becomes Visiting Customer X (use different location triggers named Customer X, Customer Y etc.)
Move to Background Whether to move Gleeo Time Tracker to the background when the task has been started.
Gleeo Stop Recording
The action Gleeo Stop Recording stops recording the currently recording task in Gleeo Time Tracker.
Examples: Stop tracking the time when you leave your office. Stop tracking the time every evening at 6pm and show an alert when you forgot to stop recording.
Settings Projects to Stop
The name of the project to stop recording.
Glob patterns are supported. Variables are supported. Tasks to Stop
The tasks to stop recording.
Glob patterns are supported.Variables are supported. Move to Background Whether to move Gleeo Time Tracker to the background when the task has been stopped.
Google Drive Delete Files (Experimental)
The action Google Drive Delete Files (Experimental) deletes the defined files on Dropbox.
Examples: Delete all files in a folder before uploading new files to this folder to get rid of files you don't need anymore.
Settings Device account The account to access Google Drive. Google Drive Paths
A comma separated list of files or directories to delete on Google Drive. Glob patterns can be used to match multiple files. Variables are supported.
Examples: /backup/export* matches all files with a name starting with export in folder /backup
Show progress notification Whether or not to show a notification on the statusbar indicating the progress of the operation.
Google Drive Download Files (Experimental)
The action Google Drive Download Files (Experimental) downloads multiple files and directories recursively to your device. Warning: This action downloads all specified files and overwrites already existing target files. The files will be downloaded even when the same file already exists on the device. Note: Google Drive allows to create duplicate files which is not possible on a regular filesystem. Automagic only considers the newest file in such a case and ignores duplicates. Note: Google Documents are not downloaded.
Examples: Download each morning the newest file of keypass containing your passwords to ensure you have the newest offline copy available.
Settings Device account The account to access Google Drive. Google Drive Paths
A comma separated list of files or directories to download from Google Drive. Glob patterns can be used to match multiple files. Variables are supported.
Examples: /backup/export* matches all files with a name starting with export in folder /backup
Target The absolute path of the target directory to download the files to. Variables are supported. Show progress notification Whether or not to show a notification on the statusbar indicating the progress of the operation.
Google Drive Upload Files (Experimental)
The action Google Drive Upload Files (Experimental) uploads one or multiple files and directories recursively to your Google Drive. Warning: This action uploads all specified files and overwrites already existing target files.
Examples: Upload a backup of all data in Gleeo Time Tracker to the Google Drive
Settings Device account The account to access Google Drive. Source Files
A comma separated list of files or directories to upload to Dropbox. Glob patterns can be used to match multiple files. Variables are supported.
Examples: /mnt/sdcard/export* matches all files with a name starting with export in folder /mnt/sdcard
Path on Google Drive The absolute path of the target on Google Drive to upload the files to. Variables are supported. Show progress notification Whether or not to show a notification on the statusbar indicating the progress of the operation.
Hide Custom Widget Overlay
The action Hide Custom Widget Overlay hides a previously shown overlay. Settings Overlay name The name/identification of the overlay to hide.
HTTP Request
The action HTTP Request requests a resource from a server using the specified HTTP request method. Note: This action is meant to be used for technical requests (REST and the like) and to process the response using scripts. If you simply want to download a file please use the action Download URL.
Examples:
Fetch a web page of a weather service and test if it contains the word rain Get the price of a product from an online retailers REST service
Settings URL The URL to request. Variables are supported.
Examples: http://example.com/weather.html?ts={triggertime,dateformat,yyyyMMdd} becomes http://example.com/weather.html?ts=20110213
Verify certificates (https) Whether certificates should be checked or not. Can be useful to ignore errors for self-signed certificates. Authentication Whether username and password should be passed to the server using basic authentication. Username The username to pass to the server. Variables are supported. Password The password to pass to the server. Variables are supported. Request Method The HTTP request method to use. Content Type The content type to use in the request as header Content-Type. Variables are supported. Form Field List
Comma separated list with key=value to send as application/x-www-form-urlencoded to the server. The values are automatically URL encoded. Variables are supported.
Example: Firstname=Hugo,Lastname=Habicht Data The text data to send to the server. Variables are supported. Timeout The timeout to use. Store response in a variable or file Whether to store the response in a variable or a file. Variable The name of the variable to store the response in. The response is converted to a string. Variables are supported. Warning: Responses larger than 1MB are not supported in a variable. File The path to store the file in. Variables are supported.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables name as declared in the field Variable the response as string status_code
the numeric HTTP status code, -1 when a general error occurs error_message
error message when the request could not be executed and status_code is set to -1
Import Flows
The action Import Flows imports all flows of the specified file. The imported flows are disabled. Already existing flows are not imported.
Flows can be enabled after importing when desired using action Set Flow State and the variable {imported_flow_names,listformat,comma}.
Examples: Import a flow to lock the device on the stolen device.
Settings File The file to import. Variables are supported. Replace existing Whether or not to replace existing Flows, Triggers, Actions, Conditions and Widgets with the same name.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables imported_flow_names
the list of imported flows duplicate_flow_names
the list of duplicate flows that have not been imported
Init Variable File List
The action Init Variable File List lists all files or only the newly added files in a directory and stores the list in a variable.
Examples: Send all files of a directory by mail to your mail account. Send all new backup files of Gleeo Time Tracker to your inbox. Settings Variable
The name of the variable to hold the list of files. File Pattern
The files to list. The file pattern can contain glob pattern characters like * and ?.
Examples: /mnt/sdcard/folder/*
/mnt/sdcard/GTT-export-20120101.csv /mnt/sdcard/GTT-export-*.csv
/mnt/sdcard/file1,/mnt/sdcard/file2,/mnt/sdcard/file3
Include changes only
Whether to store all files matching the pattern specified in File Pattern or only the new files.
A file is considered to be new when it was not available the last time this action executed or the size of the file changed or the last modified time of the file has changed since the last execution of this action.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables files
the list of files
Init Variable Image File
The action Init Variable Image File loads the pixel data of an image into the specified local variable to modify the image with action Modify Image or to read color values of pixels with script function getPixelColor. Warning: Loading large images uses a lot of internal memory which could cause Automagic to crash in the worst case. It's recommended to read only one image into memory and not to load very large images.
Examples: Load an image, shrink the size and send the smaller file by mail.
Settings File The path or URL to the image file. Variables are supported. Variable The name of the local variable to store the pixel data. Variables are supported.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables image_data
the local variable of the image image_width
the width of the image image_height
the height of the image
Init Variable Location
The action Init Variable Location acquires one location from the defined provider and stores the location in the variable. Note: Getting one location can take several seconds to complete. The passive provider might not return a location until another app is activating one of the location providers.
Examples: Send the location in response to an SMS containing the text Where are you? to the sender. Store the location coordinates in a file when the employer calls. Send the location and phone number by mail whenever you call someone.
Settings Variable
The name of the variable to store the location in. New or Last Known Location Defines if the action should acquire a new location or if the action should use the last known location. Loading the last known location uses almost is very fast but might return an outdated location or no location might be available when the device was freshly started. Location Provider The location provider to use. Network
This provider uses the location provided by the cell tower and Wi-Fi signals. Depending on environment this provider can deliver location of about 60 meters of accuracy. Locations found using the cell tower can be very inaccurate (up to several kilometers or miles). Passive
This provider delivers the location from the currently active provider (Network or GPS) without activating one of the providers by itself. This might result in very infrequent location updates. GPS
This provider delivers the location using the GPS receiver. This provider usually uses more battery than the network provider. High Accuracy (Experimental)
This provider delivers the finest available location using different sensors available on the device. Balanced Power/Accuracy (Experimental)
This provider delivers the a location with an accuracy of about 100m and uses less battery than the high accuracy provider.
Low Power (Experimental)
This provider delivers the a location with an accuracy of about 10km. No Power (Experimental)
This provider will only deliver locations when another app on the device has requested locations.
Minimum Accuracy (in meters) Only newer locations with at least this accuracy are accepted.
This can be useful to filter out locations calculated using the cell tower when also more exact locations using WiFi are available. Timeout The maximum amount of time to wait for a location fix, otherwise terminate the flow with an error.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables location
the reported location location_accuracy
the accuracy of the location location_altitude
the altitude of the location when available (not available on all devices) location_bearing
the direction of travel in degrees East of true North when available (not available on all devices) location_speed
the speed of travel in meters per second when available (not available on all devices)
Init Variable Random Number
The action Init Variable Random Number generates a random number in a defined interval.
Examples: Simulate to throw a dice. Play a random sound for every received SMS.
Settings Variable The variable to store the random number in. Lowest Value The lowest generated value. Highest Value The highest generated value.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables n
contains the generated random value
Init Variable System Setting
The action Init Variable System Setting reads a value from the system setting database and stores the value in a variable. Settings Category System: for regular settings Secure: for settings which can usually not be modified Global: for global Settings valid for all users of the device (Android 4.2+) Name The name of the setting to read. Variables are supported. Variable The name of the variable to store the value in. Variables are supported.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables setting
the value of the setting
Init Variable Text File
The action Init Variable Text File reads the contents of a text file into the specified variable. Files up to 1MB are supported. Binary files are not supported.
Examples: Read a text file containing a mail template and send the text by mail.
Settings File The path of the file to load. Variables are supported. Encoding The encoding used to decode the bytes of the file to text. Variable The name of the variable to store the text in. Variables are supported.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables file_text
the name of the variable to store the text in
Init Variables Call Log
The action Init Variables Call Log initializes variables with the values of the last entry of the call log.
Examples: Update a widget with the values of the last call
Settings Query Criteria Specifies which call should be stored in the variables. Variable for Call Number The name of the variable to store the call number. Variable for Call Date/Time The name of the variable to store the point in time of the call. Variable for Call Duration The name of the variable to store the call duration. Variable for Call Type The name of the variable to store the call type (1=incoming, 2=outgoing, 3=missed). Variable for Call Contact Name The name of the variable to store the contact name. Variable for Call New Flag The name of the variable to store if the call log entry has not been marked acknowledged.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables call_number
the call number call_time
the time of the call in millis since 1970 call_duration
the call duration in seconds
call_type
the call type (1=incoming, 2=outgoing, 3=missed) call_cached_name
the name of the contact (might be outdated when the contact has been modified in the contacts afterwards) call_new
true or false whether the entry in the call log has not been acknowledged yet
Init Variables Device Orientation
The action Init Variables Device Orientation measures the device orientation using the accelerometer and magnetometer sensors of the device. Warning: This action uses the device hardware sensors and might increase battery usage (depending on device model). Some devices turn off the sensors when the screen is off.
Examples: Show your current orientation value in a popup. Select the task to record by changing the device orientation.
Settings Variable for Azimuth The name of the variable to store the azimuth of the device (in degrees). Variable for Pitch The name of the variable to store the pitch of the device (in degrees). Variable for Roll The name of the variable to store the roll of the device (in degrees). Timeout The amount of time to wait for a value of the sensor, the action is terminated with an error when no value becomes available.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables azimuth
the azimuth in degrees pitch
the pitch in degrees roll
the roll in degrees
Init Variables File Info
The action Init Variables File Info provides information about a file as variables to the flow.
Examples: Check if a file is older than one week and delete the file.
Settings File The file to check. Variables are supported. File Type The variable to store the file type (dir, file or other). File Exists Variable to store whether the file exist or not. File Size Variable to store the size of the file in bytes.
recursive for directory For directories whether to collect the size of all directly contained files or to also recursively traverse and sum the size of all subdirectories. File Last Modified Variable to store the last modification timestamp.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables file_type
the type of the file (dir, file or other) file_exists
if the file exist or not (true or false) file_size
size of the file in bytes (or the sum of the files in directory) file_last_modified
timestamp of the last modification
Init Variables Gleeo Recording
The action Init Variables Gleeo Recording checks if a task is recording in Gleeo Time Tracker and stores the recording project title and task in variables.
Examples: Store the recording task when someone calls and start recording the same task again when the call ends. Don't use a funny alert sound when you are working for a special project.
Settings
Variable for Recording Boolean The name of the variable to store the boolean whether Gleeo Time Tracker is currently recording. Variable for Recording Project Title The name of the variable to store the project Gleeo Time Tracker is currently recording. Variable for Recording Task Name The name of the variable to store the task Gleeo Time Tracker is currently recording. Variable for Recording Start Time The name of the variable to store the start time of the currently recording task.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables recording
the recording boolean recording_project_title
the project title recording_task_name
the task name recording_start
the start time of the currently recording task
Init Variables Phone Info
The action Init Variables Phone Info initializes the desired variables (not all values are available on all devices).
Examples:
Check the network operator once an hour
Settings Variable Device ID (e.g. IMEI/MEID/ESN) The name of the variable. Variable Software Version (e.g. IMEI/SV) The name of the variable. Variable Line 1 Number (e.g. MSISDN) The name of the variable. Variable Network Country ISO The name of the variable. Variable Network Operator (e.g. MCC+MNC) The name of the variable. Variable Network Operator Name The name of the variable. Variable Phone Type The name of the variable. Variable SIM State The name of the variable. Variable SIM Country ISO The name of the variable. Variable SIM Operator The name of the variable. Variable SIM Operator Name The name of the variable. Variable SIM Serial Number The name of the variable. Variable Subscriber ID (e.g. IMSI) The name of the variable. Variable Voice Mail Alpha Tag The name of the variable. Variable Voice Mail Number The name of the variable.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables device_id
the device ID (e.g. IMEI/MEID/ESN), null when unavailable device_software_version
the software version (e.g. IMEI/SV), null when unavailable line1_number
the phone number string for line 1 (e.g. MSISDN), null when unavailable network_country_iso
the ISO country code (only when registered to a network, unreliable on CDMA) network_operator
numeric network operator name MCC+MNC (only when registered to a network, unreliable on CDMA) network_operator_name
network operator name (only when registered to a network, unreliable on CDMA) phone_type
type of the phone (0=no, 1=GSM, 2=CDMA, 3=SIP) sim_state
State of the SIM (0=unknown, 1=absent, 2=SIM PIN required, 3=SIM PUK required, 4=network PIN required, 5=ready) sim_country_iso
SIM ISO country code sim_operator
SIM MCC+MNC (only available when SIM in state ready) sim_operator_name
service provider name SPN (only available when SIM in state ready) sim_serial_number
serial number of the SIM, null when unavailable subscriber_id
the subscriber ID (e.g. IMSI), null when unavailable voice_mail_alpha_tag
the alphabetic identifier associated with the voice mail number voice_mail_number
the voice mail number, null when unavailable
Input Dialog
The action Input Dialog shows an input dialog with an input text field, password field, single- or multi-selection list.
Examples: Ask the user whether he wants to turn WiFi off or not Ask for the password to use for an FTP upload Ask whether airplane mode should be activated in the evening. Activate airplane mode when the user does not respond within 30 seconds.
Settings Title The title of the input dialog. Variables are supported. Input Dialog Type The type of the input dialog to show.
Can be one of: Text for plain text input
Password for a password input
Number to type number characters
Phone number to type characters used in phone numbers Date to show a date picker Time to show a time picker
Date & Time to show a dialog with a date & time picker
Single Choice Menu for a list of values like a menu without OK, Cancel buttons Multi Choice for a list of values the user can choose multiple values from
Prompt (only applicable to Text and Password) The question or input description to show in the input dialog. Variables are supported. List Values (only applicable to Single Choice and Multi Choice) A comma separated list of values to show as values the user can choose from. Variables are supported. Default Value
The default value provided when the user does not change the input value. This value is also provided when the user cancels the dialog or hits the back key. Variables are supported.
Whether the user has cancelled the dialog can be evaluated using the variable operation (see below).
The default value for date/time input types must be formatted as specified below: Date: Pattern yyyy-MM-dd for example 2014-01-25 or when using a variable {variable,dateformat,yyyy-MM-
dd}
Time: Pattern HH:mm (24-hour format) for example 14:20 or when using a variable {variable,dateformat,HH:mm}
Date & Time: Pattern yyyy-MM-dd HH:mm (time in 24-hour format) for example 2014-01-25 14:20 or when using a
variable {variable,dateformat,yyyy-MM-dd HH:mm}
Values not formatted according to the rules above are ignored. Activate Timeout Whether an automatic timeout should provide a value to the flow when the user does not react within the specified time. Duration The amount of time to automatically close the dialog and to continue the flow. Value on Timeout The value to provide to the flow when a timeout occurred. Variables are supported. Options Show when locked: show the input dialog even when the device is locked Turn screen on: Turn the screen on when the dialog is shown initially Keep screen on: Keep the screen on as long as the dialog is shown (power button still allows turn off the screen)
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables operation
the operation used to close the dialog.
Can be one of: ok when the user pressed the OK button
cancel when the user pressed the cancel button or the back key timeout when the dialog was closed by a timeout value
the selected value in the dialog or the list of values in case of Multi Choice or a date when the input dialog type was of type date/time
index
the index of the selected value of a Single Choice list or -1 when not definable indices
the indices of the selected values of a Multi Choice list or -1 for every not definable value
Input Speech (Experimental)
The action Input Speech (Experimental) starts the speech recognition of the device and provides the recognized text to the flow in variable value. The speech recognition engine usually requires network access.
Examples: Control Automagic using spoken commands.
Settings UI Mode Whether user interface should be shown or the speech recognition should be executed in the background. Prompt An optional title to show in the user interface. This setting might be ignored by the engine. Variables are supported. Language Optional the desired language to use in the speech recognition engine. This setting might be ignored by the engine. Variables are supported. Use Bluetooth headset (Android 3+) Whether or not a Bluetooth headset is used.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables value
the recognized text operation
whether the recognition was successful (ok) or not (cancel)
Kill App
The action Kill App kills the processes of an app running in the background. Warning: The operating system does not allow to kill an app currently running in the foreground.
Examples: Kill the browser app when another app is started to reclaim memory.
Settings Package Name The name of the package to kill. Variables are supported.
Kill App Process
The action Kill App Process sends the defined signal to the process using the kill command. Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Examples: Kill the browser app when another app is started to reclaim memory.
Settings Package Name The name of the package to kill. Variables are supported. Signal The signal to send.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables pid
the id of the process importance
the importance of the process. The smaller the value the higher the importance. lru
least recently used. Smaller value means more recently used. uid
the user id of the process
Launch App
The action Launch App starts an app or a specific activity of an app.
Tip: Some activities require special permissions to be launched. Check the log after testing the action when an activity fails to start.
Examples: Start the development settings directly using a shortcut. Start the shopping list app when you are near the shopping mall
Settings Package Name The name of the package to launch. Variables are supported. Class Name
The specific activity to launch.
Leave empty to launch the default activity of a package. Variables are supported.
Launch Shortcut
The action Launch Shortcut starts a previously defined shortcut.
Examples: Open a specific settings page Play an audio playlist Directly display a contact
Lock Device
The action Lock Device immediately locks the device. Note: The device admin functions have to be enabled in the preferences to use this action.
Examples: Lock the device when an SMS contains device lost!
Mail with Gmail
The action Mail with Gmail sends a mail using your Gmail account. Note: If you have enabled 2-step verification in your Google account then you need to create an application specific password for login in the settings of your google account: https://www.google.com/settings/security
Examples: Forward every SMS as a mail to your inbox.
Send your location every 30 minutes to your girlfriend. Send the new Gleeo Time Tracker backups to your inbox. Settings Authentication Whether to use an account available on the device (OAuth) or to enter an account name and password. Mail Account The account name to use like
[email protected]. Variables are supported. Password
The password to your mail account. Variables are supported. Info: The password is stored encrypted on the internal device storage and is not part of the regular flows.xml file. To The mail address of the recipient. Variables are supported. Subject The subject of the mail. Variables are supported. Body The message body of the mail. Variables are supported. Files to Attach
The comma separated list of files to attach. Variables are supported. Tip: Files stored in a list by action Init Variable File List can be formatted using {files,listformat,comma} to a comma separated list.
Map Values
The action Map Values takes an input value (the key) and maps it to an output value.
Examples: Scan the barcode on the laboratory door and map the value to a project/task to start the time tracker.
Settings Input Value
The input value to map to another value. Variables are supported.
Examples: {barcode_text} to map a barcode
{incoming_number} to map the number of an incoming call
Mapping Definition
The definition used to specify how the values should be mapped to the target values. Variables are supported.
Mapping example: key1=>value1 key2=>value2
The part before the assignment operator (=>) is used to specify the key values to match. A comma separated list can be used to specify multiple keys for one target value. Glob pattern characters * and ? can also be used to match multiple
values.
The part after the assignment operator (=>) defines the target value to use as the map value.
The mapping rules are evaluated line by line from top to bottom. The first matching rule is applied.
Multi key mapping example:
key1=>value1
key2,key3,key4=>value2
Glob pattern mapping example: key1=>value1 key?=>value2 key*=>value3
In the above example, the value key1 would be mapped to value1 because it is the first line matching the input value.
The values key2 to key9 would be matched by the second rule.
The value key123 would be matched by the third rule.
When no rule matches the output value is set to null.
If you want to map a few known bar codes to meaningful task names but also want to use the plain barcode when no mapping rule matches, you can use the following approach (the input value would be set to {barcode_text} in this example):
Mapping definition: 123321123=>Meeting 989878945=>Office *=>{barcode_text}
The third rule matches all unknown bar code values and maps the value to the original value. You can also use a condition Expression to detect not mappable values.
The last twenty not mappable values detected while executing the action will be remembered in a list and can be added by using the button Add unmapped values... Output Variable
The name of the variable to store the result in (usually without curly braces except when you want to create dynamically named variables). Variables are supported.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables
mapped_value
the target value
Message Dialog
The action Message Dialog shows a dialog with a message and an optional title.
Examples: Show the text of an incoming SMS directly in a dialog.
Settings Title The optional title of the dialog. Variables are supported. Message The message to show in the dialog. Variables are supported. Activate Timeout Whether an automatic timeout should automatically hide after the specified time. Duration The amount of time to automatically close the dialog and to continue the flow.
Modify Call Log
The action Modify Call Log marks the entries of the call log as acknowledged or clears the call log.
Examples: Delete the call log every Monday morning.
Settings Operation if the entries should be marked as acknowledged or if the call log should be cleared. Numbers
The list of callnumbers to delete. Multiple numbers can be separated by comma.
Glob patterns (*, ?) can be used to filter on similar numbers like corporate number ranges:
Examples: +17001111111 +17001111111,+17002222222 *70033311* *70033311*,*70033?22*
Special characters like +, - and . are removed before comparing the number.
Modify Image
The action Modify Image can be used to modify an image that was previously loaded with an action Init Variable Image File.
Examples: Load an image, shrink the size and send the smaller file by mail.
Settings Variable The name of the variable holding the pixel data of the image. Variables are supported. Operation How the image should be modified (scale, rotate or mirror). Width The new width of the image. The width is adjusted proportionally, when only the new height is specified. Variables are supported. Height The new height of the image. The height is adjusted proportionally, when only the new width is specified. Variables are supported. Rotate How the image should be rotated. Mirror If the image should be mirrored horizontally or vertically.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables image_data
the local variable of the image image_width
the width of the image after the modification image_height
the height of the image after the modification
Move Files
The action Move Files locally moves one or a list of files to the specified target directory or file.
A move is implemented to use a rename operation when possible. If a rename is not possible, the file/folder is copied to the target directory and afterwards the source is deleted.
Examples: Move all files in directory /mnt/sdcard/xyz/ to the folder /mnt/sdcard/xyz_backup/ Rename directory /mnt/sdcard/xyz to /mnt/sdcard/xyz_backup Settings Source Files
A comma separated list of files or directories to move. Glob patterns can be used to match multiple files. Variables are supported.
Examples: /mnt/sdcard/export* matches all files with a name starting with export in folder /mnt/sdcard
When multiple files are matched the target has to be a directory. The directory will be created when it does not exist yet.
A directory with an ending slash (like /mnt/sdcard/) matches the files contained in the directory like using /mnt/sdcard/*.
Target
The absolute path of the target file or directory. Variables are supported. Show progress notification Whether or not to show a notification on the statusbar indicating the progress of the operation.
Notification on Screen
The action Notification on Screen shows a notification on the screen for a short period of time.
Examples: Show a notification when a background flow sends your location by mail. Show a notification with the text of a received SMS.
Settings Text The text to show. Variables are supported. Duration Whether to show the duration for a short duration (about 2 seconds) or longer (about 4 seconds).
Notification on Statusbar
The action Notification on Statusbar shows a notification on the status bar. The notification is displayed until the notification is clicked or clear is pressed.
Examples: Show a notification when a background flow sends your location by mail.
Settings Icon The icon to use for this notification. Title The title of the notification. Variables are supported. Message The message of the notification. Variables are supported. Play Sound Plays the default notification sound when checked. Vibrate Vibrates when checked. Flash LED Flash the notification LED using the supplied color. Notification LED and user defined colors are not supported on all devices. Ongoing (Premium) Flags this notification as an ongoing event and prevents the removal of this notification from the statusbar. A notification ID is mandatory when this option is selected. Keep on Clear (Premium) Prevents the removal of this notification from the statusbar. A notification ID is mandatory when this option is selected. Notification ID (Premium)
Defines the ID (a number from 1 to 999) to use as the identification of this notification.
This is useful when the notification is used for trigger Notification on Statusbar Selected or when the notification is used to show a profile like status.
A notification with the same ID replaces an older notification of the same ID. The notification can be removed from the statusbar using the action Remove Notification on Statusbar.
The button Remove can be used to remove a notification with this ID on the statusbar.
Priority (Android 4.1+, Premium) Defines the priority of the notification. A notification with a low priority might be displayed in the expanded statusbar only (depends on Android version). Big Message (Android 4.1+, Premium)
Defines a big message that will be displayed when the notification is expanded (by swiping down on the notification). The notification usually also shows the big message when the notification is displayed as the topmost notification on the notification drawer. You can affect the ordering of the notifications by using the priority setting. Actions (Android 4.1+, Premium)
Up to three actions displayed as buttons when the notification is expanded (by swiping down on the notification). The notification usually also shows the action buttons when the notification is displayed as the topmost notification on the notification drawer. You can affect the ordering of the notifications by using the priority setting. Tip: Use action Execute Flows to execute a complex flow consisting of multiple actions and conditions.
Following variables are supplied to the executed action: action_number: contains the number of the action (1, 2 or 3)
action_text: the text label of the selected action button on the notification
Open URL in Browser
The action Open URL in Browser opens the browser with the specified URL. Tip: The browser can also be used to download a file by using a URL pointing to a PDF or other downloadable file.
Examples: Open a news page every morning. Download a PDF every morning at 5am.
Settings URL
The url to open. Variables are supported.
Tip: You can use a variable to open an URL that changes dynamically by date. http://test.com/newspaper_{triggertime,dateformat,yyyyMMdd}.pdf
will be replaced to http://test.com/newspaper_20120123.pdf
Use defined app Whether to use a defined app to open the URL or to let the system choose the most appropriate app. Package Name The app to open the URL. Variables are supported. Class Name The component inside the app to open the URL with. Variables are supported.
Perform Action on Notification on Statusbar
The action Perform Action on Notification on Statusbar clicks one of the action buttons which are usually available in the big, expanded notification on Android 4.1+.
The flow must be executed by a trigger 'Notification on Statusbar Displayed' otherwise Automagic has no possibility to access the notification. Warning: Android 4.1+ is required. This function is not officially supported by Android and might not work on all devices.
Examples: Automatically archive a mail when the mail contains a specific text.
Settings Button The label of the button to click. The label needs to match the entered text exactly. Variables are supported.
Plugin (Experimental)
The action Plugin (Experimental) executes the action defined in a plugin. A flow has no technical way to wait for a plugin to finish the action. You can use an action Sleep to wait a short amount of time. Warning: This function is experimental and might not work with all existing plugins available in Google Play. We can not provide support for plugins. Note: Plugins can be defined using the interface description available from the app Locale: Locale developer documentation and Tasker: Tasker plugin extensions. Settings Plugin List of all available plugins found on the device. replace variables/modify configuration Script to dynamically replace variables and to modify the configuration passed to the plugin. Synchronous with Timeout
Whether the plugin should be invoked synchronously and Automagic should wait for the plugin to return a result or not.
Only a few new plugins support this mechanism, this mechanism should usually not be used when the plugin does not request to be executed this way. This option will automatically be enabled when the plugin is configured and the plugin supports synchronous execution.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables Tasker variables
takes over the local Tasker variables returned by the plugin (without leading %-character)
Post Tweet
The action Post Tweet posts a regular Twitter message.
Examples: Tweet your location every hour.
Settings Twitter Account The Twitter account used to send the message. Message The message to send. Variables are supported.
Post Twitter Direct Message
The action Post Twitter Direct Message posts a Twitter direct message to one recipient.
Examples: Tweet your location every hour to your wife.
Settings Twitter Account The Twitter account used to send the message. To The recipient of the direct message (without leading @). Variables are supported. Message The message to send. Variables are supported.
Query Content Provider
The action Query Content Provider allows to load data from a content provider of another app. A content provider presents data to Automagic as one or more tables that are similar to the tables found in a relational database. Warning: This function allows to access data that's not officially made available by Android which might not be available on all device models and Android Version.
Settings Content URI The URI of the content provider data. Variables are supported. Projection The list of tables to return. Variables are supported. Selection A filter declaring which rows to return, formatted like an SQL WHERE clause (excluding the WHERE itself). The selection can include ?-characters that will be replaced by the values provided in the Selection Arguments from the content provider. Variables are supported. Selection Arguments The values to use in the selection for each provided ?-character. Variables are supported. Sort Order How to order the rows, formatted as an SQL ORDER BY clause (excluding the ORDER BY itself). Variables are supported. Result Type
Defines how Automagic should provide the data to the flow: Table: Provides a list of rows each containing a list of values to the flow. List: Converts the returned table to a flat list.
Single value: Provides only the first value of the returned data to the flow. Text: Converts the returned table to a CSV-text.
Include header row Whether or not the returned result should include a row with the column titles. Variable The name of the variable to store the result in. Variables are supported.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description.
Supplied Variables result
the resulting data as defined in Resultat-Typ
Reboot
The action Reboot restarts the device. Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Examples: Restart the device every morning at 6am.
Settings Options Options to pass to the kernel when the device is restarted. For example recovery to boot into recovery mode. Variables are supported.
Remove Notification Missed Calls
The action Remove Notification Missed Calls removes the missed calls notification in the statusbar. Warning: This function requires root access, is not officially supported by Android and might not work on all devices.
Examples: Remove the missed calls notification when a number on a blocking list called in your absence.
Remove Notification on Statusbar
The action Remove Notification on Statusbar removes the specified or all notifications on the statusbar added by the action Notification on Statusbar.
Example: Show a notification when a sound profile is active and remove the notification when the sound profile is deactivated.
Settings Notification Type Whether the action should affect only notifications of Automagic or notifications of all apps in general (Android 4.3+) Notification ID
The ID of the notification to remove. The ID must match the ID used in the action Notification on Statusbar. All removes all notifications irrespective of the ID. Notifications Whether to remove all removable notifications or only the notifications of the specified app. Package Name The name of the package/app to remove the notifications from. Variables are supported. Notification ID
The ID of the notification to remove. Variables are supported.
Trigger Notification on Statusbar Displayed provides the ID of the notification in variable id. Use {id} to remove the notification that triggered the flow.
Request Sync
The action Request Sync starts the synchronisation process of one or multiple accounts or some parts of the accounts. The order and the exact timing of the synchronisation is controlled by Android.
The action does not wait for the synchronisation to finish.
Examples: Disable the automatic synchronisation to save battery but execute the synchronisation manually every hour between 8am and 8pm.
Settings Accounts
The accounts to synchronize in format Type:Name. Glob patterns can be used to match multiple accounts. Variables are supported. * synchronises all accounts
Google:* synchronises all Google accounts
Authorities
The parts/databases of the accounts to synchronize. Specify a * to synchronize all parts of the account. Glob patterns can be used to match multiple authorities. Variables are supported. * synchronises all authorities of the specified accounts
com.android.calendar synchronises all calendars of the specified accounts
Reregister Media Button Receiver
The action Reregister Media Button Receiver registers Automagic as a receiver of media button events again.
This is useful in conjunction with trigger Media Button Receiver when another app requested to receive the media button events and Automagic thus does not receive the events anymore.
Restore Audio Volumes
The action Restore Audio Volumes restores the audio volumes previously stored in global variables by action Store Audio Volumes.
Examples: Store the audio volumes when a meeting begins, set all volumes to zero and restore the previously volumes when the meeting ends
Settings Alarm Whether or not to restore the alarm volume and the name of the variable to restore the volume from. DTMF Whether or not to restore the DTMF volume and the name of the variable to restore the volume from. Music Whether or not to restore the music volume and the name of the variable to restore the volume from. Notification Whether or not to restore the notification volume and the name of the variable to restore the volume from. Ring Whether or not to restore the ringtone volume and the name of the variable to restore the volume from. System Whether or not to restore the system volume and the name of the variable to restore the volume from. Voice Call Whether or not to restore the voice call volume and the name of the variable to restore the volume from. Ringer Mode Whether or not to restore the ringer mode and the name of the variable to restore the volume from.
Save Variable in Image File
The action Save Variable in Image File saves the pixel data that was previously loaded with an action Init Variable Image File into a file.
Examples: Load an image, shrink the size and send the smaller file by mail.
Settings Variable The name of the variable holding the pixel data of the image. Variables are supported. File The path of the file to store the image in. The type is determined by the file extension. (.jpg, .webp and .png are supported). Variables are supported. Image quality How much the file should be compressed (0=small file/bad image quality, 100=big file/good image quality). The image quality is ignored for PNG-files. Variables are supported.
Scan Barcode
The action Scan Barcode opens an activity to scan a barcode using the camera of the device. Tip: You can use an action Map Values to map known barcode values like a QR code on a laboratory door to a project/task.
Examples: Start recording the time in Gleeo Time Tracker based on a barcode on a laboratory door. Scan a barcode on a book and open the browser to search the book on Amazon.
Settings Timeout The timeout duration to automatically cancel the barcode scan.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables operation
the operation used to close the scan barcode activity.
Can be one of: ok when a bar code has been successfully scanned
cancel when the user pressed the back button or another button to leave the activity timeout when the activity was closed by a timeout barcode_text
the value of the barcode as a text string barcode_format
the format of the barcode
Script
The action Script executes a script doing some simple calculations and can be used to modify variables.
Script Description Reserved Keywords Following list of keywords are reserved and are therefore not allowed to be used as a variable name:
abstract alias and AND assert boolean break byte case catch char class const continue def default do double else elsif ensure enum extends false final finally float for goto if implements import in instanceof int interface long mod native new next not NOT null or OR package private protected
public redo repeat rescue retry return self short static strictfp super switch synchronized then
this throw throws to transient true try undef unless until void volatile when while xor XOR yield
Only a few of the reserved keywords are currently used but are reserved for future extensions of the scripting language.
Comments Scripts can contain comments that are not executed when the script is interpreted. text after // to the end of the line
text between /* and */. Such a comment can also span multiple lines.
Examples: a=1+2;//this is a comment b=a+3; c=b+a;
/* this is a
multiline comment */
d=c*2;
Variables
A value like a number or a string can be stored in a variable using the assignment operator =
Variable names are case sensitive. A variable name has to start with a letter, a currency symbol (such as "$") or a connecting punctuation character (such as "_"). The rest of the variable name can also contain digits. Unicode characters are supported, but it is highly recommended to use US-ASCII characters.
Examples: a = 3;//assign the number three to the variable a
b = a;//assign the value stored in variable a to the variable b
There exist two types of variable scopes:
Flow Local
Every variable declared in a script, expression or inline script is by default flow local as long as the name of the variable does not start with global_.
Examples of flow local variables with a value assigned: a = 1; number one stored in a variable called 'a'
var1 = 1.234; decimal number 1.234 stored in a variable called 'var1'
var_123 = "Hello World"; string "Hello World" stored in a variable called 'var_123'
_m = true; boolean value 'true' stored in a variable called '_m'
var2 = a; stores the value stored in variable 'a' in a variable called 'var2'
Global
Every variable that starts with global_ is global and therefore accessible by other flows and will also be persisted to the external memory and reloaded when you stop/restart the Automagic service.
Examples of global variables with a value assigned: global_a = 1; number one stored in a variable called 'global_a'
global_var1 = 1.234; decimal number 1.234 stored in a variable called 'global_var1'
global_var_123 = "Hello World"; string "Hello World" stored in a variable called 'global_var_123' global_m = true; boolean value 'true' stored in a variable called 'global_m'
Variables are references to values (like a pointer). Assigning the value stored in a variable to another variable does not copy the value but both variables point to the exact same value.
This is especially important when modifiable values like lists are used.
Example: a = newList(1, 2, 3); b = a;
//at this point both variables a and b point to the exact same list (the list only exists once) addElement(a, 4);
//the list now contains 1, 2, 3, 4
//both variables a and b still point to the same list //both loops therefore print the values 1, 2, 3 and 4 in the log: for (x in a) { }
log("{x}");
for (x in b) { }
log("{x}");
Operators Following operators are supported in expressions: + addition and string concatenation - subtraction *
multiplication
/ division
% modulo division = greater than or equal == equal
!= not equal AND, && and OR, || or
XOR, ^ exclusive or NOT, ! not (unary)
Expressions An expression is a construct made up of variables, operators and function calls, that evaluates to a single value.
Examples: 42
1+2 a=1
b=a+1
c=(a+1)*(b-3) global_a=1 a=sqrt(9)
b=addDays(triggertime, 3)
c=replace("hello automagic", "automagic", "world") b=addDays(triggertime, sqrt(9))
b="Hello " + "World" a=true
b=false
c=a AND b OR c>=5 c=NOT a AND NOT b
String Inline Expressions
Inline expressions in strings can be used to replace a part of the string by a variable or expression. The rules described here also apply to the text fields of triggers, conditions and actions documented in the help page with Variables are supported.
An inline expression is enclosed in curly braces: {expression}
Example simple inline expressions: var1="Test";
var2="This is a {var1}";
'var2' will contain the string "This is a Test" after the script is evaluated var="one plus two is {1 + 2}";
'var' is evaluated to "one plus two is 3" Inline expressions can be formatted by defining a format type and depending on the format type a pattern to use: {var,formattype,pattern}
Example inline expressions with formatting: var="Today is {getDate(),dateformat,dd.MM.yyyy}";
'var' will contain the string "Today is 21.07.2012"
var="It's {getDate(),dateformat,HH:mm}";
'var' will contain the string "It's 12:32"
var="It's {getDate(),dateformat,timezone,UTC,HH:mm}";
'var' will contain the string "It's 10:32"
var="Value: {1.456789,numberformat,0.00}";
'var' is evaluated to "Value: 1.46"
var="I'm here: {location,locationformat,decimal}";
'var' is evaluated to "I'm here: 46.76817,7.603751" var="{files,listformat,comma}";
'var' is evaluated to "/mnt/sdcard/file1,/mnt/sdcard/file2"
Supported format types: dateformat: Formats the date using the specified date pattern. See pattern characters for a description of the supported
patterns.
The optional sub-format timezone along with the name of the timezone can be used to define the timezone used to
format the date/time. Accepted timezone names are either UTC, GMT or the Olson name of a timezone name of the form Area/Location, such as America/Los_Angeles (device dependent). GMT is used for unknown timezone names.
Examples:
{triggertime,dateformat,timezone,UTC,HH:mm}
{triggertime,dateformat,timezone,America/Los_Angeles,HH:mm} {triggertime,dateformat,timezone,Europe/London,HH:mm} {triggertime,dateformat,timezone,Europe/Paris,HH:mm}
{triggertime,dateformat,timezone,Africa/Harare,HH:mm} numberformat: Formats the number using the specified decimal format. See pattern characters for a description of the
supported patterns.
locationformat: Formats the address of the location when available in a single line of text when no format is specified.
(Data connection is required)
Following locationformat patterns are supported:
multiline: Formats the address as a multiline text. (Data connection is required)
decimal: Formats latitude,longitude as decimal numbers (+/-DDD.DDDDD). Example: 46.76817,7.603751.
microdegrees: Formats latitude,longitude multiplied by 1'000'000 as integers. Example: 46768355,7604022. This
format can be useful in a call to a REST service.
swiss: Formats latitude,longitude converted to the Swiss coordinate system. listformat: Formats the list of files (see action Init Variable File List) as a multiline text with one file per line when no
pattern is specified.
Following listformat patterns are supported:
comma: Formats the list of files as a comma separated list.
Inline expressions in strings with single quotes are not interpreted. This can be helpful for regular expressions, where a quantifier like {2} in the pattern ([0-9]){2}.* should not be replaced with 2.
Example: var='Today is {getDate(),dateformat,dd.MM.yyyy}';
'var' is evaluated to 'Today is {getDate(),dateformat,dd.MM.yyyy}'
Control Structures
if
Statement
An if statement can be used to evaluate a block of code when a condition is true.
Example: if (avalue to the map and returns the map. Returns a new map when the map should not exist yet.", Object getMapValue(Map map, String key)
Returns the object for key or null when no mapping for key exists. Object getMapValue(Map map, String key, Object default)
Returns the object for key or default when no mapping for key exists. Object removeMapEntry(Map map, String key)
Removes the entry for the given key and returns the value. List getMapKeys(Map map)
Returns a list of the keys of map. List getMapValues(Map map)
Returns a list of the values of map. String evaluateXPathAsString(String xml, String xpath)
Evaluates the XPath expression on the given XML and returns the result as a string. (see XPath Specification.) String hash(String value, String encoding, String algorithm)
Calculates the hash of value using the specified encoding (like UTF-8 or UTF-16LE) and hashing algorithm (like MD5 or SHA1).
Object log(Object value)
Logs the specified object in the Automagic log and returns the unmodified object. Object eval(String script)
Evaluates the string as a script and returns the value of the last expression. Number random()
Returns a random number between 0.0 and 1.0 (exclusive). Number random(Number low, Number high)
Returns a random number between low and high (inclusive). Boolean sleep(Number milliseconds)
Waits for the specified amount of milliseconds. Boolean sleep(String duration)
Waits for the specified duration like "2m 30s". Boolean existsFile(String path)
Checks whether the file denoted by path exists or not. Boolean isDirectory(String path)
Checks whether the file denoted by path is a directory. Number getPixelColor(Bitmap image_data, Number x, Number y)
Returns the color (argb) of the pixel of the image at location x, y. Number getRed(Number color)
Returns the red component of the specified color. Number getGreen(Number color)
Returns the green component of the specified color. Number getBlue(Number color)
Returns the blue component of the specified color. Number getAlpha(Number color)
Returns the alpha component of the specified color. Number newColor(Number a, Number r, Number g, Number b)
Returns a new color from the specified ARGB components. Number distance(Location loc1, Location loc2)
Calculates the distance between locations loc1 and loc2 in meters. Location newLocation(Number latitude, Number longitude)
Creates a new Location for the specified latitude and longitude.
String setHTTPResponseHeader(String header, String value)
Sets the HTTP response header to the specified value and returns the value. Number setHTTPResponseStatus(Number status)
Sets the HTTP response status to the specified value and returns the value. Object getWidgetElementProperty(String widgetName, String elementName, String property)
Gets the current value of the property of the specified widget element.
Object setWidgetElementProperty(String widgetName, String elementName, String property, Object value)
Sets the given property of the specified widget element to value. String getAppName(String packageName)
Returns the display name of the app from the specified package or null when not available. String getActivityName(String packageName, String className)
Returns the display name of the activity from the specified package and class or null when not available. String getServiceName(String packageName, String className)
Returns the display name of the service from the specified package and class or null when not available. List getFlowNames()
Returns a list containing the names of all flows. List getWidgetNames()
Returns a list containing the names of all widgets. Note: Are you missing a function? Please let us know in the forum.
Advanced Topics
Every executable expression in a script evaluates to a value. A block of code evaluates to the value produced by the last expression in the block and allows to create inline scripts with multiple expressions: s = "{a=1;b=2}"; log(s);//logs 2 a = true;
b = if (a) 1 else 2; log(b);//logs 1
for (a in [0 to 10]) {
log(if(aApps->All, Select the app->Deactivate).
For example, you can disable the app Tags on a Galaxy Nexus to prevent the selection list from showing.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description.
Supplied Variables triggertime
the time the trigger executed nfc_tag_ids
the scanned tag ID or a comma separated list when the tag contained multiple IDs
Notification on Screen Displayed
The trigger Notification on Screen Displayed is executed when a notification is displayed on the screen. Note: At least Android 4.0 (ICS) is required.
Examples: Read out the text of a notification
Settings Package Name The comma separated list of apps that displayed the notification. Glob patterns can be used to match multiple packages.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed notification_message
the text of the displayed notification package_name
the name of the package that displayed the notification
app_name
the display name of the app
Notification on Statusbar Displayed
The trigger Notification on Statusbar Displayed is executed when a notification is displayed in the statusbar.
Examples: Turn the screen on when Gmail app receives a mail
Settings Package Name The comma separated list of apps that displayed the notification. Glob patterns can be used to match multiple packages. Ignore ongoing events
Defines whether or not the trigger should execute the flow for ongoing events.
A notification is marked as an ongoing event by the application that posts the notification and is usually set when a notification shows some progress like a file download, an app is playing a sound, or an app is running as a foreground service.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed title
the title of the displayed notification notification_text (This function is not officially supported by Android and does not work with all notifications)
the textual content of the notification
notification_text_big (Android 4.1+, This function is not officially supported by Android and does not work
with all notifications)
the textual content of the big, expanded view of the notification package_name
the name of the package that displayed the notification app_name
the display name of the app id (Android 4.3+)
the id of the notification buttons (Android 4.1+, This function is not officially supported by Android and does not work with all
notifications)
the list of buttons available on the big, expanded notification
Notification on Statusbar Removed
The trigger Notification on Statusbar Removed is executed when a notification is removed from the statusbar.
Examples: Disable mobile data access when a music app displaying a notification is stopped
Settings Package Name The comma separated list of apps that displayed the notification. Glob patterns can be used to match multiple packages. Ignore ongoing events
Defines whether or not the trigger should execute the flow for ongoing events.
A notification is marked as an ongoing event by the application that posts the notification and is usually set when a notification shows some progress like a file download, an app is playing a sound, or an app is running as a foreground service.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed title
the title of the displayed notification notification_text (This function is not officially supported by Android and does not work with all notifications)
the textual content of the notification notification_text_big (Android 4.1+, This function is not officially supported by Android and does not work
with all notifications)
the textual content of the big, expanded view of the notification package_name
the name of the package that displayed the notification app_name
the display name of the app id (Android 4.3+)
the id of the notification
Notification on Statusbar Selected
The trigger Notification on Statusbar Selected executes the flow when a notification is selected that was previously shown using action Notification on Statusbar.
Example: Show a notification when the airplane mode is enabled by a flow. Turn airplane mode manually off when the notification in the statusbar is selected.
Settings Notification Create own Notification
Creates a new notification on the statusbar. Trigger on Notification from Action
Trigger the flow when a notification supplied by action Notification on Statusbar was selected.
Icon The icon to use for this notification. Title The title of the notification. Message The message of the notification. Play Sound Plays the default notification sound when checked. Vibrate Vibrates when checked. Flash LED Flash the notification LED using the supplied color. Notification LED and user defined colors are not supported on all devices. Ongoing Flags this notification as an ongoing event and prevents the removal of this notification from the statusbar. A notification ID is mandatory when this option is selected. Priority (Android 4.1+) Defines the priority of the notification. A notification with a low priority might be displayed in the expanded statusbar only (depends on Android version). Notification IDs Whether the trigger should be executed for one specific ID or for all notifications. The ID can be defined in the action Notification on Statusbar. Big Message (Android 4.1+, Premium)
Defines a big message that will be displayed when the notification is expanded (by swiping down on the notification). The notification usually also shows the big message when the notification is displayed as the topmost notification on the notification drawer. You can affect the ordering of the notifications by using the priority setting. Actions (Android 4.1+, Premium)
Up to three actions displayed as buttons when the notification is expanded (by swiping down on the notification). The notification usually also shows the action buttons when the notification is displayed as the topmost notification on the notification drawer. You can affect the ordering of the notifications by using the priority setting. Tip: Use action Execute Flows to execute a complex flow consisting of multiple actions and conditions.
Following variables are supplied to the executed action: action_number: contains the number of the action (1, 2 or 3)
action_text: the text label of the selected action button on the notification
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed notification_title
the title of the notification notification_message
the message of the notification notification_id
the ID of the selected notification
Outgoing Call
The trigger Outgoing Call is executed when an outgoing call is made and the criteria defined in the options match.
Examples: Start recording in Gleeo Time Tracker when you call your employer. Send a mail containing the called number and time to your mail account.
Settings Called Callnumber List The list of callnumbers when the flow should be executed. Multiple numbers can be separated by comma.
Glob patterns (*, ?) can be used to filter on similar numbers like corporate number ranges:
Examples: +17001111111 +17001111111,+17002222222 *70033311* *70033311*,*70033?22*
Special characters like +, - and . are removed before comparing the number. Warning: Verify that the called number is formatted to your expectations.
You have to check the log file to see the exact formatting used or you can add an action Notification on Screen with text {called_number} to see the actual number.
Phone state Defines the state of the call to trigger the flow. Selecting multiple states triggers the flow once for each state.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed called_number
the number of the called party call_state
the state of the call (IDLE, OFFHOOK) contact_name
the name of the contact if available contact_company
the company of the contact if available contact_title
the title of the contact if available contact_note
the note of the contact if available contact_nickname
the nickname of the contact if available contact_email
an email address of the contact if available contact_groups
the list of groups of the contact if available
Periodic Location Update
The trigger Periodic Location Update is executed in periodic intervals and delivers a location to the executed flow.
The accuracy of the location heavily depends on the selected location provider. Tip: The higher the time interval between updates the less battery will be used. A frequency of about 4 minutes is recommended.
Examples: Record the location every 5 minutes to a file. Send an SMS with your location every hour to someone.
Settings Location Provider The location provider to use. Network
This provider uses the location provided by the cell tower and Wi-Fi signals. Depending on environment this provider can deliver location of about 60 meters of accuracy. Locations found using the cell tower can be very inaccurate (up to several kilometers or miles). Passive
This provider delivers the location from the currently active provider (Network or GPS) without activating one of the providers by itself. This might result in very infrequent location updates. GPS
This provider delivers the location using the GPS receiver. This provider usually uses more battery than the network provider. High Accuracy (Experimental)
This provider delivers the finest available location using different sensors available on the device. Balanced Power/Accuracy (Experimental)
This provider delivers the a location with an accuracy of about 100m and uses less battery than the high accuracy provider. Low Power (Experimental)
This provider delivers the a location with an accuracy of about 10km. No Power (Experimental)
This provider will only deliver locations when another app on the device has requested locations.
Frequency The desired time between location updates. The actual time between location updates depends on the location provider when Enforce Exact Frequency is not checked.
A location provider (for example GPS) can ignore the specified frequency and deliver updates every few seconds. Enforce Exact Frequency Ensures that the location is provided in the intervals specified by Frequency even when the location provider delivers the location updates more often or less often. Minimum Accuracy (in meters) Only newer locations with at least the specified accuracy are passed to the flow.
This can be useful to filter out locations calculated using the cell tower when also more exact locations using WiFi are available. Limit time range Whether the trigger should be active all the time or only within a defined time range. Weekdays The day on which the trigger should be active. From - To The start of the time range and the end of the time range. A To-time smaller than the From-time will move the To-time to the next day to simplify checks for time ranges crossing midnight.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed location
the reported location location_accuracy
the accuracy of the location location_altitude
the altitude of the location when available location_bearing
the direction of travel in degrees East of true North when available location_speed
the speed of travel in meters per second when available
Periodic Timer
The trigger Periodic Timer is executed in the specified interval.
Examples: Remind about a recording task in Gleeo Time Tracker every 5 minutes.
Settings Interval Defines the time interval between flow executions. Wake device when in sleep mode
Defines whether the device should be woken up from sleep mode.
Disabling this option saves a bit of battery but delays the trigger invocation for an unknown amount of time when the devices is asleep. Limit time range Whether the trigger should be active all the time or only within a defined time range. Weekdays The day on which the trigger should be active. From - To The start of the time range and the end of the time range. A To-time smaller than the From-time will move the To-time to the next day to simplify checks for time ranges crossing midnight.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed
Periodic Timer Inexact
The trigger Periodic Timer Inexact is executed approximately in the specified interval. The device can adjust the time of the trigger a bit and call the trigger when the device is currently also executing other tasks. This trigger uses less battery than the regular trigger Periodic Timer
Examples: Check approximately once an hour if a server is online.
Settings Interval (Inexact) Defines the time interval between flow executions. Android only supports the times available in this list. Wake device when in sleep mode
Defines whether the device should be woken up from sleep mode.
Disabling this option saves a bit of battery but delays the trigger invocation for an unknown amount of time when the devices is asleep. Limit time range Whether the trigger should be active all the time or only within a defined time range. Weekdays The day on which the trigger should be active. From - To The start of the time range and the end of the time range. A To-time smaller than the From-time will move the To-time to the next day to simplify checks for time ranges crossing midnight.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed
Phone Cell CDMA
The trigger Phone Cell CDMA is executed when the device connects or disconnects from the defined cells. Changes within the defined list of cells don't invoke the trigger. Warning: Some devices don't report the cell to Automagic when the screen is turned off.
Examples: Turn WiFi on, when the device connects to one of the cells at home
Settings Cell List A comma separated list of cell IDs. Glob patterns (*, ?) are supported. Variables are supported. Cell List to Ignore A comma separated list of cell IDs to ignore. Glob patterns (*, ?) are supported. Variables are supported. Connected / Disconnected Whether the trigger should be executed when the device connects or disconnects from the listed cells. Changes within the defined list of cells don't invoke the trigger. Wake device Whether the trigger should wake the CPU of the device every X minutes or not. This is necessary for some devices when the cell is not updated regularly. Consumes more battery when a shorter time interval is chosen. Turn screen on Whether the display should be turned on briefly or not. This is necessary for some devices when the cell is not updated otherwise. This option increases battery consumption and should only be enabled when the cell is not updated otherwise. Force update Whether the cell update should be forced. This option increases battery consumption and should only be enabled when the cell is not updated otherwise.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed cell_id
the cell id, null if unknown base_station_id
the ID of the base station , -1 if unknown network_id
the ID of the network, -1 if unknown system_id
the ID of the system, -1 if unknown base_station_latitude
the latitude of the base station in quarter degree seconds, 2147483647 if unknown. Divide value by 14400 to get decimal degrees. Not all networks provide meaningful values. base_station_longitude
the longitude of the base station in quarter degree seconds, 2147483647 if unknown. Divide value by 14400 to get decimal degrees. Not all networks provide meaningful values. connected
true when connected to the defined cells, false otherwise disconnected
true when disconnected from the defined cells, false otherwise
Phone Cell GSM
The trigger Phone Cell GSM is executed when the device connects or disconnects from the defined cells. Changes within the defined list of cells don't invoke the trigger. Warning: Some devices don't report the cell to Automagic when the screen is turned off.
Examples: Turn WiFi on, when the device connects to one of the cells at home
Settings Location Area Code (LAC) List A comma separated list of location area codes. A location area is set of base stations and usually covers a large area. Glob patterns (*, ?) are supported. Variables are supported. Cell ID (CID) List A comma separated list of cell IDs. Glob patterns (*, ?) are supported. Variables are supported. Cell ID (CID) List to Ignore A comma separated list of cell IDs to ignore. Glob patterns (*, ?) are supported. Variables are supported. Connected / Disconnected Whether the trigger should be executed when the device connects or disconnects from the listed cells. Changes within the defined list of cells don't invoke the trigger. Wake device Whether the trigger should wake the CPU of the device every X minutes or not. This is necessary for some devices when the cell is not updated regularly. Consumes more battery when a shorter time interval is chosen. Turn screen on Whether the display should be turned on briefly or not. This is necessary for some devices when the cell is not updated otherwise. This option increases battery consumption and should only be enabled when the cell is not updated otherwise. Force update Whether the cell update should be forced. This option increases battery consumption and should only be enabled when the cell is not updated otherwise.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed lac
the currently connected location area code (LAC), -1 if unknown cid
the currently connected cell ID (CID), -1 if unknown psc
the primary synchronization code (PSC), -1 if unknown connected
true when connected to the defined cells, false otherwise disconnected
true when disconnected from the defined cells, false otherwise
Phone Service State
The trigger Phone Service State is executed when the device detects the specified state. Warning: Some devices don't send the current service state to applications when the screen is turned off. You can periodically use the action Turn Screen On to mitigate this problem.
Examples: Play a warning sound when no service is available.
Settings Phone Service State In Service
Execute the flow when the telephony is back to regular operation. Out of Service
Execute the flow when telephony becomes unavailable. Emergency Only
Execute the flow when only emergency numbers can be called. Power Off
Execute the flow when the radio is explicitly powered off.
Wake device Whether the trigger should wake the CPU of the device every X minutes or not. Consumes more battery when a shorter time interval is chosen. Turn screen on Whether the display should be turned on briefly or not. This option increases battery consumption and should only be enabled when the values are not updated otherwise.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed previous_service_state
the previous service state (0=in service, 1=out of service, 2=emergency only, 3=power off) service_state
the current state of the service (0=in service, 1=out of service, 2=emergency only, 3=power off) roaming
boolean indicating the roaming status
Phone Signal Strength
The trigger Phone Signal Strength is executed when the signal strength falls under or raises over the specified value.
Examples: Play an alert when the signal strength becomes bad.
Settings Signal Strength Condition
Defines the condition that must be met to execute the flow: becomes lower than
Executes the flow when the last reported value was above the defined level and the current value is below the defined level becomes higher than
Executes the flow when the last reported value was below the defined level and the current value is above the defined level becomes equal to
Executes the flow when the last reported value was different than the defined level and the current value equals the defined level lower than
Executes the flow whenever the reported value by the system is below the defined level. Depending on device this might cause the flow to be executed every few seconds. The flow is executed even when the last value has been the same. higher than
Executes the flow whenever the reported value by the system is above the defined level. Depending on device this might cause the flow to be executed every few seconds. The flow is executed even when the last value has been the same.
exactly
Executes the flow whenever the reported value by the system is exactly on the defined level. Depending on device this might cause the flow to be executed every few seconds. The flow is executed even when the last value has been the same. Signal Strength Defines the signal strength to use. Wake device Whether the trigger should wake the CPU of the device every X minutes or not. Consumes more battery when a shorter time interval is chosen. Turn screen on Whether the display should be turned on briefly or not. This option increases battery consumption and should only be enabled when the values are not updated otherwise.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed is_gsm
true when GSM signal_strength_level
the signal strength in a value from 0 to 4 like the bars on a standard Android device signal_strength_asu
the signal strength in ASU (0-31) gsm_signal_strength
the GSM signal strength (0-31, 99 for unknown, -1 for unavailable) gsm_bit_error_rate
the GSM bit error rate (0-7, 99 for unknown, -1 for unavailable) cdma_dbm
the CDMA RSSI value in dBm (-1 for unavailable) cdma_ecio
the CDMA Ec/Io value in dB*10 (-1 for unavailable) evdo_dbm
the EVDO RSSI value in dBm (-1 for unavailable) evdo_ecio
the EVDO Ec/Io value in dB*10 (-1 for unavailable) evdo_snr
the EVDO signal to noise ratio (0-8, -1 for unavailable)
Plugin (Experimental)
The trigger Plugin (Experimental) executes a flow when the condition of a plugin changes to true and/or false. Warning: This function is experimental and might not work with all existing plugins available in Google Play. We can not provide support for plugins. Note: Plugins can be defined using the interface description available from the app Locale: Locale developer documentation and Tasker: Tasker plugin extensions. Settings Plugin List of all available plugins found on the device. Condition becomes true: when the condition measured in the plugin changes from false or undefined to true
becomes false: when the condition measured in the plugin changes from true or undefined to false
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed condition
whether the condition became true or false
Plugin Event (Experimental)
The trigger Plugin Event (Experimental) executes a flow when an event-plugin indicates an event. Warning: This function is experimental and might not work with all existing plugins available in Google Play. We can not provide support for plugins. Note: Plugins can be defined using the interface description available from the app Locale: Locale developer documentation and Tasker: Tasker plugin extensions. Settings Plugin List of all available plugins found on the device.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed
Power Source
The trigger Power Source is executed when a power source is connected to the device (charger or USB cable).
Examples: Turn on WiFi when a power source is connected. Increase the screen brightness when a power source is connected. Set screen brightness to automatic when a power source is disconnected.
Settings Power connected/disconnected Connected
When selected executes the flow when a power source is connected. AC Adapter: when charging with the AC adapter USB: when charging over an USB connection Wireless: when charging wirelessly Disconnected
When selected executes the flow when a power source is disconnected.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed battery_level
the charging level of the battery battery_percentage
the charging percentage battery_plugged
whether the battery is plugged (1=AC adapter, 2=USB, 4=Wireless) or not (0=not plugged) battery_present
whether the battery is present or not battery_scale
the maximum battery level
battery_status
the status of the battery (1=unknown, 2=charging, 3=discharging, 4=not charging, 5=full) battery_technology
the technology of the battery battery_temperature
the temperature of the battery battery_voltage
the current battery voltage battery_health
the health of the battery
Pressure Sensor
The trigger Pressure Sensor is executed when the measured pressure of the pressure sensor rises above or declines below a certain level or when the pressure changes at least the specified amount in the given time. Warning: This trigger uses the device hardware sensors and might increase battery usage (depending on device model). Some devices turn off the sensors when the screen is off. Tip: If you need to check the pressure only every few minutes, it is recommended to use a condition Pressure Sensor since the condition will not use the sensor constantly and thus consumes less battery.
Examples: Execute a flow when the pressure changes when walking down a stair
Settings Type Declines below: executes the trigger when the measured pressure falls under a certain value Rises above: executes the trigger when the measured pressure rises above a certain value Declines within duration: executes the trigger when the measured pressure declines a certain amount within a
given time Rises within duration: executes the trigger when the measured pressure rises a certain amount within a given time Pressure (in mbar) The pressure in millibar to compare. Threshold
The minimal change in pressure before the trigger is executed again.
Example:
Type: Declines below, Pressure 1000mbar, Threshold: 5mbar
The trigger is executed when the pressure declines below 1000mbar. The pressure has to rise to at least 1005mbar again before the trigger is executed again. Change (in mbar) The change in pressure in mbar. Duration The duration the pressure change has to happen for the trigger to execute.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed pressure
the measured pressure in mbar
Proximity Sensor
The trigger Proximity Sensor is executed when the measured distance of the proximity sensor passes the defined distance.
Warning: This trigger uses the device hardware sensors and might increase battery usage (depending on device model). Some devices turn off the sensors when the screen is off. Settings Distance (in cm) Whether to execute the trigger when the distance passes above or below the defined distance and the distance in cm.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed proximity
the measured value of the proximity sensor
Screen Orientation
The trigger Screen Orientation is executed when the orientation of the device changes to portrait or landscape.
Examples: Change the active keyboard type depending on screen orientation
Settings Portrait or Landscape Whether the trigger should be executed when the display changes to portrait or landscape.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables
triggertime
the time the trigger executed
Shake
The trigger Shake is executed when the device is shaken. Warning: This trigger uses the device hardware sensors and might increase battery usage (depending on device model). Some devices turn off the sensors when the screen is off.
Examples: Raise the screen brightness for 1 minute when the device is shaken. Turn silent mode on when the device is shaken.
Settings Sensitivity Defines how strong a shake must be to invoke the trigger.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed
Shortcut
The trigger Shortcut is executed when a shortcut on the launcher is pressed.
You can create the shortcut and select an icon by pressing the Install Shortcut button.
Examples: Turn WiFi on by pressing the shortcut. Launch a settings application screen by pressing the shortcut. Start recording in Gleeo Time Tracker by pressing the shortcut.
Settings Title The title/name of the shortcut to create.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed
Shutdown
The trigger Shutdown is executed before the device shutdown.
A flow is executed on a best effort basis, Automagic might not have enough time to execute the flow completely or some services or interfaces might already be unavailable when the shutdown is detected.
Examples: Vibrate before the device shuts down
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed
Significant Motion Detected
The trigger Significant Motion Detected is executed when the special hardware sensor of the device detects a significant motion. Automagic can not configure how strong or how long the duration of the motion needs to be to activate the sensor. Warning: This trigger hardware sensors of the device. This special hardware sensor used by this trigger should have a very low battery consumption.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed
SMS Received
The trigger SMS Received is executed when an SMS is received depending on the criteria defined in the options.
Examples: Play a special alert when an SMS containing the keyword Alert! Send an SMS containing your location back to the SMS sender when the SMS contains Where are you? Read the received SMS aloud. Delete a password file on the SD card when the SMS contains house search! Play a repeating sound and vibrate when an SMS contains device lost! Tip: Use a keyword or password that will not be part of a regular SMS to avoid unpleasant surprises. Settings SMS Sender List The list of callnumbers when the flow should be executed. Multiple numbers can be separated by comma.
Glob patterns (*, ?) can be used to filter on similar numbers like corporate number ranges:
Examples: +17001111111 +17001111111,+17002222222 *70033311* *70033311*,*70033?22*
Special characters like +, - and . are removed before comparing the number. Warning: The formatting of the incoming number depends on the operator in use.
You have to check the log file to see the exact formatting used or you can add an action Notification on Screen with text {sms_sender} to see the actual number. Contains Text Only executes the flow when the text of the SMS contains the given text (no wildcards supported). The text is not case sensitive. Prevent other apps from receiving the SMS
Prevents the regular SMS application from receiving the SMS. Warning: Only check this option when you are sure that Contains Text does not match regular SMS by accident. Warning: This feature is not supported on Android 4.4+.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed sms_text
the text of the SMS sms_sender
the sender of the SMS contact_name
the name of the contact if available contact_company
the company of the contact if available contact_title
the title of the contact if available contact_note
the note of the contact if available contact_nickname
the nickname of the contact if available contact_email
an email address of the contact if available contact_groups
the list of groups of the contact if available
SMS Sent
The trigger SMS Sent is executed when an SMS is sent and stored as a sent SMS in the default SMS outbox of the standard Android SMS database.
Warning: This function is not officially supported by Android and might not work on all devices.
Examples: Send every sent SMS as a mail to your mail account
Settings SMS Receiver List The list of callnumbers when the flow should be executed. Multiple numbers can be separated by comma.
Glob patterns (*, ?) can be used to filter on similar numbers like corporate number ranges:
Examples: +17001111111 +17001111111,+17002222222 *70033311* *70033311*,*70033?22*
Special characters like +, - and . are removed before comparing the number.
Contains Text Only executes the flow when the text of the SMS contains the given text (no wildcards supported). The text is not case sensitive.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed sms_text
the text of the SMS sms_receiver
the receiver of the SMS contact_name
the name of the contact if available contact_company
the company of the contact if available contact_title
the title of the contact if available contact_note
the note of the contact if available contact_nickname
the nickname of the contact if available contact_email
an email address of the contact if available contact_groups
the list of groups of the contact if available
Sound Level (Experimental)
The trigger Sound Level (Experimental) is executed when the recorded sound level in the environment exceed a certain level. Warning: This condition records the environment sound using the microphone of the device which does not work, when another app already uses the microphone. Settings Average If the current sound level should be considered or the duration to record and calculate the sound level. Sensitivity The sensitivity of the slider to define the sound level. Sound Level The sound level to check.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed sound_level
the detected sound level
Speed
The trigger Speed is executed when the measured speed of the GPS receiver rises above or declines below a certain level. Warning: This trigger uses the GPS receiver and might increase battery usage (depending on device model).
Examples: Record the location in a file whenever you are driving faster than 120km/h
Settings Type Declines below: executes the trigger when the reported speed falls under a certain value Rises above: executes the trigger when the reported speed rises above a certain value Speed The speed to compare. Unit The unit of the speed. Threshold
The minimal change in speed before the trigger is executed again.
Example:
Type: Declines below, Speed 40km/h, Threshold: 10km/h
The trigger is executed when the speed declines under 40km/h. The speed has to rise to at least 50km/h again before the trigger is executed again.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed location
the reported location location_accuracy
the accuracy of the location location_altitude
the altitude of the location when available location_bearing
the direction of travel in degrees East of true North when available location_speed
the speed of travel in meters per second
Storage Media Event
The trigger Storage Media Event is executed when the system mounts or unmounts the SD card or makes other changes involving the storage media.
Examples: Disable a flow writing the location to the SD card when the sdcard is removed.
Settings Event Defines the event when the flow should be executed.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed path
the affected path
System Setting Changed
The trigger System Setting Changed is executed whenever a setting in the systems setting database was changed. Warning: This function is not officially supported by Android and might not work on all devices.
Examples: Play an alert when the system turns on the blocking mode.
Settings Category System: for regular settings Secure: for settings which can usually not be modified Global: for global Settings valid for all users of the device (Android 4.2+) Name The name of the setting to watch. Variable The name of the variable with the new value of the setting to pass to the flow.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed old_setting
the value of the setting before it was changed setting
the new value of the setting
Time
The trigger Time is executed regularly on the defined weekday and time.
Examples: Download a PDF newspaper every morning at 6am. Turn on airplane mode every evening at 11pm. Turn off airplane mode every morning at 6am.
Settings Weekdays The day on which the trigger should execute the flow. Time The time of the day when the trigger should execute the flow.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed
Time Adjusted
The trigger Time Adjusted is executed when the time of the system is changed.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed
Timezone Adjusted
The trigger Timezone Adjusted is executed when the timezone of the system has been changed.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed timezone
the new timezone
User Activity (Experimental)
The trigger User Activity (Experimental) asks the device to periodically check most probably physical activity of the user like driving a car, riding a bike or walking. Note: The detection of the current activity is a feature of the device provided by Google. Automagic can not change or improve the quality of the detected activity.
Examples: Check the activity every 5 minutes to measure how much time the user walks per day and how much time the user sits in the office. Increase the ringer volume when the user is driving in a car.
Settings Trigger when Activity detected: execute the flow when the defined activity begins or ends. Periodically: execute the flow periodically even when the activity stays the same. Activity
Defines which activity should trigger the flow. Begin executes the flow when the detected activity switches to the defined activity and was different before. Ends executed the flow when the defined activity was in progress before and is not detected anymore.
Enforce Exact Frequency Ensures that the flow is executed exactly at the defined frequency even when the detected activity changes more or less frequent. Check Frequency
The desired time between activity checks. The actual time between activity updates depends on the device when Enforce Exact Frequency is not checked.
The device can detect the activity more frequently when another app is interested in activity updates and uses a shorter update interval. Some devices turn off activity detection when activity still is detected and a low power sensor to detect device movement is available.
Minimum Confidence The minimum confidence level to accept (0=unconfident, 100=confident). Limit time range Whether the trigger should be active all the time or only within a defined time range. Weekdays The day on which the trigger should be active. From - To The start of the time range and the end of the time range. A To-time smaller than the From-time will move the To-time to the next day to simplify checks for time ranges crossing midnight.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed activity_name
the name of the activity ("in_vehicle", "on_bicycle", "on_foot", "tilting" or "unknown") activity_type
the type of the activity as a number (0=in_vehicle, 1=on_bicycle, 2=on_foot, 3=still, 4=unknown, 5=tilting) activity_confidence
the confidence in a number from between 0=unconfident and 100=confident activity_time
the time when the activity was originally detected
User Present
The trigger User Present executes the flow when the user activates the device and passed the unlock screen.
Example: Start the browser when the device is unlocked at home.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed
WiFi Connected
The trigger WiFi Connected is executed when a connection with the defined network has been established.
Examples: Download a file as soon as WiFi is available.
Settings SSID List The list of SSIDs to execute the flow when connected. The list can contain glob pattern characters like * and ?.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed bssid
the BSSID of the connected WiFi network ssid
the SSID of the connected WiFi network
WiFi Disconnected
The trigger WiFi Disconnected is executed when a connection with the defined network has been separated.
Examples: Play an alert when WiFi is not available anymore. Turn off flows causing big data transfers.
Settings SSID List
The list of SSIDs to execute the flow when disconnected. The list can contain glob pattern characters like * and ?.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed bssid
the BSSID of the disconnected WiFi network ssid
the SSID of the disconnected WiFi network
WiFi Scan Results Available
The trigger WiFi Scan Results Available is executed when the results of a WiFi access point scan are available.
Examples: Connect to a free WiFi network when it becomes available.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed access_points
the list of available access points
WiFi State
The trigger WiFi State is executed when the devices wireless network adapter changes to one of the defined states.
Examples: Enable some download flows when WiFi is turned on
Settings WiFi States The accepted states.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed previous_wifi_state
the wifi state (0=disabling, 1=disabled, 2=enabling, 3=enabled, 4=unknown) wifi_state
the wifi state (0=disabling, 1=disabled, 2=enabling, 3=enabled, 4=unknown)
Wired Headset Plugged
The trigger Wired Headset Plugged is executed when a wired headset or earphones have been connected or disconnected.
Examples: Turn down the volume when the headset is connected.
Settings Wired headset plugged/unplugged Plugged
Execute the flow when the headset has been plugged. Unplugged
Execute the flow when the headset has been unplugged.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables triggertime
the time the trigger executed headset_type
the type of the headset microphone
whether a microphone is available or not
Conditions Base Concepts Creating the First Flow Creating a Custom Widget Main Screens Triggers Conditions Actions
Active Network Type Airplane Mode On App Process Running App Task Running Audio Manager Mode Audio Volume Auto Sync Enabled Auto-rotate Screen Enabled Battery Level Bluetooth Device Connected Bluetooth Enabled Bluetooth SCO On Calendar Event Call State Confirmation Dialog Debug Dialog Device Orientation Device Storage Space Device Storage Space Low Dock State Execution Count Expression Flow Enabled Flow Executing Gleeo is Recording Gmail Unread Conversation Count Host Reachable Keyguard Locked Light Sensor Location Location Entering Location Provider Enabled Time Range UI Mode Vibrate on Ring Enabled
WiFi Access Point Enabled WiFi Available WiFi Connected Wifi Signal Level WiFi State Microphone Mute Mobile Datanetwork Enabled Mobile Datanetwork Type Music Active Network Connected NFC Enabled Night Mode Notification on Statusbar Displayed Phone Cell CDMA Phone Cell GSM Phone Service State Phone Signal Strength Plugin (Experimental) Power Source Connected Pressure Sensor Proximity Sensor Ringer Mode Roaming Screen On Screen Orientation Service Running Sound Level (Experimental) Speakerphone On Telephony Radio Enabled WiFi Tethering State Wired Headset Plugged
Conditions Active Network Type
The condition Active Network Type checks if a network (usually WiFi or Mobile) is active and usable for data traffic.
Examples: Execute a download action only when the current active network is WiFi
Settings Network Type Defines for what network types the condition should be true
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables network_type
the network type as number (None=-1, Mobile=0, WiFi=1, WiMAX=6, Bluetooth=7, Ethernet=9) network_type_name
the name of the network as string like WIFI or MOBILE network_subtype
the network subtype as number
network_subtype_name
the network subtype as number network_state
the network state (CONNECTING, CONNECTED, SUSPENDED, DISCONNECTING, DISCONNECTED, UNKNOWN) network_detailed_state
the detailed network state (IDLE, SCANNING, CONNECTING, AUTHENTICATING, OBTAINING_IPADDR, CONNECTED, SUSPENDED, DISCONNECTING, DISCONNECTED, FAILED, BLOCKED, VERIFYING_POOR_LINK, CAPTIVE_PORTAL_CHECK) network_extra_info
additional info as string (like SSID), when available network_reason
the reason of a failure, when available
Airplane Mode On
The condition Airplane Mode On checks whether the airplane mode is on or not.
Examples: Only download a file when airplane mode is turned off.
App Process Running
The condition App Process Running checks whether the process hosting an app is currently running. Note: Android keeps processes in memory even when the process might not be required anymore and enough free memory is available. Settings Package Name The name of the process to check. Variables are supported.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables pid
the id of the process importance
the importance of the process. The smaller the value the higher the importance. lru
least recently used. Smaller value means more recently used. uid
the user id of the process
App Task Running
The condition App Task Running checks whether a task for one of the specified packages is currently running. Settings Package Name The name of the app to check. Glob patterns (*, ?) are supported. Variables are supported. check most recent app task only if only the most recent app task should be checked (this is the active app on many Android versions)
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables index
the index of this task. An index of zero denotes the most recent running task. base_activity
the component launched as the first activity in the task top_activity
the activity component at the top of the history stack of the task id
a unique identifier for this task num_running
the number of activities that are currently running (not stopped and persisted) in this task description
a description of the task's current state
Audio Manager Mode
The condition Audio Manager Mode checks whether the device is currently configured to use the desired audio manager mode. Settings Audio Manager Mode The desired audio manager mode to check.
Audio Volume
The condition Audio Volume checks whether the volume of the selected stream type is above or below a certain level.
Examples:
Execute a vibrate action only when the music volume is very low
Settings Sound Type The type of the audio stream to check. Condition Whether the condition should check if the volume is above or below the volume level. Volume The volume value to check.
Auto Sync Enabled
The condition Auto Sync Enabled checks whether the automatic synchronisation is turned on or off either globally (the master switch) or for a specific account/authority.
Examples: Check the current state of auto sync to toggle the setting to the opposite value
Settings Global or Specific Whether the global master switch should be checked or a specific account/authority. Account The account to check in format Type:Name. Variables are supported. Authority The part/database of the account to check. Variables are supported.
Auto-rotate Screen Enabled
The condition Auto-rotate Screen Enabled checks whether the system setting to automatically rotate the screen is enabled or not.
Battery Level
The condition Battery Level checks whether the battery level is above or below a certain level.
Examples: Download a file only when the battery level is above 50%.
Settings Battery Level
Defines the condition that must be met to continue the flow on the true branch: lower than
true when the reported percentage by the system is below the defined level higher than
true when the reported percentage by the system is above the defined level exactly
true when the reported percentage by the system is exactly on the defined level full
true when the reported battery status by the system is full Level Percentage Defines the level percentage.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables battery_level
the charging level of the battery battery_percentage
the charging percentage battery_plugged
whether the battery is plugged (1=AC adapter, 2=USB, 4=Wireless) or not (0=not plugged) battery_present
whether the battery is present or not battery_scale
the maximum battery level battery_status
the status of the battery (1=unknown, 2=charging, 3=discharging, 4=not charging, 5=full) battery_technology
the technology of the battery battery_temperature
the temperature of the battery battery_voltage
the current battery voltage battery_health
the health of the battery (1=unknown, 2=good, 3=overheat, 4=dead, 5=over voltage, 6=unspecified failure, 7=cold)
Bluetooth Device Connected
The condition Bluetooth Device Connected checks whether a connection to a Bluetooth device exists. Warning: This function is not directly supported by Android. The list of currently connected Bluetooth devices is collected using connect/disconnect events reported to Automagic. Under certain circumstances, the list of connected devices might not correspond to the list of really connected devices, for example when Automagic is freshly installed and a bluetooth device was already connected. In such cases, the bluetooth adapter must be disabled temporarily and reenabled in the preferences of Android to force the Bluetooth devices to reconnect.
Examples: Turn on WiFi in the evening only when one of the Bluetooth devices at home is connected.
Settings Bluetooth Device Defines whether the condition should check if at least one connection to a device exists or if the condition should check a specific device. Bluetooth Device Address The address of the bluetooth device. Variables are supported. Bluetooth Device Name The name of the bluetooth device.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables connected_devices_addresses
list of addresses of the connected devices connected_devices_names
list of names of the connected devices
Bluetooth Enabled
The condition Bluetooth Enabled checks whether bluetooth is turned on or off.
Examples: Open an app when bluetooth is turned on.
Bluetooth SCO On
The condition Bluetooth SCO On checks whether communications use Bluetooth SCO or not.
Calendar Event
The condition Calendar Event checks, whether an event on the calendar is currently active.
Examples: Send an SMS to the calling number telling when your meeting ends Don't let the SMS be read aloud in a meeting
Settings Starting The start time offset the condition should consider an event as active. Ending The end time offset the condition should consider an event as active. Calendars A comma separated list of calendar names that should be checked for events. The values can contain glob pattern characters like * and ?. Variables are supported. Titles A comma separated list of event titles to match. The values can contain glob pattern characters like * and ?. Variables are supported.
Examples: Plan* matches titles like Planning, Plan B etc.
Descriptions A comma separated list of event descriptions to match. The values can contain glob pattern characters like * and ?. Variables are supported.
Locations A comma separated list of event locations to match. The values can contain glob pattern characters like * and ?. Variables are supported.
Event Type Whether the trigger should consider all day events or regular events (not all day) or both. Event Availability
Whether the trigger should consider events marked as free, busy or tentative.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables event_calendar
the name of the calendar of the event event_title
the title of the event event_description
the description of the event event_location
the location of the event event_start
the start time of the event event_end
the end time of the event event_all_day
boolean indicating if the event is all day or not event_availability
FREE, BUSY or TENTATIVE depending on the availability of the event event_id
the ID of the event
Call State
The condition Call State checks whether a call is currently active or not. Settings Phone state
The accepted states. Note: State Ringing is only valid for incoming calls, an outgoing call directly changes the state from Idle to Off-hook
Confirmation Dialog
The condition Confirmation Dialog shows a dialog with a question and continues flow execution depending on the button pressed.
Examples: Turn on bluetooth but ask for confirmation first.
Settings Question The text of the question to ask. Variables are supported. Activate Timeout Whether an automatic timeout should be used when the user does not react within the specified time. Duration The amount of time to automatically close the dialog and to continue the flow. Value on Timeout Whether the flow should be continued on the Yes or No branch.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables operation
the operation used to close the dialog.
Can be one of: yes when the user pressed the Yes-button no when the user pressed the No-button
timeout when the dialog was closed by a timeout
Debug Dialog
The condition Debug Dialog shows a dialog containing all variables and the corresponding values in a dialog. Buttons can be used to control if the condition continues at "true" or "false.
Examples: Debug a complex flow.
Device Orientation
The condition Device Orientation checks whether the device is in one of the specified orientation.
Examples: Beep every 5 minutes when recording your time but only when the device display is not facing down.
Settings Device Orientation
The desired orientation of the device. Face down: The display of the device is facing down for example when lying on a table with the display towards the table. Face up: The display of the device is facing up for example when lying on a table with the display facing away from the table. Face left: The display faces to the left with the longer side lying on a table when the upper edge of the device is pointing away from you. Face right: The display faces to the right with the longer side lying on a table when the upper edge of the device is pointing away from you. Standing upright: The device is standing upright on a table. Standing upside-down: The device is standing upside-down on a table.
Device Storage Space
The condition Device Storage Space checks the storage space on the filesystem containing the specified path.
Example: Check every morning if 100MB are still free on the SD card.
Settings Filesystem The path of the filesystem to check. Variables are supported. Compare Free or Used Space Whether to check the free or used space on the filesystem. Size The size to check.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text. See action Script for a description. Supplied Variables available_blocks
the number of free blocks available to applications free_blocks
the number of free blocks inclusive reserved blocks not usable by applications block_count
the total number of blocks in the filesystem block_size
the size of the blocks in bytes available_space
the available space in bytes used_space
the used space in bytes
Device Storage Space Low
The condition Device Storage Space Low checks whether the free space of the internal memory of the device is low. Note: The amount of free space to consider as low is defined by the device manufacturer.
Standard Android considers less than 10% of free internal memory as low.
Example: Play a warning sound every 5 minutes when the device storage space is low.
Dock State
The condition Dock State checks whether the device is in one of the docking states or not. Settings Dock States
The accepted docking states. Docked Car: in a car dock Docked Desk: in a desk dock Docked Desk (High End, Digital): in a high end, digital dock Docked Desk (Low End, Analog Dock): in a low end, analog dock Docked Special: in a special dock like a hardware keyboard for an ASUS Transformer Undocked: not in a dock
Execution Count
The condition Execution Count checks whether the condition has been executed a certain amount of times. An internal counter is incremented whenever the condition is executed. The counter is reset to zero when to condition is met.
Examples: Play an alarm when 2 SMS are received in 5 minutes. Turn off the screen when the device is shook 2 times in 10 seconds.
Settings Count The count to compare. Timed Only consider executions that happened within the given duration. Duration The maximum age of executions to consider.
Expression
The condition Expression checks whether the expression is true or not.
Example Expressions: a==1
b > =3
c < b AND a > 3 (a--)==0
startsWith(a, "test") a > addDays(b, 4) isEmpty(files)
Examples: Check if the accuracy of a location is good enough: location_accuracy