Save Helpers

Hello,

I have created several groups in Home Assistant and would like to start or stop them via an automation, a scene or also via a helper (several groups together).
So far I have not found a way to do this.
How do you do this?

Furthermore, I would like to save my created helpers and transfer them to another HA installation (about 50-70 pieces). Is it possible to save the created helpers?

Cheers

Boris