Post one of the automation that gave you errors.
If you don't provide us with one, we have to make one up... and it's likely that it won't match what you actually want, so you'll have to modify it... and on and on.
The example in the docs is quite good.
There are also a number of Blueprints for this kind of thing: