# Creating and Configuring Triggers in the Orchestrator

Triggers are necessary for automatically creating Jobs based on specified conditions. The created Jobs are then passed to Robots for processing.

To create a new Trigger in the Orchestrator, go to the “Triggers” screen. This screen contains the “Triggers” table:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-9de5190f9370c5ad788b836731502ebc93bca508%2Fimage%20(270).png?alt=media" alt=""><figcaption></figcaption></figure>

To work with Triggers, the screen has the following buttons:

<table><thead><tr><th width="175">Name</th><th>Description</th></tr></thead><tbody><tr><td>Create</td><td>Allows the user to create a new Trigger. When clicked, a form opens for entering the necessary data and configuring the parameters of the new Trigger.</td></tr><tr><td>Update</td><td>Allows updating information about the selected Trigger.</td></tr><tr><td>Delete selected</td><td>Allows deleting one or more selected Triggers.</td></tr><tr><td>Enable selected</td><td>Activates the selected Triggers, allowing them to start working in the system.</td></tr><tr><td>Disable selected</td><td>Deactivates the selected Triggers, stopping their execution and disabling their functions.</td></tr><tr><td>Test</td><td>Allows testing the selected Trigger. This helps ensure that the Trigger works correctly and performs the planned actions.</td></tr><tr><td>Import from CSV</td><td>Allows the user to upload Trigger data from a CSV file. When this option is selected, a dialog box opens for uploading the file with the necessary data.</td></tr><tr><td>Export to CSV</td><td>Allows saving information about Triggers in CSV format.</td></tr><tr><td>Export to XLSX</td><td>Allows exporting Trigger data in XLSX format.</td></tr></tbody></table>

## "Create" Button

To create a new Trigger, click the “Create” button above the “Triggers” table and fill out the opened form. For convenience, Trigger configuration is divided into several tabs:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-972415d372bc6f0caa8329a0a17b0740e445c624%2Fimage%20(271).png?alt=media" alt=""><figcaption></figcaption></figure>

* “**Main**”. Basic data of the Trigger;
* “**Robots**”. Selection of a Robot or Group of robots for the work that will be assigned after the Trigger is activated;
* “**Schedule**”. The schedule on which the Trigger will activate. The following scheduling options are available: “Process continuously”, “Process on schedule”, “Last day of the month”, “N-th day of the month”;
* “**Queue**”. Configuration for creating Jobs when new Tasks appear in the Queue;
* “**Email**”. Configuration of the Trigger with specific conditions for creating Jobs related to email processing.

Let’s take a closer look at each of the tabs.

### "Main" Tab

In the “Main” tab, fill in the following fields:

* field “**Name**”. A required field for the Trigger's name;
* field “**Description**”. Description of the Trigger if necessary;
* field “**Priority of created Jobs**”. Select the order of Job execution.
* field “**Access Folder**”. Choose an Access Folder from the dropdown list;
* field “**Process**”. Select from the dropdown list the Process that will be triggered when the Trigger activates (the Process can only be selected from those previously created on the “Processes” screen). A required field;
* field “**Max. number of runs**”. Specify the maximum number of times the Trigger can run. If there are no restrictions, enter `0` in this field;
* toggle “**Enabled**”. Activate the toggle if you want the Trigger to be enabled immediately after creation;
* checkbox “**If all robots are busy, create the job after they are free**”. Check this box if you want a Job to be created after the Robots are freed;

### "Robots" Tab

In the “Robots” tab, specify the following data:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-e3b8db01c3108047701b96f84c53d8c68417723a%2Fimage%20(274).png?alt=media" alt=""><figcaption></figcaption></figure>

* flag “**Assign job to a specific robot**”. Fill this in if you want the Job to be executed by a specific Robot. In the “**Robot**” field below, select the desired Robot from the dropdown list;
* flag “**Distribute job among a group of robots**”. Fill this in if you want to assign the Job to a specific Group of robots. In the “**Robot group**” field below, select the desired Group of robots from the dropdown list;
* field “**Maximum number of simultaneously running robots**”. Specify the maximum number of Robots that will execute Jobs created by this Trigger.

Additional flags to fill in if all Robots in the specified Group are busy:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-3899a2f54cdf1ad4a0f6f98227ffc6f5de70fe9a%2Fimage%20(275).png?alt=media" alt=""><figcaption></figcaption></figure>

* flag “**Create job without a pre-assigned robot. As soon as any robot in the group becomes free, the job will be automatically assigned to it**”;
* flag “**Create job for another busy robot in the group that has the least number of jobs in Pending status**".

### "Schedule" Tab

The “Schedule” tab looks different depending on which scheduling option you choose:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-9b3e70fdc88fede57b2b51b6fed587e3cd4393cd%2F2025-04-16_14-49-58.png?alt=media" alt=""><figcaption></figcaption></figure>

#### <mark style="color:red;">Process continuously</mark>

Select the “Process continuously” option if you want Jobs to be processed continuously, considering the constraints set on other tabs. In the form, specify the following data:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-b9510ad0c243d2242bcd10390d4957a2e3dcf2ff%2F2025-04-16_14-56-05.png?alt=media" alt=""><figcaption></figcaption></figure>

* field “**Except non-working days according to the calendar:**”. Use the dropdown list to select the desired calendar from those previously created on the “Resources” screen;
* field “**Stop the job after the specified time interval from its creation**”. Specify the maximum duration of the job in hours:minutes until a “soft” stop;
* field “**Interrupt the job after the specified time interval from its creation**”. Specify the maximum duration of the job in hours:minutes until a “hard” stop;
* fields “**Schedule valid from**” and “**Schedule valid until**”. Specify the date and time in the format DD.MM.YYYY hours:minutes:seconds (from which and until which, respectively, the schedule will be valid).

