And check the voltage rating of the capacitor too. To be on the safe side it should be about 1.5 times the nominal mains voltage. For 230 Volts a 400 V cap. For 120 Volts a 200 or 250 V cap.
The product of rotation, excitation and flux produces electricty.