Adding members during bulk group creation via .csv

1,839 views
Skip to first unread message

Nick Mongeau

unread,
Aug 28, 2023, 2:57:21 PM8/28/23
to GAM for Google Workspace
Hi folks,

Can anyone tell me if there is a way to add users (some existing and some new) to groups using the .csv used when creating groups in bulk? It seems like I would simply add a header called 'members' and add the required members to each group in the corresponding rows and then add the command to the 'gam csv create group' set of commands i am using for bulk creation. Not sure if that is correct or not. If so, what would be the command I need to add? Any help is much appreciated!

Thanks!!

-Nick

Ross Scroggs

unread,
Aug 28, 2023, 3:38:56 PM8/28/23
to google-ap...@googlegroups.com
Nick,

You could have a CSV file NewGroups.csv like this:
group,name,members
...
gam csv NewGroups.csv gam create group "~group" name "~name"
gam csv NewGroups.csv gam update group "~group" add members users "~members"

Ross

Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast, a leader in email security and cyber resilience. Mimecast integrates email defenses with brand protection, security awareness training, web security, compliance and other essential capabilities. Mimecast helps protect large and small organizations from malicious activity, human error and technology failure; and to lead the movement toward building a more resilient world. To find out more, visit our website.

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/a209b7a3-7a9c-4bdc-92c7-ed81744df47dn%40googlegroups.com.


--

Nick Mongeau

unread,
Aug 28, 2023, 5:52:41 PM8/28/23
to google-ap...@googlegroups.com
Hi Ross,

Thanks for your help with this. I think I understand but just to be sure... 

If i have a CSV file (groups_test.csv) with the headers:
group,name,description,whocanpost,whocanview,isarchived,allowExternalMembers,whoCanJoin,whoCanInvite
can I just add another header called members to that same CSV and then list all members i want to add under it for each group? (see capture for example).
image.png

If that will work i am not sure what command(s) to add to my existing commands:
gam csv groups_test.csv gam create group "~group" name "~name" description "~description" whocanpostmessage "~whocanpost" whocanviewgroup "~whocanview" isArchived "~isarchived" allowExternalMembers "~allowExternalMembers" whoCanJoin "~whoCanJoin" whoCanInvite "~whoCanInvite"

Thanks for your help and patience!


Nick Mongeau


Ross Scroggs

unread,
Aug 28, 2023, 6:20:13 PM8/28/23
to google-ap...@googlegroups.com
Nick,

Yes. You'll run a second command.
gam csv groups_test.csv gam update group "~group" add members users "~members"

Ross

----
Ross Scroggs



On Aug 28, 2023, at 2:52 PM, 'Nick Mongeau' via GAM for Google Workspace <google-ap...@googlegroups.com> wrote:

Hi Ross,

Thanks for your help with this. I think I understand but just to be sure... 

If i have a CSV file (groups_test.csv) with the headers:
group,name,description,whocanpost,whocanview,isarchived,allowExternalMembers,whoCanJoin,whoCanInvite
can I just add another header called members to that same CSV and then list all members i want to add under it for each group? (see capture for example).

Nick Mongeau

unread,
Aug 28, 2023, 9:30:03 PM8/28/23
to google-ap...@googlegroups.com
Perfect. Thanks very much for the help sir!!


Nick Mongeau


Nick Mongeau

unread,
Aug 29, 2023, 6:43:21 PM8/29/23
to google-ap...@googlegroups.com
Hey Ross,

When I run the second command 
gam csv groups_test.csv gam update group "~group" add members users "~members"

I receive the below stating the three members i have listed in the CSV will be added but no members are ever added to either group for some reason.
C:\GAM>gam csv groups_test.csv gam update group "~group" add members users "~Members"
Using 2 processes...
Group: testg...@getspruce.com, Will add 3 MEMBERs.
Group: testg...@getspruce.com, Will add 3 MEMBERs.

Any ideas what I am doing wrong?

Thanks!!

Nick Mongeau


Ross Scroggs

unread,
Aug 29, 2023, 6:51:44 PM8/29/23
to google-ap...@googlegroups.com
Send me a Meet/Zoom invitation.

Ross



--

Ross Scroggs

unread,
Aug 29, 2023, 7:03:45 PM8/29/23
to google-ap...@googlegroups.com
Due to the way Standard GAM processes group memberships, you can't read a CSV file and add/delete/sync members.

Ross



--

Nick Mongeau

unread,
Aug 30, 2023, 12:47:52 PM8/30/23
to GAM for Google Workspace
Hey Ross,

Does this mean it is not possible to add members in bulk via CSV at all? If so, are there any other options for adding members in bulk? The request I received is for creating somewhere around 600 groups and each group will need to have the same 1 or 2 internal members but a different external member for each group. Any thoughts on a way to achieve this? Outside of creating each group individually of course. Thanks very much for your help with this!

-Nick

Ross Scroggs

unread,
Aug 30, 2023, 12:52:43 PM8/30/23
to google-ap...@googlegroups.com
With Advanced GAM thie command works as given.
With Standard GAM you will have to step over the rows in the CSV file externally from GAM and issue a separate goma command per row

Ross
----
Ross Scroggs


Reply all
Reply to author
Forward
0 new messages