The winner of the Champions League tie between Dundalk and Qarabag will play APOEL of Cyprus or Sutjeska of Montenegro in the third round.
The draw was made this morning in Nyon.
The victor in the Dundalk tie would be away from home in the first leg.
The Lilywhites will drop into the third round of the Europa League if they do not progress. They will face Slovan Bratislava (Slovakia) or Feronikeli (Kosovo) in that tie. Again, Dundalk would be away first if that occured. #rtesoccer
Vinny Perth's men take on Qarabag in the first leg on Wednesday at Oriel Park at 7:45pm.
Shamrock Rovers will take on Austria Vienna in the third round of the Europa League if they overcome Apollon Limassol.
Celtic will face CFR Cluj (Romania) or Maccabi Tel-Aviv if they progress against Nomme Kalju of Estonia.
Champions League third round dates:
6/7 August: First leg
13 August: Second leg
Europa League third round dates:
8 August: First leg
15 August: Second leg