We present a method to monitor the diffusion of liquid molecules in polymers. A microdrop of water is deposited by a piezoelectric drop generator onto the upper surface of a cantilever made of SU-8 based photoresist. In response, the cantilever bends in the opposite direction. We find that this bending is mainly caused by the diffusion of water into the cantilever and the consequent swelling of SU-8. Using a one-dimensional diffusion model and assuming a simple swelling law, we qualitatively model the bending of the cantilever during in and out diffusion of water in SU-8. With a more sophisticated finite element model the diffusion coefficient of water in the SU-8 polymer can be determined quantitatively from the dynamics of cantilever bending.