West Ham will play either Denmark’s Viborg FF or B36 Torshavn of the Faroe Islands in the Europa Conference League play-off round.
David Moyes’ side reached the semi-finals of the Europa League last season before losing to eventual winners Eintracht Frankfurt of Germany.
The Hammers also finished seventh in the Premier League to qualify for Europe’s third-tier tournament.
Ties for the play-off round will take place on 18 and 25 August.