AC Out 2 operation only when solar power is ≥ 5000 W

Hi all!
How to make the AC Out 2 work only if there is a sun with a power greater than 5000W? Alternatively, how to program the relay on the GX using the same logic?

3 х MultiPlus 48/8000 400V
1 x MPPT 450/200 MC/4
6 х 48V 100Ah LiFePO4 Battery
1 x Cerbo GX

Thank you!

Have you looked into node red?

This will work for the relay on the cerbo, but the ac 2 out relay will need to be triggered from the temp or aux input (from the relays)