More advanced automations

A greater level of automation rules including standard, if, when, etc, so that branching is possible.