Skip to main content
Skip table of contents

Triggers and Automation

Triggers and automation rules modify document properties based on predefined conditions and actions. They can be helpful in implementing budget and security policies, and for tailoring efficient workflows.

Triggers run when a document is added or printed, and execute when a predefined set of conditions is met.

Automations run every 15 minutes and execute if conditions are met.

In this section, the triggers & automation features are explained, and these main aspects will be covered:

  1. Building condition and action statements
  2. Name triggers and automations using descriptive names
  3. Reordering triggers and automations to achieve the desired outcome
  4. Avoid conflicting triggers or automation

Working with triggers & automation

Triggers and Automation rules are handled in the SAFEQ Cloud Web UI under each account and office. Therefore, you can set up rules for an entire organization or a specific office within the organization.
On the Triggers & Automations pages, you can search for, add and reorder rules. You can also edit, clone, and deactivate/activate specific triggers/automation. Note that inactive rules are shown in a separate list. Only rules from the Inactive list may be deleted.

Rules are run, and possibly executed, in a sequential cycle according to the order defined in the Web UI. Whenever the conditions for a specific rule are met, and an action is executed, the cycle restarts (see flowchart below). This cyclic flow ensures that interdependent rules execute as expected with fewer requirements for detailed ordering of rules.

Default triggers

Certain SAFEQ Cloud functionalities are implemented as default triggers when a new tenant is created.

  • Failed workflow – This trigger activates when a scan job hasn't been successfully delivered. For this trigger to function correctly, you must set the email address of the admin user in the trigger actions.

    The admin will receive an email with information about the failure, the error code, and the error message which may help the admin to resolve the problem. For the list of error codes, see Workflow error codes.

Default rules

Certain SAFEQ Cloud functionalities are implemented as default rules when a new tenant is created. For example, an automation will mark print jobs as expired after 32 hours. We recommend you not to deactivate or delete the default rules. Be aware that some default rules, such as Delete expired failed scan jobs, do not have the Delete and Edit options.

Delete expired failed scan jobs

This rule controls Retention in My documents. If you wish to decrease it and have the new value displayed to the end users correctly, clone it and make sure the cloned rule contains the following three conditions:

  • Hours since document created
  • Documents status Is Failed
  • Job type Is Scan

If you use higher value than 7 days in your cloned rule, then the default rule will take precedence.

Building condition and action statements

Both Triggers and Automation consist of condition statements and action statements.

  • Condition statements consist of conditions, field operators, and condition values (these vary depending on the condition selected). Condition statements are essentially ‘if’ statements that return all print jobs that meet the specified criteria.
    For condition statements, the trigger will execute whenever the condition is changed. 'Changed' means any update made to the value, even if the value previously did not exist. For example, the Input Port Name trigger condition will execute even if the Output Port did not exist when a trigger was defined.
  • Action statements consist of actions and action values (these vary depending on the condition selected). Some actions will be unambiguous, in which case a value does not apply – for example, the Delete Document action. Action statements define what occurs if all the condition statements are true and the trigger executes. You can think of action statements as ‘then’ statements – if all your conditions are true then perform these actions to update the document or print job.

At the end of this section are reference lists with all conditions and actions, as well as field operators and values (see Conditions and Actions Reference lists below).

Best Practices for triggers & automation

Triggers and automation rules should be carefully designed and arranged to achieve the desired outcome. As more rules are added over time, it becomes more critical to manage the collection – therefore we recommend establishing good practices from the beginning.

Choosing a descriptive name

While triggers and automation rules can be a huge benefit, they can be tedious to maintain if not named appropriately. Choose a descriptive name that makes it easy for you (and any future admins) to remember what statements are contained in the rule, and to distinguish between different rules.
Consider these three identical triggers with different names.

They all communicate some aspect of the rule, but the first name is clearly superior for introducing what the rule does.

Reordering rules

Rules run in a sequential cycle. Certain rules will have actions that change parameters used as conditions in other rules. To achieve the expected outcome, it is therefore important to consider the order by which rules are run.

