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.
Let us see an example of how it works. The Task monitors for new
C:\PDF\ folder, which also happens to be a network share into which users of the network put their finished
- File & Folder Watcher is configured to monitor the
C:\PDF\folder for new
- Send email Action that sends email with the detected PDF file as attachment.
Dynamic values explained…
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 which file was just detected to add particularly that file, not some other one.
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 are 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. 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 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 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, 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:
- Triggers · the parameter gets data from the preceding Trigger.
- Actions · the parameter is substituted by the output of a preceding Action.
- File · the parameter is read from specified file.
- Date & Time · the parameter will be substituted by current date or time upon Task execution.
- Random · a random number, text or GUID will be generated upon running the Task.
- Network · the parameter will contain data related to current network card.
- System · a system-related data will replace the dynamic value.
- Internal · the parameter will get data from Automation Workshop itself.
- See Variable Wizard · acess every possible dynamic variable…
Help at your fingertips…
If you have any questions, please do not hesitate to contact our support team.