In Physics these are called the "Casimir operators" and googling this gives the following paper: F. Berdjis and E. Beslmüller *Casimir operators for $F_4$, $E_6$, $E_7$ and $E_8$*E_8$. For the case of$G_2$, see the paper in my comment above: *Casimir operators for the exceptional group$G_2$*G_2$ by A.M. Bincer and K. Riesselmann.
In Physics these are called the "Casimir operators" and googling this gives the following paper: F. Berdjis and E. Beslmüller *Casimir operators for $F_4$, $E_6$, $E_7$ and $E_8$*. For the case of $G_2$, see the paper in my comment above: *Casimir operators for $G_2$* by A.M. Bincer and K. Riesselmann.