Avoiding conflicting rules

You may need to watch out for triggers that undo or modify an action contained in another trigger.
Consider an example where you want all print by guests to be in black&white. Trigger 1 determines all print jobs by guests will be set to black&white. Now consider a Trigger 2 – added for a different purpose – that sets all PowerPoint files to be printed in color. Consequently, if a guest prints a PowerPoint file, the order of triggers will determine the color attribute. One remedy for this situation is to add a condition to Trigger 2 that checks if it is a guest user, so only PowerPoint files from non-guests are set to color.

Consider if automation only runs once

Automations check every 15 minutes to see if their conditions are met. Typically, automation rules are meant to only execute once for each print job or document that satisfies the conditions.
To avoid continuous executions, an automation must include one of the following:

* an action that nullifies at least one of the conditions, or * a condition that can be true only once

If there is no nullifying action or true-only-once condition, the unmodified conditions will continue to be met, and the automation will continue to execute – possibly in an endless loop.

Conditions and Actions Reference lists

ConditionOperatorsValuesTriggersAutomations
User
Assign actions to either employees or guest users
Is
Is not
(authenticated)
User is successfully authenticated in a designated authentication provider. Non-authenticated can be used for assigning rights to a guest user
(tick) (error)
User name
Assign actions to specific users
Is
Is not
Contains
Does not Contain
[text input]
Text is (part of) the user name
(tick) (tick)
User group
Assign actions to specific user groups
Is
Is not
Contains
Does not contain
[text input]
Text is (part of) the group name
(tick) (error)
Document status
Assign actions to documents at a specific time during the print flow
Is
Is not
Changed
Changed from
Changed to
Changed not from
Changed not to

Received
The document is added to print queue but not yet visible to users.

Ready
The document is added to a print queue and ready to be printed, meaning it is accepted, stored, and possibly converted.

Printed
The document is successfully printed.

Deleted
The document is deleted from storage, but has not necessarily been printed.

Expired
The document has been deleted from storage due to expiration of designated retention period.

Failed
The document failed to print.

Awaiting conversion

The document failed to convert and is awaiting conversion to be retried.

Converting

The document conversion is in progress.

Conversion failed

The document conversion failed and will not be retried.

Stored

The document is received and stored in the storage service.

Deleting

The document failed to be deleted. The deletion will be retried.

(tick) (tick)
Document name
Assign actions to specific documents
Is
Is not
Contains
Does not contain
[text input]
Text is (part of) the document name
(tick) (tick)
Document type
Assign actions to certain types of documents
Is
Is not

Unknown
The file type is not recognized and will result in a conversion error

PDF
PS
PCLXL
HTML
DOCUMENT
SHEET
SLIDE
TEXT
XPS
IMAGE

(tick) (tick)
Document attribute
Assign actions to a document that has certain attributes
Is
Is not
Color
Black & white
Duplex long side
Duplex short side
Simplex
(tick) (tick)
Hours since document ready
Assign action within a certain time after the document state changed to “ready”
Is
Is not
Greater Than
Not greater than
Not less than
[number input]
The number defines whole hours (integer)
(tick) (tick)
Print queue
Assign actions to documents sent from known or unknown print queues
Is
Is not
(Empty)
Documents sent via IPP or API can have a designated print queue that is not specified in the SAFEQ Cloud Web UI, in which case the port is empty.

(Listed input ports)
Print queues set up in the SAFEQ Cloud Web UI are individually listed.
(tick) (error)
Print queue name
Assign actions to documents received from specific print queues.
Is
Is not
Contains
Does not contain
[text input]
Text is (part of) print queue name
(tick) (tick)
Print queue type
Assign actions to documents from either a push or pull queue
Is
Is not
Roaming Print Queue
Follow-me print

Direct (Push) Print queue
Direct print
(tick) (error)
Output port
Assign actions to documents that are not associated with any output port (for example, a printer)
Is
Is not
(Empty)
Push print jobs can have a designated output port that is not specified in the SAFEQ Cloud Web UI.

