Ties will be played on weekend of the 27 and 28 November with the Cobblers off to Hillsborough after easing past Forest Green Rovers on Saturday.
Boss Ian Sampson said afterwards: "Once we got ahead we settled down and never really looked in any trouble. Thankfully our keeper pulled off a great save from the penalty and we scored the third goal straight away.
"We were poor for the first 15 minutes of the second half, putting ourselves under a little bit of pressure by giving the ball away, but otherwise it was a professional performance.
"John's goal was goal of the season stuff from the edge of the box. He couldn't have caught it any sweeter, and I thought it was a cracking second goal from Steve Guinan as well."
Northampton's recent revival sets up a tasty League Two fixture at home to highflying Port Vale next weekend.