Hearts will face Linfield or Swiss champions FC Zurich in the Europa League play-offs.
Robbie Neilson’s side are due to travel for the first leg on August 18 before the second leg at Tynecastle seven days later.
The Scottish Cup runners-up are guaranteed group-stage football with the losers of their play-off dropping into the Europa Conference League.
Linfield host the Swiss side on Thursday in the first leg of the third qualifying round.
Hearts manager Robbie Neilson welcomed the draw.
“It’s a good draw for us,” he said on a club video. “One or the other would be great.
“It’s where we want the club to be. We want to get in the Europa League. It’s a great opportunity for us against one of these teams.
“We fancy ourselves to go and win that game and if we do that then it would be brilliant for the club.”
David Healy’s side have had contrasting fortunes in Europe this season, overcoming The New Saints in their Champions League opener with the help of a stoppage-time equaliser in Belfast and an extra-time winner.
They then shocked Bodo/Glimt, Celtic’s conquerors in the Europa Conference League last season, with a 1-0 victory at Windsor Park before being thrashed 8-0 in Norway following an early red card for Kirk Millar.
The Irish League champions feature on-loan St Johnstone forward Eetu Vertainen in their squad along with several other players who have featured in Scottish football including Ben Hall, Conor Pepper and Daniel Finlayson.
Zurich dropped out of the Champions League qualifiers following a 5-4 aggregate defeat by Qarabag.
They are managed by Franco Foda, who recently went head to head with Scotland boss Steve Clarke on several occasions as head coach of Austria.
They this week signed former Hearts forward Donis Avdijaj on a three-year deal.
Avdijaj joined Hearts in January 2020 under Daniel Stendel and said: “I can say I have had a crazy career until now, but I can say I have learned a lot, I know a lot of mentalities and there is no country, no city in the world where I don’t score. I score everywhere and also here. I hope I can show this to the people.”
He failed to score in three appearances before the pandemic struck and has since played in the Netherlands, Cyprus and Austria before his most recent move.
Shamrock Rovers will take on Qarabag or Ferencvaros if they can get past Shkupi.
Enjoy the convenience of having The Sunday Post delivered as a digital ePaper straight to your smartphone, tablet or computer.
Subscribe for only £5.49 a month and enjoy all the benefits of the printed paper as a digital replica.Subscribe