The Reds cruised into the final qualifying round of the competition with a 4-0 aggregate win over FC Gomel of Belarus, while Hearts qualified for this stage by virtue of winning the William Hill Scottish Cup.
Newcastle will face Atromitos of Greece while Motherwell have been given a tough assignment after being drawn against Spanish Primera Division side Levante.
The Magpies must travel to Greece in-between their Premier League curtain-raiser at home to Tottenham and a trip to Champions League winners Chelsea.
Atromitos will prove to be a tough challenge in likely testing conditions, with the Athens-based side finishing fourth in the Greek Super League.
They were 23 points adrift of champions Olympiacos, with whom Alan Pardew's men drew 1-1 in a friendly in Portugal last month.
Panathinaikos dumped Motherwell out of the Champions League stage with a thumping 5-0 aggregate win in the recently completed third qualifying round.
Stuart McCall's men therefore drop into the Europa League and they find their route to the main draw blocked by Levante, who enter European football for the first time after finishing sixth in La Liga last season.
They do not have any links to Scottish football but do count former Rangers duo Gabriel Amato and Shota Arveladze and current Celtic assistant manager Johan Mjallby amongst their ex-players.
Well will host the first leg before travelling to the Estadi Ciutat de Valencia a week later.