Workflow variables
Use variables to customize your workflows further by allowing dynamic information to be included in the workflow process. For example, if a workflow involves scanning documents and sending them via email, you can use variables such as %userEmail% and %userFullName% to automatically populate the recipient fields with the email and name of the user who initiated the scan. Similarly, you can use variables such as %deviceName% and %deviceID% to identify the device where the scan was made, which can be useful for tracking purposes.
In addition, you can use variables such as %scanDate% and %scanTime% to include the date and time of the scan in the file name or metadata of the scanned document. This can help with the organization and retrieval of scanned documents.
Variables start with the '%' character followed by a variable name (no spaces allowed) and end with the '%' character, e.g. %userEmail%, %userFullName%, etc.
Variables are case-sensitive. If the variable name does not match, the variable is not replaced by its value.
Name | Usage |
---|---|
%userUsername% | The username of the user who made a scan at the terminal. |
%userProviderID% | The authentication provider ID of the user who made a scan at the terminal. |
%userEmail% | The email of the terminal user who made a scan. |
%userFullName% | The full name of the terminal user who made a scan. |
%userDepartment% | The department of the terminal user who made a scan. |
%userHome% | The home folder of the terminal user who made a scan. |
%deviceName% | The name of the device where a scan was made. |
%deviceID% | The ID of the device where a scan was made. |
%deviceDescription% | The description of the device where a scan was made. |
%scanDate% | The local date on SAFEQ Cloud server at the time of a scan in the format yyyy-MM-dd, e.g., '2022-12-21' for December 21, 2022. |
%scanTime% | The local time on SAFEQ Cloud server at the time of a scan in format HH-mm-ss-fff, e.g., '12-15-00-000' for quarter past twelve. |
%workflowID% | The ID of the workflow used to make the scan. |
%workflowName% | The name of the workflow used to make the scan. |
%scanJobID% | (available only during scan workflow execution) The unique ID of the scan job instance. This identifier of the scan job is visible also in the log files. |
If the information which should be replaced in the variable is not configured, it will use an empty value instead. For example, if %userFullName% is not set, the result of the string "User full name is %userFullName%" will be "User full name is ".
In general, you can use workflow variables anywhere within the workflows and connectors configuration, except for the Workflow name. For example:
- In the filename of the delivered document. Example: "scan-%userEmail%-%scanDate%" would result in "john.doe@example.com-2012-12-21")
- In the root or target paths where the document will be delivered. Example: "acme/%userDepartment%/%workflowName%" would result in "acme/Human Resources/Scan a CV")
- In the notifications sent to the user when there is a status change in the workflow processing. Example: if the workflow fails, you can configure the following body in the notification: