Les Bleus were looking for a response following a shock 2-0 friendly defeat by Finland on Wednesday.
Anthony Martial went close to breaking the deadlock in the first half when his header hit the crossbar and the Manchester United forward was then denied by a full-stretch save from Rui Patricio.
France are three points clear of Portugal, the defending Nations League champions, with just one match to play and hold a better head-to-head record.
Sweden picked up their first points of the campaign with a 2-1 win over Croatia in Stockholm.
Juventus winger Dejan Kulusevski fired the Swedes ahead after 36 minutes, with Marcus Danielson heading in a corner just before half-time.
Defender Danielson made sure of a tense finale when he deflected a shot in for an own goal with eight minutes left.
Ukraine, who saw their build-up impacted by five positive Covid-19 cases within the squad and coaching staff, went ahead through Roman Yaremchuk's rising drive with 12 minutes gone.
The hosts equalised after 23 minutes when Leroy Sane fired past the goalkeeper after being played in by Bayern Munich team-mate Leon Goretzka following a swift counter-attack.
Werner headed Germany in front after 33 minutes, with the Chelsea forward claiming a second when a deflected effort went in off Ilya Zabarnyi just after the hour.
Spain missed two penalties but hit a late equaliser to draw 1-1 away to Switzerland, who finished with 10 men in Basel.
Remo Freuler put the Swiss in front after 26 minutes with a sweeping finish when Breel Embolo had broken down the right.
As the hour approached, Spain were awarded a penalty for handball against Ricardo Rodriguez, only for Ramos to see his spot-kick saved by Sommer.
Spain were given another penalty when Alvaro Morata was fouled by Nico Elvedi, who was sent off for a second caution, but Sommer again denied Ramos from 12 yards after a weak kick by the captain.
The breakthrough eventually came with just a minute left when Gerard Moreno stabbed in a deep cross from Tottenham full-back Sergio Reguilon.
Spain are a point behind Germany, who they play next, and two ahead of Ukraine.
In Nations League C1, Cyprus recorded a first win of the campaign after coming from behind to pull off a shock 2-1 victory over Luxembourg, who finished with 10 men in Nicosia.
Montenegro's goalless draw in Azerbaijan, where they also had a player sent off, was enough to edge them top of the table.
Nations League D1 leaders Faroe Islands extended their unbeaten run with a 1-1 draw against Latvia in Riga.
Malta came from behind to beat Andorra 3-1 and sit second on eight points, with a game against the leaders next on November 17.
Saturday's only D2 fixture saw leaders Gibraltar held to a goalless draw in San Marino, who played most of the second half with 10 men.