Cove Rangers will face Cowdenbeath in the League Cup group stage.
The Highland League champions will have a chance to avenge their controversial defeat to the Blue Brazil in the League Two play-off final.
The Aberdeen side were beaten 3-2 in the second leg with the winning goal being controversial with Cove keeper Stuart McKenzie appearing to be fouled.
There was also a brawl in stoppage time which resulted in Cove’s boss John Sheran, skipper Eric Watson and defender Scott Ross being sent off along with Cowden manager Gary Bollan.
Cove are in Group C which also contains Hearts, Inverness Caley Thistle and Raith Rovers.
Peterhead have been drawn in Group D and the Blue Toon will face Dundee, who they beat at Balmoor two years ago in the League Cup, Dunfermline Athletic, Brechin City and Stirling Albion.