The home side almost took the lead after 10 minutes when Alex Chamberlain jinked in and out of defenders and riffled a shot which came off the inside of a post and away to safety.
Moments later, though, they did break the deadlock when Guly played in winger Adam Lallana and he slotted home from inside the six-yard box. Saints nearly doubled their advantage when Guly again hit a post from a Dan Harding cross and no-one could tap in the rebound.
Eight minutes into the second period and Matt Ritchie cut inside the box and fired past Kelvin Davis to put Swindon level. But Saints restored their lead on the hour mark when Harding put in a delicious ball for in-form Lambert to nod in.
And just seconds later Lallana played a corner short to Chamberlain who clipped in a ball to the far post which Jaidi headed into the top corner to hand the home side breathing space.
Substitute Lee Barnard then rounded Swindon's David Lucas in injury time to coolly slot in the fourth.