Creating Groups & Adding Members

558 views
Skip to first unread message

David Horowitz

unread,
Oct 11, 2021, 12:14:42 PM10/11/21
to GAM for Google Workspace
I have a CSV on my PC with the headers as shown: 

GroupEmail 
MemberEmail
MemberType
MemberRole

Command with error below: 

gam csv newgroupsclasses.csv gam create group ~GroupEmail name ~memberemail
Command: gam csv newgroupsclasses.csv gam create group >>>~GroupEmail<<< name ~memberemail

ERROR: Header "GroupEmail" not found in CSV headers of "Group Email [Required],Member Email,Member Type,Member Role".

Where is the error?

Chris River

unread,
Oct 11, 2021, 3:05:50 PM10/11/21
to GAM for Google Workspace
Based on the error message, the headers in your csv are actually: Group Email [Required],Member Email,Member Type,Member Role

So, instead of ~GroupEmail you would need ~"Group Email [Required]".

Another issue that I see is that your command still will not produce the results you want. You'll want 2 csv's; one with the groups that you want to create, and another with the members. The headers of the first should have headers like GroupEmail, GroupName, and any other headers you'd like to customize the group with. You would then run this command:
gam csv creategroups.csv gam create group ~GroupEmail name ~GroupName.

You can then use your existing CSV to populate the created groups with the members you'd like to add. There are a few options, but assuming you just want to add members, this should work:
gam csv newgroupsclasses.csv gam update group ~"Group Email [Required]" add member ~"Member Email"
Reply all
Reply to author
Forward
0 new messages