Select to view content in your preferred language

Add list of users to a group with notebook

291
3
Jump to solution
07-10-2024 11:33 PM
Labels (1)
RebeckaPalm
New Contributor

I have a script that lists inactive users. I want to add these inactive users to a group so that I can notify them by using the notify.group method. Is there a way for me to simply add user to a group, as well as removing them after? 

0 Kudos
1 Solution

Accepted Solutions
RichardHowe
Frequent Contributor
group.add_users(usernames=YourList)

group.remove_users(usernames=YourList)

View solution in original post

0 Kudos
3 Replies
RichardHowe
Frequent Contributor
group.add_users(usernames=YourList)

group.remove_users(usernames=YourList)
0 Kudos
RebeckaPalm
New Contributor

Thank you!

MobiusSnake
MVP Regular Contributor

It might be easier to do this without a group.  From the User Manager, you can call send_notification with a list of usernames.

0 Kudos