Thomas picked up two bonus seconds during the stage, and left Froome in his wake on the final climb as he rode away from the reigning champion with a group of the other favourites.
However, Groenewegen - who won the final stage on the Champs Élysées past year - seemed fresher and more powerful and beat all of his rivals by a sizeable margin.
Cavendish's Dimension Data team were still well placed after a double right-hander with two kilometres to go strung out the peloton, but he did not have the power needed at the top of the gradual climb to the line.
Chris Froome and Adam Yates finished safely in the front group with no major changes to the general classification.
The 231-kilometer (143.5-mile) trek from Fougeres, home to the best-preserved and largest medieval fortress in Europe, concluded in Chartres, site of a vast cathedral known for its stained-glass windows.
"Sagan started very early and it was a bit messy, and I surged ahead".
"The fact he wasn't in the sprint was good for me", Sagan, who now leads Gaviria by 33 points, said.
A breakaway group of five riders - Laurent Pichon (Fortuneo-Samsic), Anthony Turgis (Cofidis), Dion Smith (Wanty-Groupe Gobert) and Damien Gaudin and Fabien Grellier (both Direct Energie) - hit the front from the off and built a gap of nearly seven minutes before it stabilised.
Another Frenchman, Laurent Pichon, then tried his luck alone too, but the pace was controlled by the sprinters' teams, and the Fortuneo-Samsic rider was reined in about 40km from the finish.
"If tomorrow is like that and all goes well on the cobbles on Sunday, it would be great to go into the rest day with the yellow", said Van Avermaet, who will be helping GC contender Richie Porte to keep out of trouble on the Roubaix stage.
"I think it's fantastic, I can't find the right words to express how it feels to win", said Degenkolb, who now has stage wins in all three Grand Tours.
Watch the stage 7 highlight video from the Tour de France above. He thanked Greg Van Avermaet, the overnight leader from BMC Racing, for his early move at the final turn.