The Cobblers have been handed a trip to Queens Park Rangers in the first round of the EFL Carabao Cup.
The match will be played in the week commencing August 7, which means it will be Town's second match of the season after their Sky Bet League One opener on August 5.
Justin Edinburgh's team were one of the first drawn out of the hat during the draw, which was held in Bangkok in Thailand, with World Cup winner Emmanuel Petit among those making the draw.
QPR are managed by Ian Holloway, and finished 18th in the Championship last season, just two points above the relegation zone.
The Cobblers were also drawn away to a Championship team last season, and secured an extra-time victory at Barnsley.