Right, I can think of three ways they could've handled this better:
1 - What the MC said about suffocating them, kinda expensive but hey, there's probably going to be a net gain and ez lyf. If you're worried about hostages (should've asked the village elder about that) you can:
2 - Throw a grenade or a big fireball in the room the goblins wanted to ambush them in, clear most of them out in a single go. Repeat until you run out of casts, grenades or goblins.
3 - Cast protect on the archer and have her shoot everyone. They can't hit her but she can hit them so just stand there in the entrance to the room and make pincushions.