Stuttgart will face Croatian side HNK Rijeka, while Frankfurt play Qarabag FK of Azerbaijan.
The Swabians booked their place in the draw with an away-goals victory over PFC Botev Plovdiv on Thursday. Opponents Rijeka finished third in the Croatian League last season and knocked out MSK Zilina in the previous round.
This is Frankfurt's first European appearance since 2006/07 when they failed to advance from the UEFA Cup group stage. Qarabag beat Swedish outfit Gefle IF 3-0 in the third qualifying round and finished runners up in the Azerbaijan Premier League last season.
Both German clubs play away on 22 August, before hosting their respective opponents a week later.