Holders Rangers will face St Johnstone at Hampden in the League Cup with four all Premiership ties in the second round.
The five clubs in Europe enter the competition at this stage with Celtic handed a home game against Hibernian.
Motherwell will host Kilmarnock after edging through, following a goalless home draw against Partick Thistle and Dundee United will take on St Mirren at Tannadice.
Hearts have been handed a tricky tie away to Falkirk, while Spartans were rewarded for winning their group with a home draw against Ross County.
Aberdeen host Queenâs Park at Pittodrie and Dundee welcome Airdrie to Dens Park.
The second round ties will be played on the weekend of August 17-18 with a place in the quarter-finals on the line
In the final group games played on Sunday, Thistle had to win at Fir Park just before the draw to replace their hosts at the top of Group G and had the chances to do so.
But Motherwell ultimately saw out the game in the Thistle half and the visitorsâ 3-1 penalty shoot-out win for the bonus point was irrelevant.
The Jags started the better team and Dan MacKay missed a glorious chance from close range before Brian Graham just failed to reach a low cross.
Thistle goalkeeper Mason McCready made two excellent stops just before the half-hour mark, pushing Zach Robinsonâs curling effort on to the crossbar and pushing Liam Gordonâs header over.
Mackay twice got in behind in the second half but Aston Oxborough stood up to save his shot and Graham hit the wingerâs cutback just over as he stretched.
Motherwell missed three of their four penalties in the shoot-out and Oxborough just failed to record his third stop as Luke McBethâs effort went in off the goalkeeperâs hands.
Follow STV News on WhatsApp
Scan the QR code on your mobile device for all the latest news from around the country