When an exothermic redox reaction happens by just mixing the reagents, the change in enthalpy at constant pressure equals heat which is consistent with the fact that:
For a closed system at constant pressure, change in enthalpy equals heat.
This can be derived from the definition of enthalpy and the first law of Thermodynamics.
When the same reaction takes place in a galvanic cell, there is no heat involved so the change in enthalpy must be zero. But as we know, the energy in galvanic cells is released in the form of electrical work. So $ΔH$ must be translated into electrical work which is inconsistent with the fact that $ΔH = Q_p$ (with $Q_p$ being zero in our case).
I want to understand where is the flaw in the above reasoning and how can we relate the change in enthalpy with the electrical work done by the galvanic cell.