Northampton have been drawn away to Hartlepool in the first round of the Johnstone's Paint Trophy Northern Section (West).
The Cobblers progressed to the quarter-finals last season before bowing out with a 3-1 loss at MK Dons.
The tie will be played in the week commencing August 30.
Source: PA