The error is telling you that your automation needs an “action:” block. Every automation requires one.
Also, use preformatted text when posting YAML.