The draw took place on Wednesday afternoon for the National League pair who enter at the third round.
Solihull Moors face a trip to Kelty Hearts who compete in the Lowland League - the fifth tier of Scottish football.
The Hearts are managed by former Rangers, Blackpool and Birmingham midfielder Barry Ferguson.
Meanwhile, Wrexham will host Scottish Championship side Ayr United.
Ayr, known as the Honest Men, finished fourth last season in the second tier of Scottish football.
The ties will take place over the weekend of September 7.