You are reading the documentation for an outdated Corteza release. 2024.9 is the latest stable Corteza release.

Automation Scripts

As with any system, automation scripts can cause unwanted complications if misused or left open for modification by users who may do harm, willingly or otherwise.

You (or whoever will configure this system) is responsible for making sure scripts are written in a way that do not cause problems to users or the underlying system running them.

Triggers

When an event is fired it triggers automation script that receives a context. Context is a set of information about the event and parameters needed for automation script.

Supported scenarios:
  • when record is created, changed or deleted, triggers can be placed before or after this event

  • when user executes manual script for record automation

  • on configured interval

  • on specific date and time

Low Code administrator assign one or more scripts that will be executed on a specific event.

Environment limitations
  • backend scripts do not support UI manipulation, redirection

  • browser (or frontend, user-agent) scripts can not use external libraries

  • interval and time-triggered scripts can only be executed on the backend

When a certain triggered, context is created with record, module and current user and send to Corredor (automation script execution engine). Corredor verifies authenticity of the user and his credentials and executes the assigned script. Script can read and change given record from the context and access, modify or delete any other Corteza resource via API.

Security

Script can be configured to be executed with security context of the user triggering the event or with security context of a predefined user.

Example scenario:
  • User creates a Client record in Compose. This triggers a script that create a new user. User creation is only allowed to administrators and script can be ran with privileges of an administrator