Automation seems like a poor fit for an LLM since results are random and irreproducible? But I could see asking it to write a script step by step, and, once you've confirmed it works, keeping the script.
Also, it could help you fix the script when it breaks.