An in situ flow electrochemical cell has been designed and fabricated to allow better seal under UHV chamber thus to achieve a good signal to noise ratio in fluorescence yield detection of X-ray absorption spectra for spectroelectrochemical study. The cell also stabilizes the thin silicon nitride membrane window in an effective manner so that the liquid cell remains intact during X-ray absorption experiments. With the improved design of the liquid cell, electrochemical experiments such as cyclic voltammetry have been performed for 10 cycles with a good stability of sample window. Also an operando electrochemical experiment during photoelectrochemistry has been performed on n-type hematite electrode deposited on silicon nitride window. The experiment allows us to observe the formation of two extra electronic transitions before pre edge of O K-edge spectra.