You can use the waste heat from the boiler - a large amount of heat is stored as latent heat in the water vapor produced by burning gas. If you can get the exhaust temp down below 55 C (130 F), it will condense and you can get nearly 10% of input heat back.
There are several problems, and retrofitting is strongly discouraged.
1. This can restrict air flow, leading to incomplete combustion, dangerous CO levels and poor efficiency heat transfer in the main heat exchanger.
2. Balanced flues as used on modern boilers use pressure monitoring systems to ensure correct and safe operation - any thing that alters flow through the vents can trip these systems causing the boiler to fail to start.
3. The vapor contains dissolved acids from the gas and when it condenses forms an extremely corrosive solution. This will eat through cheap heat exchangers and drain pipes. You need to ensure that the heat exchanger is made of high-vanadium stainless steel (cast iron, aluminum or copper won't last), similarly the drain pipe must be made of suitable plastic and drain directly into a major drain - the condensate must not be allowed to run in steel or copper piping.
Modern boilers, called 'condensing' boilers recover this heat internally. They are considerably more expensive though, because they have to use a frighteningly expensive high-corrosion resistance stainless heat exchanger, instead of the cheap cast iron in a conventional boiler. The other problem with condensing boilers is that they can't heat the water above 130 F, if they do, you lose the condensing benefit - so internal vents/radiators need to be oversized to work with the lower temperature flow.
In Europe, 'condensing' boilers are now a legal requirement. It is a felony to install a non-condensing boiler, unless you have a letter from the town planner explaining why a condensing boiler is inappropriate (e.g. historical building, where the structure of the building is protected by conservation laws, and a condensing boiler would be too large to fit in the only available place).