Does this schematic with an old doorbell electromagnet look ok? And could it be improved?
You should probably put a diode also across the doorbell electromagnet to prevent sparking acrss the relay contact when the circuit opens for the "dong".

It probably didn't work with the transistor because the transistor didn't have enough base current to fully turn on and therefore the voltage developed acorss the electromagnet would have been too weak.