Task is the basic unit of Automation Workshop. It's functional core consists of Triggers and Actions, configurable building blocks that replace code and scripts. While they can sometimes operate independently, in most cases it is essential that these Triggers and Actions are able to communicate among themselves. The dynamic values of Variable Wizard are the way Triggers and Actions pass data to each other within a Task.
Introduction example. Let us see an example of how it works. The Task monitors for new
C:\PDF\ which also happens to be a network share into which users of the network put their finished PDF documents. When a new pdf documents is detected, it is automatically sent by email as attachment.
A Task like this is typically designed by using the following Triggers and Actions:
C:\PDF\folder for all PDF (
Note! See the tutorial on how to watch files with file watcher trigger and send them as email attachments for more details on creating such Task.
How can the Send email Action know which file to attach? If it operates independently, there really is no way. The good news is, it does not have to operate independently. The Action can always ask the preceding File / Folder Watcher Trigger which file was just detected to add particularly that file, not some other one. This is where the dynamic values of Variable Wizard come in. Let us see how can an Actions ask something from a preceding Triggers.
The communication of data (file names, paths, dates, sizes, usernames, file contents, etc.) between Triggers and Actions is configured by using dynamic values of Variable Wizard when specifying the parameters of an Action. Notice the Variable Wizard button next to the Attachments parameter input.
The green parameter is dynamic value whose data is derived from a preceding Trigger (or Action). When an Action is performed, the dynamic value is substituted with the actual data to which it refers according to Variable Wizard settings.
In this case, the Attachment parameter in the Send email Action will be dynamically obtained from the File / Folder Watcher Trigger. The Variable Wizard button opens the Variable Wizard - File / folder watcher window.
Variable Wizard features multiple categories that allow obtaining system or context relative values. If a file detected by the File / Folder Watcher Trigger is to be attached to email by the Send email Action, choose File / Folder Watcher in the Triggers category and specify that it will return the Full path and filename value (necessary to uniquely identify the file on disk).
When the File / Folder Watcher Trigger is linked with the Send email Action in aforementioned manner, the former not only automatically launches the Task upon detecting new PDF file in the
C:\PDF\ folder, but also tells the Send email Action the name of detected file so that it can be added to email as attachment.
Although dynamic values normally only link Triggers and Actions within the same Task, it is possible to pass data to another Task by using the Write to file Action and then retrieving the value in another Task from text file by using the Read from file variable in File category of Variable Wizard.
We have seen how using dynamic value of Variable Wizard as the attachment parameter in the Send email Action has allowed to retrieve the filename from the File / Folder Watcher Trigger, thus effectively linking them together. However, there is more to Variable Wizard than just retrieving dynamic data from Triggers. The data can also be retrieved from preceding Actions, text files, system states, or Automation Workshop itself.
Every parameter field that supports Variable Wizard can retrieve dynamic values from the following categories:
If you have any questions, please do not hesitate to contact our support team.