YouTube automation is legal as long as all the necessary precautions are observed. Content has to be in line with YouTube terms and policies. Automated accounts must also stick to their spam and artificial traffic guidelines. Best to provide value to viewers and operate without deception.