Introducing Environment Variables
Multiple schedules can invoke the same endpoints. In this case, your schedules might need the same configurations like an api url, an authentication token or any header. You can define variables at global level as well as at per group level. Variables are case sensitive.
System Variables
These variables can be directly used in your schedules.
- _CRONHOOK_ID - Id of schedule
- _RANDOM - a random number
- _UUID - a random guid
- _TIMESTAMP - unix timestamp (seconds)
Variables hierarchy
You can manage environment variables at two different levels:
- Global
- Group
Global variables are available throughout the platform. You can use them in all schedules created from web platform as well as from API.
Group variables can be added while creating/updating a group. Group variables can only be accessed within group schedules. Group level variables override global variables, if they have same name.
Variables Usage
Use {{CUSTOM_VAR}} notation in schedules.
If you need to escape curly braces you can use this notation: {%{ {{ escaped_string }} }%} // output => {{ escaped_string }}
Variables can be used in the following fields:
- URLs
- Headers (Key & Value)
- Payload