I think, for n°2, you could get some inspiration from this doc .
It’s not exactly what you’re looking for but it might help (well, it’s the first thing that came to my mind reading your post )
I’ve got a formula though to get the start of the next month which might help with the automation.