Add a file and folder trigger
Use the files and folders trigger to start a bot when a predefined action such as create, delete, rename, or modify is performed on a file or a folder.
For information about how a user with a Bot Runner role can link event triggers, see Linking event triggers to a Bot Runner.
On the left pane, click Automation.
A list of available bots and forms is displayed.
- Click .
Enter a name for the bot.
All the bots are stored under the \Bots folder. Click Browse to change the folder.
- Click Create & edit.
- In the bot builder page, click .
- Drag File trigger into Drag a trigger here.
- Click Browse and select the Product info.docx file.
From the Start the bot when the file is drop-down menu,
This sets the trigger for the bot.
Use the Assigned to drop-down menu to assign a
If you want use the Variables tab to create a variable, ensure you select the Use as input check box for it to appear in the Assigned to (optional) drop-down menu.Note: If you use the in the Assigned to (optional) drop-down menu to create a variable, ensure that you do not select the Constant (read only) check box.The following set of data can be retrieved by defining a variable as the input type, which you can assign to get output from the trigger:
- triggerType: File or folder trigger
- eventType: The type of trigger event
The following set of data cannot be used if the Set Schema check box is selected as it returns a non-string variable type:
- timeStamp: The time when the trigger
Ensure you link the timeStamp value to a string variable to obtain the trigger data. For example, consider you want to extract the date and time for the trigger event when a user modifies the Sales update.xls file. Use the Message action within the task logic, and enter Date Time- $recordVar$ in the Enter the message to display field.
- fromFolder: Details of the parent folder path
- folder: Details of the file or folder path on which the event occurred
- Click Save.
.Whenever a user modifies the Product info.docx, the bot is triggered.