Welsh treble winners The New Saints will face Bate Borisov of Belarus or Irish side Dundalk in the Champions League third qualifying round if they overcome Videoton.
Saints lost 1-0 to Videoton in the home leg of their second qualifying round tie.
They travel to Hungary for the second leg on Wednesday, 22 July.
Dundalk lost 2-1 to Bate Borisov in their first leg tie with the second leg in Ireland on Wednesday.
In the Europa League, Newtown or FC Copenhagen will face the Czech Republic's FK Jablonec in the third qualifying round.
Chris Hughes' side lost 2-0 to the Danish side in the first leg of the second qualifying round.