Create an event trigger that starts an automation when you perform a predefined action such as creating, deleting, renaming, or modifying a file or a folder.

The file modification trigger executes during two types of events:
  • When a file is modified
  • When a file is copied and pasted
This procedure is for a scenario where you want to trigger an automation when a user modifies a document called Product info.docx.
Note:
  • This scenario is for a user with Bot Creator role.

    For information about how a user with a Bot Runner role can link event triggers, see Linking event triggers to a Bot Runner.

  • The File and Folder trigger does not support NAS servers.

Procedure

  1. On the left pane, click Automation.
    A list of available bots and forms is displayed.
  2. Click Create new > Bot.
  3. Enter a name for the bot.
    All the bots are stored under the \Bots folder. (Optional) Click Browse to change the folder.
  4. Click Create & edit.
  5. In the bot builder page, click Triggers > Files & folders.
  6. Drag File trigger into Drag a trigger here.
  7. Click Browse and select the Product info.docx file.
  8. From the Start the bot when the file is drop-down menu, select modified.
    This sets the trigger for the bot.
  9. Optional: Use the Assigned to drop-down menu to assign a variable.
    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 Select variable icon 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 occurred

      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[2]$ 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
  10. Click Save.

Next steps

Configure the required automation using the Actions, and save the automation. When you click Run > Run with triggers, the automation listens for the configured trigger. Whenever a user modifies the Product info.docx, the automation is triggered.