Consider a simple chemical process like diluting HCl. Some might not even call this a chemical process. Going from a concentrated solution to a dilute solution is spontaneous; going from the dilute solution to the concentrated solution is not spontaneous and requires energy.
How might the dilution reaction be hooked up so that the available free energy is captured? See about a concentration cell.