This study designs an electromagnetic energy harvester that uses a magnet in translation within a coil to harness energy from flow-induced vibrations when wall confinement affects a change in the wake formation behind a bluff body. An attached permanent magnet surrounded by a coil is attached to a flow channel with a flexible diaphragm, and a square cylinder acts as the bluff body that generates a vortex-induced street, thereby oscillating the diaphragm and generating electrical energy. The main novelty presented in the current investigation is developing a quick and efficient way of capturing fluid energy for practical applications, at the cost of augmented mechatronical complexity. Fluid flow and electromagnetic induction convert flow energy into electrical energy, and the influences of the Reynolds number (Re = 3000, 4000, and 5000) and the position of square cylinders (X*=X/D) on the dynamic characteristics are considered. As a result of different incidence angles (α) and spacing between two identical square cylinders (L*=L/D), Reynolds number and incidence angles have significant effects on the harvesting of energy. Additionally, based on experimental data, an output voltage of 0.04 V can be generated when the excitation pressure oscillates at about 20 Hz. Whether a single square or two identical squares are arranged, the 45-degree incidence angle is the most suitable arrangement for power conversion, and L*=4 can produce maximum energy for all configurations. Finally, the experimental results provide deeper insight into the physics behind the relationship between square spacing, rotation angle, and energy harvesting. Regarding hydroelastic energy extraction, tandem diamond configurations have substantial advantages over square ones. With high amplitudes and high frequencies, tandem diamond cylinders can generate mechanical power even beyond typical circular cross-sections. Furthermore, complementary numerical simulations are presented to provide a solid foundation for the reasoning behind the variation in extracted energy as well as complement the experiment results. By conducting numerical simulations, it is found that changing the incidence angle can significantly alter the flow patterns, which is attributable to the sequential formation of a primary vortex from the lee of the bluff body.