Conditionals
Learn how to write conditional statements in Kognitos.
Kognitos allows your automation to make decisions based on logic. The keywords if
, then
, and else
help control your automation's behavior in different scenarios, enabling dynamic workflows.
if / then Syntax
The basic syntax for a conditional decision is:
Example
if / then / else Syntax
To add more flexibility, you can use an else
statement to specify an alternative action when the condition is not met:
Example
Nested if / then / else statements
You can nest if / then / else statements to add more layers of logic for more complex conditions:
Don't Forget to Indent!
Proper indentation is crucial when writing if / then / else statements, especially when nesting them. It ensures the automation logic is clear, easy to follow, and runs as expected.
Last updated
Was this helpful?