The interaction of flexible structures with viscoelastic flows can result in very rich dynamics. In this paper, we present the results of the interactions between the flow of a viscoelastic polymer solution and a cantilevered beam in a confined microfluidic geometry. Cantilevered beams with varying length and flexibility were studied. With increasing flow rate and Weissenberg number, the flow transitioned from a fore-aft symmetric flow to a stable detached vortex upstream of the beam, to a time-dependent unstable vortex shedding. The shedding of the unstable vortex upstream of the beam imposed a time-dependent drag force on the cantilevered beam resulting in flow-induced beam oscillations. The oscillations of the flexible beam were classified into two distinct regimes: a regime with a clear single vortex shedding from upstream of the beam resulting in a sinusoidal beam oscillation pattern with the frequency of oscillation increasing monotonically with Weissenberg number, and a regime at high Weissenberg numbers characterized by 3D chaotic flow instabilities where the frequency of oscillations plateaued. The critical onset of the flow transitions, the mechanism of vortex shedding and the dynamics of the cantilevered beam response are presented in detail here as a function of beam flexibility and flow viscoelasticity.