As a safeguard there ought to be one or more capacitors between the relay and the power supply. Capacitors block DC, so that no current can get to the relay in the Off state.
The challenge is to create a 'black box' which will operate on the capacitors somehow, to permit a certain amount of current to get to the relay.
The black box needs to obey certain rules.
It is a matter of applying the right concepts, and assembling the right components in the black box, or boxes, to do the job.