(Listed output ports)
Output ports set up in the SAFEQ Cloud Web UI are individually listed.
(tick) (error)
Output port name
Assign actions to print jobs assigned to specific output ports (for example, printers)
Is
Is not
Contains
Does not contain
[text input]
Text is (part of) output port (for example, printer) name.
(tick) (error)
Output port type
Assign actions to print jobs assigned to either a physical printer or a dummy
Is
Is not

Dummy
Output port is a dummy intended for purposes other than physical printing

Printer
Output port is a physical printer

Rightfax

Output port is a virtual Rightfax destination.

Discovered Printer

Output port for the printer has been automatically discovered.

(tick) (error)
Output port address
Assign actions to print jobs assigned to specific output ports (for example, printers)
Is
Is not
Contains
Does not contain
[text input]
Text is (part of) the output port address in IP-format
(tick) (error)

User card ID
Assign actions to users with a specific card ID

Is
Is not
Contains
Dost not contain

[text input]
Text is (part of) the user's card ID.

(tick) (error)
User one-time password
Assign actions to users with a specific one-time password.
Is
Is not
Contains
Does not contain
[text input]
Text is (part of) the user's one-time password.
(tick) (error)
User short ID
Assign actions to users with a specific short ID
Is
Is not
Contains
Dost not contain
[text input]
Text is (part of) the user's short ID
(tick) (error)
Scan job status
Assign actions to scan jobs in the specific status
IsFailed
The scan job has failed
(tick) (error)
Job type
Assign actions in dependency of the job type
Is

Print
Copy
Scan
Fax

(tick)(tick)

Hours since document created
Assign action within a certain time after the document was created

Greater
Than
[number input]
The number defines whole hours (integer).
(tick)(tick)
Number of pages in the document
Assign actions based on the total number of pages in the document (number of pages multiplied by number of copies)
Is
Is not
Greater Than
Not greater than
Not less than
[number input]
The number defines the page count
(tick)(error)


ActionValuesTriggersAutomations
Output document
Output the document, for example, by printing
(associated output port)
The specific output port the document is already associated with

(Listed output ports)
Output ports that are added in the SAFEQ Cloud Web UI shown as individual entries in the list of possible values
(tick) (error)
Delete document
Delete the document from storage
- (tick) (tick)
Set document attribute
Set a specific document attribute
Color
Black & white
Duplex long side
Duplex short side
Simplex
(tick) (tick)
Store document
Store the document in storage
(Default storage)
Default storage according to storage service settings.
(tick) (tick)
Assign document
Assign the document to the specified user

(Alias)
See the Users section for this feature description. If the user has multiple aliases, this trigger assigns the document to one of them randomly because their order isn't defined.

[text input]
Type the target username

(tick) (tick)
Convert document
Runs the document conversion
- (tick) (tick)
Generate OTP for user
Generates new one-time password for the user
- (tick) (error)

Generate short ID for user
Generates a new short ID for the user

- (tick) (error)

Send email to user
Send an email to the logged-in user

(template - SMTP config)
List of available email templates and SMTP configs.
(tick) (error)

Send email to address
Sends an email to the specified address

(template - SMTP config)
List of available email templates and SMTP configs.

[text input]
Recipient's email address.

(tick) (tick)

Template parameters

Several conditions and actions may accept template parameters enclosed in double curly braces. The following parameters are currently recognized:

ParameterValue
{{username}}Name of the user
{{userotp}}Value of one-time password of the user
{{shortid}}Value of the short ID field of the user
{{documentname}}Title of the document submitted to trigger chain
{{inputportname}}Name of the input port through which the document was sent
{{outputportname}}Name of the printer to which the document was sent for printing
{{errorcode}}Value of the error code (scan workflows only)
{{correlationid}}Value of the correlation ID of the failed scan job. This can help to identify the cause of the failure.
{{errorhint}}Value of the hint connected to the error code, if it exists.
{{usererrorhint}}Value of the hint bound to the error code for the user, if it exists.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.