In the first leg of the play-off, scamacca scored his first goal for the Hammers.
It took just 24 minutes for the Italy forward to make an impact when he headed in after a neat play from Maxwel Cornet.
The hosts had lost their first two games of the season without scoring a goal.
After Said Benrahma and Michail Antonio combined for the latter to tap into an empty net, the Hammers secured a healthy advantage going into the second leg.
The winners of that game will join the other teams in the group stage of the competition.
It has been a difficult start to the season for West Ham, with defeats by Manchester City andNottingham Forest on the opening day.
They got up and running thanks to some new faces at London Stadium.
West Ham, without their captain and vice-captain, and with their boss banned too, gave a debut to defender Thilo Kehrer and started with two strikers.
The Italian, who scored 16 goals in 36 games for Sassuolo in the Italian top flight last season, nodded in the opener after good work from the ex-Burnley man.
Uefa's regulations state that there should be no communication between the technical staff and the first-team coaching staff.
The Hammers looked to have taken control of the tie with a long-range goal by last season's star performer, but they were pegged back by Bonde's back-post headed goal.
They were playing in the second tier of the Danes last year when they won the title and finished seventh in the top flight.
They were missing two players who scored in that run, Ibrahim Said and Alassana Jatta, who were unable to travel because of entry rules for non-EU citizens after the UK leaves the EU.
The Hammers will have breathing space heading into next week's return leg after Benrahma's clever interplay saw him surge into the box on the left and pick out Antonio for a simple finish.