Send notifications to teams in more instances

This code is really annoying, I really want to refactor how it works.
See 2524.