****only variants without "the" are correct.**
Let's all thank group A, B, and C.
Thank you to groups A, B and C.**
In this case "The" should be used only if the noun is singular. for example
Let's all thank the finance team and the sales team and in these cases it must be used, if you wish to include all the people on each team. If you were to say and let's all thank Sales team it does not sound (and is not) correct. If you say let's all thank Sales it is ambiguous. Are you thanking the sales team or thankful for the amount of sales? Now let's take a more detailed look at the examples.
Let's all thank group A, B, and C. or Let's all thank the group A, B, and C.
Here we could use the, why? because there is only one group and it's name is group A, B, and C Therefore, in this case if we wish to include all the people in the group we can use the. However if we just want to thank group A, B, and C but not be inclusive we can use Let's all thank group A, B, and C So in each case it is grammatically correct but the meaning alters. A typical example of a bad example.
- Thank you to groups A, B and C. or Thank you to the groups A, B and C
Here we would not use the, Why? because the noun is not singular, there are 3 groups, Group A, Group B, & Group C.
So to summarise the statement I was told that only variants without "the" are correct. is misleading and incorrect.
use or not use "the" before "group" (However the meaning will be slightly different and ambiguous without "the").
We cannot use "the" before "groups"?
the; determiner (PARTICULAR); Cambridge English Dictionary used before a singular noun to refer to all the things or people represented by that noun:
The panda is becoming an increasingly rare animal.