A2019 Trigger | How to invoke file & folder based triggers | Automation Anywhere

 RPA | A2019 File & Folder Trigger| Automation Anywhere - Part-41


A2019 File & Folder Trigger  - In this blog we will explore about the another useful concept i.e. how to perform some set of actions based on the trigger we have applied in our process.

Before we start discussing the steps as to how trigger works first of all let us define what is trigger.

What is Trigger? 

A trigger is an event which is invoked basis on various factors such as file creation, folder creation or receiving of new emails etc. and various other factors.

So now we will discuss as to how we can create triggers or call triggers using A2019 Automation Anywhere which is now called as Automation 360. The various steps to create triggers using A2019 Automation Anywhere community edition are as follows:

  • From the triggers panel, drag and drop the Folder trigger in the trigger area that is present in the workspace after creating the bot. In the properties section browse the folder location and in the start the bot drop down select file created option.
  • Now from the actions panel drag and drop the loop action from the loop package. In the properties section select "for each file in folder" as the iterator and then browse the folder path i.e. the source folder in which we have to loop through the files and store the output in a dictionary variable data type.
  • Then from the File package drag and drop the "Create File" action to create the file in the destination folder. In the properties section browse the destination folder path and then pass in the dictionary variable and give the dictionary key as "name" for file name and "extension" dictionary key for the file extension. If the file already exists if we do not check the overwrite existing file checkbox then it will throw an error so check the overwrite existing file checkbox.
  • Drag and drop the Trigger loop action from the trigger loop package and trigger handle will automatically be inserted when we insert the trigger loop action. In the properties section select the file trigger and start the bot when in that select the created option. Check the also start the bot if it already exists checkbox.
  • Now from the task bot package drag and drop run task bot action select the task bot which you want to run upon triggering of the bot inside the trigger loop action.
  • Finally drag and drop the break action from the trigger loop package so that after the first run the loop breaks and run the next action that is present in the task.
These are the steps that we need to follow in order to trigger the bot upon creation of file in the folder. So now we will look at the code snippet as to how the bot will look like when we create the bot.

A2019 Folder Trigger






So with that we have come to the end of this blog where we discussed what are triggers and how to use triggers with the help of A2019 Automation Anywhere also known as Automation 360.
Lastly I would like to conclude that please provide your feedback after going through this blog post as the feedback that you will share really matters the most to me.

Comments