Automation not loading, but it activates the trigger

Please format your code properly. Read this :

Especially point 11