How do you assign a badge automatically as soon as someone is added to a group?

You can also filter for topics created by members of a group.

https://meta.discourse.org/g/team/activity/topics or https://meta.discourse.org/filter?q=created-by%3Ateam.