Self-sustained oscillations resulting from fluid–solid instabilities, such as the flutter of a flexible flag in axial flow, can be used to harvest energy if one is able to convert the solid energy into electricity. Here, this is achieved using piezoelectric patches attached to the surface of the flag, which convert the solid deformation into an electric current powering purely resistive output circuits. Nonlinear numerical simulations in the slender-body limit, based on an explicit description of the coupling between the fluid–solid and electric systems, are used to determine the harvesting efficiency of the system, namely the fraction of the flow kinetic energy flux effectively used to power the output circuit, and its evolution with the system’s parameters. The role of the tuning between the characteristic frequencies of the fluid–solid and electric systems is emphasized, as well as the critical impact of the piezoelectric coupling intensity. High fluid loading, classically associated with destabilization by damping, leads to greater energy harvesting, but with a weaker robustness to flow velocity fluctuations due to the sensitivity of the flapping mode selection. This suggests that a control of this mode selection by a careful design of the output circuit could provide some opportunities to improve the efficiency and robustness of the energy harvesting process.