Why delta G = -nFE and not -F * integral(dn*E)?

$\Delta G$ equals the maximum work that a system can do and in redox reactions it's the work done by electrons. According to physics, $ W = E \cdot q $ ; but that's true only if $E$ is constant, however during the reaction, $E$ decreases until it's zero, so mustn't it be like the integral $\int dn \cdot E$ ? Why do we instead say that $\Delta G = -F \int dn \cdot E$ ? 


