How can I power a NodeMCU from a 12VAC building intercom?
At a guess, your original door switch wiring looks like this:







simulate this circuit &ndash; Schematic created using CircuitLab

V1 is your 12V AC, presumably from a transformer secondary, and L1 is the solenoid coil that opens the door. SW1 is your door opening button and - if this is a shared street door for more than one apartment - is probably connected in parallel with everyone else's door open buttons.

Powering your circuit from the door switch AC

What you're thinking of doing is this:







simulate this circuit

First of all, the rectified DC voltage will not be 12 V, it'll be more like 16 - 17 V, because the capacitor charges up to the peak voltage of the AC waveform which is root 2 times the RMS AC voltage. Actually, you may find it's more than that because of voltage fluctuations in the AC line and imperfect regulation of the transformer. That's OK, because standard voltage regulators can take up to 30 or 35 V, but make sure your capacitor has a suitable voltage rating.

Second, when your micro switches the relay on, it shorts out its own power source! This isn't the disaster it might seem at first because the bridge rectifier means this doesn't short out the capacitor. However the current demand of your micro (and the voltage regulator) will start discharging the capacitor, at 1 volt per Farad per amp, until it goes below the dropout voltage of the regulator and at that point Vcc to your micro will drop and it will reset or if you're unlucky, lock up or behave unpredictably. 

You said your micro draws 15 mA; if your rectified DC from the solenoid supply is 16 V and you use a low-dropout 5 V regulator, you have roughly 10 V of headroom. Say you want to be able to maintain the 5 V for 10 seconds: your capacitor will need to be 15 mF, more commonly known as 15,000 µF. That would be a readily available part, so this approach should be feasible; you should just be aware that it will draw a spike of current as it charges up which might activate the door solenoid for a fraction of a second, but normally this will happen at the instant the relay opens so it won't make any practical difference. You could reduce this by adding a few ohms resistance between the bridge positive and the capacitor positive, which will also help filter any incoming voltage spikes on the AC supply (very likely, since there's a solenoid involved). In any case you will need to make sure your power supply is well decoupled near the micro.

Does that 15 mA include the relay coil current though? If so I wonder whether the relay contacts are up to the switching task. An inductive load like the door solenoid will create big voltage spikes as the relay switches off and if it's only a reed relay, for example, may end up welding the contacts together leaving it permanently on - not what you want.

Note that if as I suspect the other door-open buttons are connected in parallel with yours, you will also lose the AC whenever someone else presses their button. However in this case your circuit is not operating its relay so its current draw should be much less.

What you could do is to add a backup battery which supplies the micro only when AC power is absent (showing only the part downstream of the bridge):







simulate this circuit

As long as the rectified DC voltage is above the battery voltage, no current is drawn from the battery. When it drops out, the battery takes over. The ideal solution would be to use a rechargeable battery and trickle-charge it from the rectified supply.

Waking a battery-powered circuit from sleep

If you prefer to take this approach, you correctly identify that you will want to trigger the micro's reset line from your doorbell signal. To give advice on a circuit for this we'd need to know what that signal looks like, but if you're worried about damaging your micro you should consider using an optoisolator, where the internal LED is operated by your signal and the phototransistor operates your reset line. If you need more advice on this approach (after searching on here) I suggest asking a new question.