I want to make this process automatic.
This question sounds like it has significant potential to be an XY problem.
Why do you want "to send another address automatically?" I suspect that there might be a better way to accomplish what you want instead of doing that.
Agree that you should receive to the cold storage but if you still want to do simple operations with a wallet. You can use https://github.com/ruimarinho/bitcoin-core to getbalance and if it's over a certain threshold simply sendToAddress. Note that you'll need a full node obviously.