The Swans were joined by Udinese, Stuttgart, Sevilla, Saint-Etienne and 53 other teams from across Europe as they learned their fate at the Uefa headquarters in NyonSwansea City will face either Malmo or Hibernian in the Europa League third qualifying round.
The Swans will host their opponents for the first leg at the Liberty Stadium on August 1 before travelling to the return tie seven days later.
Fifty-eight teams were drawn out of the hat in Nyon on Friday morning.
Michael Laudrup's men were among 18 sides to enter the competition at this stage, joining 40 teams who emerged, or will emerge, from the previous qualifying round.
Motherwell also entered at this latest stage, and will play Russian side Kuban Krasnodar.
Serie A outfit Udinese have been drawn against either Irtysh Pavlodar of Kazakhstan or Bosnia's NK Siroki Brijeg, while Stuttgart face either Zrinjinski Mostar of Bosnia or PFC Botev Plovdiv of Bulgaria.
Sevilla, who replaced Malaga in the competition due to the Andalusians' ban and Rayo Vallecano's failure to obtain a Uefa license, will face Mladost Podgorica of Montenegro or Senica of Slovakia.
French side Saint-Etienne must get past either Belarus' Shakhtyor Soligorsk or Moldova's Milsami Orhei if they are to make the play-off round.