Cerbo gx control of relay 2 with digital pin

Is there any way to control Relay 2 on the cerbo gx based on the state of a digital pin, ie if digital pin 1 goes high toggle relay 2 and off again when goes low.

That’s pretty trivial with NodeRED, but no other way to do this.

Thanks Dean, I need to look at node red anyhow, not sure if it will be trivial for my old brain

Hi all (Dean) i now have node red installed and am able to manually control relays ect, just wondering if there are any recipes premade to do the above cannot seem to find much involving digital input and relay, i would like to get something running while i learn node red thanks in advance