#### <mark style="color:red;">Process on schedule</mark>

Select the “Process on schedule” option if you want Jobs to be processed according to a set schedule. This form is almost identical to the “Process continuously” option, except for the following elements:

* toggle “**Use Cron expression**”. Click this if you want to define the schedule for triggering the Trigger directly;

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-de8831e5b6f3289447c5bfc05c0913a05ddb31a6%2F2025-04-16_15-19-49.png?alt=media" alt=""><figcaption></figcaption></figure>

* list “**Every**”. Select the desired option to set the Trigger's schedule.

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-de8831e5b6f3289447c5bfc05c0913a05ddb31a6%2F2025-04-16_15-19-49.png?alt=media" alt=""><figcaption></figcaption></figure>

#### <mark style="color:red;">Last day of the month</mark>

Select the “Last day of the month” option if you want Jobs to be processed on the last day of the month. This form is almost identical to the “Process continuously” option, except for the dropdown field: ![](https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-d7c9020fbec084d4405365b9371d16be70552f46%2Fimage%20\(265\).png?alt=media), which should be used to set the Trigger's schedule.

#### <mark style="color:red;">Every N-th day of the month</mark>

Select the “Every N-th day of the month” option if you want Jobs to be processed every N-th day of the month. This form is almost identical to the “Last day of the month” option, except for the field ![](https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-f8cc8a1c8bb830e6269d113b015e5ed0e39808b2%2Fimage%20\(267\).png?alt=media), where you need to manually enter the desired number using the keyboard or with the help of a pop-up counter ![](https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-fdfebbba6cfdd9e1b6b662a8ae68c00731095692%2Fimage%20\(268\).png?alt=media).

### "Queue" Tab

In the “Queue” tab, specify the following data:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-aef3cf0f378430a07aa06a0dc6759c193a30cb1c%2F2025-04-16_15-33-59.png?alt=media" alt=""><figcaption></figcaption></figure>

* flag “**Create jobs when new tasks appear in the queue**”. Fill this in to enable the function of creating Jobs when new tasks appear in the Queue;
* field “**Queue**”. Use the dropdown list to select a specific Queue from those previously created on the “Queues” screen;
* field "**Consider only tasks that are marked with all listed tags simultaneously**". Specify the tags that tasks must be marked with;
* field “**Start when new tasks exceed**”. Specify the number of new tasks in the Queue after which the Robot will be triggered;
* field “**Set the status of the task received from the queue**”. Use the dropdown list to specify the status of the task, selecting it from the offered options: “Created” or “In progress”;
* checkbox “**Complete when the queue is empty**”. Check this box if you want to complete the Trigger when there are no tasks in the Queue. In this case, the Trigger will be set to “Completed” status;
* flag “**Assign a default task to created jobs**”. Fill this in if you want to tie the Trigger to a specific task and use this task as the default task when creating Jobs by the Trigger;
* field “**Task**”. Use the dropdown list to select a specific task from those previously created on the “Queue” screen.

### "Email" Tab

In the “Email” tab, specify the following data:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-410d40c862483995d2b4e404ac9016fa8583ba32%2F2025-04-16_15-44-59.png?alt=media" alt=""><figcaption></figcaption></figure>

* checkbox “**Create job upon receiving Email**”. Check this box to create a Job when an email is received;
* flag “**Protocol**”. Select the email retrieval protocol from the offered options: “POP3” and “IMAP”;
* flag “**Server encoding**”. Select the encoding option from the offered options: “UTF-8” and “US-ASCII”;
* fields “**Mail server**” and “**Port**”. Specify the mail server and its port, respectively;
* fields “**Login**” and “**Password**”. Specify the login and password for accessing the mail service;
* field “**Name of the shared mailbox**”. Specify the name of the shared mailbox, which should only be specified when multiple Users have access to the same mailbox;
* field “**Folder**”. Specify the folder in the mailbox. If no folder is specified, the “Inbox” folder will be checked by default;
* checkbox “**Use SSL**”. Check this box if you want to use SSL when connecting to the mail server;
* checkbox “**Process only unread emails**”. Check this box if you want to process only unread emails;
* checkbox “**Mark as read**”. Check this box if you want emails for which Jobs have been created to be marked as “Read”;
* checkbox “**Create one job upon the arrival of any number of new emails / Create a job for each new email**”. Check this box if you want to create one Job upon the arrival of any number of new emails, or a separate Job for each new email;
* field “**Process if the email subject contains any of the specified substrings**”. Specify substrings that must be contained in the email subject (when specifying multiple substrings, separate them with commas), if necessary;
* field “**Process if the email body contains any of the specified substrings**”. Specify substrings that must be contained in the email body (when specifying multiple substrings, separate them with commas), if necessary;
* field “**Process if the email contains attachments with any of the specified file names**”. Specify file names that must be contained in the email attachments (when specifying multiple file names, separate them with commas, and you can use masks \* and ? if necessary), if necessary;
* field “**Process when the number of matching emails exceeds**”. Specify the number of emails after which processing will be triggered (checking the Trigger conditions and creating Jobs if necessary);
* field “**Check mail every N minutes**”. Specify the time interval in minutes after which the mail will be checked on the server and Jobs created if necessary (if the above Trigger conditions are met).

After filling in the fields, click the “OK” button to save the Trigger.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sherparpa.ru/en/sherpa-rpa/sherpa-orchestrator/rabota-v-sherpa-orchestrator/nachalo-raboty-v-sherpa-orchestrator/sozdanie-i-nastroika-triggerov-v-orkestratore.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
