Work can be done when electrons are transferred through a wire. The amount of work depends on the potential difference between the anode and cathode, and we can determine the relationship between the Cell Potential and the Gibbs Free Energy.
20.5 Ecell and Delta G (part 1)
20.5 Ecell and Delta G (part 2)