Scotland will face Ireland and Japan as well as two qualifiers at the 2019 Rugby World Cup.
Slotted into Group A, the draw was almost perfect for Gregor Townsend’s side.
Scotland will also face an European country and a play-off winner who are both yet to be determined.
Japan will host the competition and caused one of the biggest upsets in rugby history by beating South Africa last year in England.
Ireland were defeated 27-22 when they faced Scotland at Murrayfield in the Six Nations in February.
The top two teams in each group go through to the quarter-finals.
That was the stage Scotland reached at last year’s tournament in England, when they lost 35-34 in agonising circumstances to Australia.
The draw was made in Kyoto, Japan this morning as they will host the competition.
— Scottish Rugby (@Scotlandteam) May 10, 2017