Automate smartphone tasks with Automate


Turn off the Wi-Fi on your phone when you leave the house, automatically switch off your smartphone when you go to sleep or activate other devices when you scan an NFC tag: it is all possible with Automate, a flow chart app for Android. As the name suggests, it allows you to automate smartphone tasks. Read here how.

Automation is very different from programming. When programming you have to use all kinds of codes and a programming language. The Android app Automate take a different approach. In this app you use so-called flow charts that you can use to control your Android device. The flowcharts contain blocks that each represent a certain action on your phone, for example “turn off the WiFi function” or “turn the phone on silent”. Automate automatically executes the program code required for this.

Automate contains more than 330 blocks to use in a ‘flow’. Each block has one or more incoming connections, which pass the result of a previous block to this block. The number of outgoing connections depends on the type of block: an action block has one output: OK, and a decision block has two outputs: YES and NO.

You connect blocks to each other via the connections. So you write a program in a graphical way to automate tasks, but there is no programming code involved.

Working with flows

A flow consists of a path with a start and end point, and for blocks that are included in a flow, the path can split. When the flow is executed, Automate performs the tasks in the blocks along the path one by one and follows the path to the other blocks. A flow can be started several times, runs independently of the other flows and they do not get in each other’s way.

The first time you start the app, you will already see a number of sample flows in the main window. For example, there is one that automatically backs up all your flows and stores them on Google Drive. But we will now first set up a simple flow ourselves to introduce you to the possibilities. Press the plus sign at the top. You will now see a flow chart with one block: Flow beginning. This has no input and one output, which is OK. Every flow you create in Automate starts with this block. Press the check mark at the top to save this flow.

Now press the start button underneath. The flow will now be started briefly. After all, Automate starts each flow with the Flow beginning block and follows the connections until no block follows. Because our starting block at the output is not connected to another block, the flow stops immediately. At the bottom of the screen you can consult the log during and after the execution. This way you can see exactly what happens during the execution of the flow.

Now that you know the principle of a flow, you can start with a flow that actually does something. In the newly created flow, press the pencil icon at the top and then Flow chart. You see your flow again with the starting block. Then press top left to open the side panel with all block types. You can enter a search or browse the menus to choose a block.

For example, choose the block Login failed? at the part Interface. This block can be used to detect whether someone has failed to unlock your smartphone. That can indicate whether your smartphone has been stolen or if someone has been a little too curious. After choosing the block type, the chosen block is added to your flow. Now connect the output OK from the starting block with the entrance IN of the block When login failed.

Automatically take a photo on failed login attempt

We will now ensure that when there is a failed attempt to unlock your smartphone, a photo will be taken automatically. The block When login failed is a so-called decision block: it waits for an unlock attempt to fail and then takes action on one of its two exits. If the attempt is unsuccessful, the current flows YES and a successful unlocking along NO.

If the unlock attempt failed (the block then returns YES, which is “Yes, the unlock attempt failed”), we want a photo to be taken. Therefore, add a block Take a picture and connect the YES from When login failed with the entrance of Take a picture and NO from When login failed with the entrance of When login failed. Now press Take a picture and then click the link in orange to give Automate the correct permissions.

Select the camera and choose some settings like photo size, quality, flash mode and so on. At the bottom you fill in the variable for the name of the file, for example “photo”. Now press the button Done to save the settings of the block.

We have not yet given the flow a name. To do that, press the check mark at the top and then . Enter a name and possibly a short description and press OK. We can now test the flow. If you are on Start you will most likely first see an error message in red in the logs. That is because your flow does not yet have sufficient rights. At the bottom you will find the rights that the blocks in your flow need.

Check them to allow the flow. For example, the flow should at least be allowed to activate the device manager so that it can keep track of screen unlock attempts. Choose Activate this device manager when you get that question. Then press again Start to start the flow.

You can now test the flow by entering an incorrect PIN on the unlock screen of your Android device. Then you will see in Automate that the flow has stopped after taking the picture. After a good login attempt you will see in the Android file manager in the folder DCIM / Automate that a photo was taken when you made a wrong login attempt.

Email photo automatically

Of course you want to be notified when trying to unlock your phone. It is most convenient if this takes place on another device. Now let’s create a completely working flow, in which we will also add an email address. With every unsuccessful attempt to unlock your device, you will receive a photo of the “perpetrator” at an email address provided by you.

Add a block Gmail send and connect the input of that block to the output of the block Take a picture. Open the configuration of the block and choose the Gmail account associated with the Android device. You will be asked if Automate is allowed access to sending email from your account, accept that to configure the rest. Enter the recipient’s email address, the subject and message message, if any.

Bee Attachment Automate asks you to choose a file when you press it. But we saved the filename in the previous block in the variable “photo”. Therefore leave the screen that asks for a file name and press the icon to the right of Attachment fx to switch to expression mode. Then enter photo for the file name.

Save the configuration of the block and finally connect the output of the block to the input of When login failed, so that your flow starts again from the beginning after e-mailing the photo and therefore continues to rotate. Test the complete flow again.

If you enter a wrong unlock code in the unlock screen, the block will follow When login failed it YES-path. The next block takes a photo with the phone’s camera and stores the file name in the variable photo. The block afterwards sends you an e-mail and attaches the file whose file name is stored in the variable “photo” as an attachment.

As a result, you get a picture of the culprit trying to get past the unlock screen.

Automate Premium

Automate has tons of options for doing certain tasks automatically, and the example mentioned in this article is just a small sample of what you can do with it. Automate offers handy (English) help for every function.

The nice thing about Automate is that you can safely experiment with the possibilities. The free version of Automate, as we have discussed it here, has as many features as the paid (premium) version, with one major limitation: the active flowcharts can consist of up to 30 blocks in total. So for example you can make one flow with 30 blocks or two with 15 blocks and so on. The flows that have stopped and are not running do not count. The paid version of Automate costs € 2.99 and removes all restrictions.

.

Recent Articles

Related Stories

Stay on op - Ge the daily news in your inbox