Smart Event task

A Smart Event task runs a built-in system action. For example, it can call another application's API, transfer a file over FTP, generate a signed token or send a query to AI. You set the action and its parameters on the Smart Event tab in the task editor. The action's result and status are saved to case variables, and the task completes on its own straight away. Only an administrator can see the list of Smart Events.

No.ElementPurpose
1Smart EventTab with the action settings. Only this task type has it.
2Smart EventSelects the action in the Smart Event Configuration section. Each action has a description below it. Required. Changing the action clears any parameters already filled in.
3Parameter groupThe Smart Event Inputs section shows the selected action's parameters, split into groups that each have a heading and a description. Click the arrow to collapse a group.
4Parameter nameThe label above the field on the right shows the parameter's technical name, for example url. The question mark next to the field opens help.
5Add variableThe {} icon in a text field opens a menu where you can insert a variable, a secret or a document.
6Create variableCreates a new template variable, for example for the result.
7Save status to variableThe variable that stores the execution status. Required.
8Save value to variableThe variable that stores the result. Required.

If no action is selected, the Inputs section shows the text Select Smart Event. Parameters are checked while you fill them in and again when you save the task. You cannot save a task that has invalid parameters.

Inserting values into parameters

TabWhat it insertsSyntax
VariablesThe value of a template variable.{nazevPromenne}
VaultA secret from the vault, such as a password or an API key. The value is not saved in the task. It is filled in only when the task runs.{{vault:nazev}}
AI sourcesThe content of a document from the AI sources folder in shared files.{{ai-content:cesta}}
DocumentsA link to a document from the Documents folder in shared files.{{documents:cesta}}

A variable is replaced with its stored value. If the variable name is unknown, it stays in the parameter exactly as written.

Keep passwords in the vault
Do not type passwords, tokens or keys directly into parameters. Store them in the vault in the administration, then insert a reference from the Vault tab into the parameter. This way, anyone who can see the template still cannot see the password itself.

Available Smart Events

Smart EventWhat it doesMain parametersStatusValue
HTTP RequestSends an HTTP request to the specified address.URL and method (required), headers, query parameters, body, timeout, response type and encoding, user name and password authentication, redirect and size limits.The server's response code, for example 200. Any error gives status 500, even when the server returns 404.The response body. An object is saved as JSON. On error, the error text.
FTP / SFTP TransferWorks with files on an FTP or SFTP server. It can list, upload, download and delete files, check whether a file exists, create and delete folders, and rename files.Connection (protocol, server, user, password or key) and the operation with its paths.The text success or error.The result of the operation, or the error text.
JWT GeneratorGenerates a short-lived signed JWT token, for example to sign in to another API.Private key, algorithm and token payload (required), and validity in seconds (default 300).200, or 500 on error.The token, or the error text.
Platform AISends a query to the AI configured in the system.Query (required), system message.200, or 500 on error.JSON with the AI response, or with an error description on error.

Plugins can add more Smart Events. These appear in the same list.

Help text for the status
The help for the Save status to variable field says the status is 200 or 500. However, FTP / SFTP Transfer actually saves the text success or error. Set the conditions on the links after the task to match.

What happens when the task runs

  1. The system fills variables, secrets and documents into the parameters and checks them.
  2. It runs the action and waits for the result.
  3. It saves the status and the value to the selected variables.
  4. It runs the On start calculations, which already have access to the status and the value.
  5. The task completes and the case continues through the outgoing links.

The task completes even if the action ends with an error. The error shows up only in the status variable, and the action is not retried. Use a condition on the links, based on the status, to decide what happens next. For example, status equal to 200 continues, while any other status leads to a task where someone resolves the problem manually.

The task does not start if the status or value variable is missing, the parameters are invalid, or the action does not exist in the system. In that case, the action that activated the task fails with an error.

Example

In the sample template “Travel request”, the Send the booking to the travel agency task sends an HTTP Request using the GET method with the query parameters destination = {destination} and reference = {bookingReference}. It saves the status to the Booking request status variable and the response to Booking request response. In a test run, the status was 200 and the response contained the text of the page the server returned.

How to set up a Smart Event

  1. Create a task and select Smart Event as its type.
  2. On the General tab, enter a name and save the task.
  3. On the Smart Event tab, select the action.
  4. Fill in the parameters. Use the {} icon to insert values from the case, and take passwords from the vault.
  5. Select the variables for the status and the value. Use the Create variable button to create any variables that are missing.
  6. Click Save.
  7. In the template graph, add links after the task with conditions based on the status variable.

Related: Task types, Task calculations, Vault.

Task types

Instructions, Sections and Testing a Task

Syca (opens in a new tab)

Powered by HelpDocs (opens in a new tab)