Barnsley will visit Darrell Clarke's former club Port Vale in the first round of the FA Cup.
Clarke led Vale to promotion from League Two before being sacked last year.
They are now top of League Two under former Barnsley player Darren Moore.
The games are due to be played over the first week in November.
Barnsley did not make it past the first round last season.
After drawing 3-3 at home to seventh-tier Horsham then winning 3-0 in the replay in Sussex, they were removed from the cup due to fielding Aiden Marsh who was not eligible as he was on loan for the first game.