My intent is for the process to stop sending emails to Team Administrators.
I created a new role called ‘Admin’. I added the ‘Admin’ role to the Team Administrators.
Added the following filter to the $result=team.excludeRoles( 'Admin'); to the user task.
This stopped sending emails to the Team Administrators and the emails were send only to Team members.
But I noticed that if I remove the ‘Admin’ role from Team Administrators, it still did not send any emails to the Team Administrators as long as the above filter is there in the user task.
Is it an expected behavior?