An example of monitoring email

To make things clearer, we will monitor a send email event through Gmail. The steps are listed as follows:

  1. Open the browser and browse to www.gmail.com: To do this, drag and drop the Open browser activity. In the required field for the address, enter www.gmail.com:
  1. Getting username and password: After typing in the address, we have to ask the user for a username and password. For this, we will use the Input dialog activity as shown in the following screenshot. We have dragged and dropped two Input dialog activities to ask the user for a username and password respectively. Until the user types in each dialog and presses okay, the Robot will not work:

Once the user types in the username and password, we save these details into two variables: user and pass. You can convert their values into a variable by going to the Input dialog property in the Properties panel. Just right-click on the empty text box of the Result property and choose Create Variable. We have named it user as shown in the following screenshot:

  1. Entering a username and password: We shall use the Type into activity to enter a username and password by indicating the respective fields for typing in the username and password.

Once the user enters the username and password, he needs to login which he can either do by clicking on the login button or by pressing the Enter key on the keyboard.  We will use the Send hotkey activity to send the Enter key (as shown in the following screenshot). By doing so, the login button is clicked:

  1. Trigger the send email event with a Hotkey trigger: Our next step is to trigger the send mail event. Here, pressing the Enter key will be the trigger. On pressing it, the Robot performs the rest of the send email task. For this, we will use the Hotkey trigger activity. We first have to drag and drop the Monitor events activity as trigger activities only work under it:

Since we are using the Hotkey trigger, we have dropped the Hotkey trigger activity in that area:

In the area for the Event handler, we need to give the sequence of steps for sending the mail, which will involve several steps. For this, we have created a workflow showing all the steps to be followed to send an email. This ranges from clicking on Compose mail to clicking on the Send button as explained in the following steps.

  1. Ask the user for the email ID of the recipient, the subject of the email, and its body: Our next step is to ask the user for details. We will use three Input dialogs, one for the email ID, one for the subject, and one for the content.

As shown in the screenshot, we have used an Input dialog to obtain the recipient's email ID:

We now save the user input email ID inside a variable called name (you can easily create a variable by pressing Ctrl + K inside the Output box in Properties):

In the second Input dialog, we will ask the user to input the subject for the email:

The output, that is, the response entered by the user, is saved as a new variable called Subject? as shown in the following screenshot:

In the third input dialog, the user has to input the message/mail he or she wants to send:

We shall store the user output as a variable called message:

  1. Type in the details: Now that we have all the details that are required for sending the mail, our next step will be to type into the required fields for sending the email. We will use the Type Into activity for this step:

Drag and drop the Type into activity. Then, double-click on it and indicate the area where you want to type the email ID. Since we have saved the email ID as a variable, name, we enter this in the field provided, as shown in the following screenshot:

Our next requirement will be to indicate the area where we want to type the subject of the mail. Since we have saved the subject as a variable, Subject, we enter this in the field provided as shown in the following screenshot:

Now you are required to indicate the area where you want to type the message/mail as indicated in the screenshot. Since we have saved the content of the mail to be sent as a variable, message, we enter this in the field provided as shown in the following screenshot:

  1. Click on Send and confirm if successfully sent: Our final step is to click on the Send button so that the mail is sent and the process is completed. In order to click on the Send button, we will use the Click activity and indicate the Send button. Doing so enables the Robot to easily recognize where to click:

If you want, the Robot can also give a notification once the mail is sent. For this notification we will use the Message box activity, which will display the message, message is sent, as shown in the following screenshot. When the message is displayed, and after the user has pressed OK, the whole workflow will terminate since all of the steps have been executed:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.0.192