I need an help in updating the group as and then the users are updated in the Google sheet.
Regards,
Chandru
Chandrashekar,
You'll have to download your Google Sheet to a CSV file on your local computer and then have GAM access the CSV file.
What are the columns in your Google Sheet that have the group name and member information?
Ross
--
ross.s...@gmail.com
> On Mar 23, 2018, at 9:38 PM, Chandrashekar N <cha...@blackbuck.com> wrote:
>
> Any update here?
>
> --
> You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
> To post to this group, send email to google-apps-manager@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-apps-manager.
> To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/13346f1f-22de-4d5d-a4ad-6e9f6ff60efd%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/XBC23QmID8Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/8AA66325-1029-468D-B96E-ABE08894BECB%40gmail.com.
gam user <username of owner> show filelist fullquery "title contains '<name of sheet>'" name id
gam user <username of owner> get drivefile id <file ID> format csv targetfolder <path where you want it downloaded for processing>
gam update group <group email> sync owner|member|manager file <downloaded file from above>
gam user foo@foo.com show filelist fullquery "title contains 'test'" name id
@ECHO OFF
REM Filename: UpdateGroup.bat
REM
REM Description: This script updates group membership in a Google Apps group
REM via GAM from usernames placed in a Google Sheet. Please update the script
REM to match your environment.
gam user foo@foo.com get drivefile id 1OQdNbRNDLybsafG3x9XDG4MDmO2G1dEF_waF8FQNEnM format csv targetfile C:\Scripts
gam update group foogroup@foo.com sync member file C:\Scripts\testsheet.csv
--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/XBC23QmID8Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/9c1a7ff7-9c32-4ef8-94b3-f36ede95ec71%40googlegroups.com.
To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsubscribe...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/9c1a7ff7-9c32-4ef8-94b3-f36ede95ec71%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAG8%2BgbVvqwQLY0fKQ4gxPqoZCLArkZ2cJHYadGCHa5_iuZAXbg%40mail.gmail.com.
@ECHO OFF
REM Filename: UpdateGroup.bat
REM
REM Description: This script updates group membership in a Google Apps group
REM via GAM from usernames placed in a Google Sheet. Please update the script
REM to match your environment.
REM Download the Google Sheet to a local CSV file, and synchronize group membership
gam user foo@foo.com get drivefile id 1OQdNbRNDLybsafG3x9XDG4MDmO2G1dEF_waF8FQNEnM format csv targetfile C:\Scripts
gam update group foogroup@foo.com sync member file C:\Scripts\testsheet.
csv
REM Script is done, clean up downloaded file
del C:\Scripts\testsheet.csv
--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/b45f8f4a-f0c4-42ad-927f-7de737fa60d5%40googlegroups.com.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/9c1a7ff7-9c32-4ef8-94b3-f36ede95ec71%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAG8%2BgbVvqwQLY0fKQ4gxPqoZCLArkZ2cJHYadGCHa5_iuZAXbg%40mail.gmail.com.
--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/XBC23QmID8Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAJkvRS_cAF0VAC4QWRS6%2BQGoc1BNdyCBQOTR%3DTid5xPvnghViw%40mail.gmail.com.
--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/XBC23QmID8Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/bb2a979c-e1d8-49ff-b184-df2d49a81452%40googlegroups.com.
Suppose you've downloaded a Google Sheet into a CSV file GroupMembers.csv with two columns of interest: GroupEmail,MemberEmail
GroupEmail,MemberEmail
testg...@domain.com,user1@domain.com
testg...@domain.com,user2@domain.com
testg...@domain.com,user3@domain.com
testg...@domain.com,user5@domain.com
…
GroupMembers.csv can have rows in any order.
This command will sync members for all groups in GroupMembers.csv.
gam update group csvkmd GroupMembers.csv keyfield GroupEmail datafield MemberEmail sync member csvdata MemberEmail
Here's the basic syntax and a breakdown of the command.
gam update group <GroupEntity> sync member <UserTypeEntity>
gam update group - We're updating groups
<GroupEntity> - Define fields: csvkmd GroupMembers.csv keyfield GroupEmail datafield MemberEmail
sync member - We're syncing members
<UserTypeEntity> - Reference previously defined field: csvdata MemberEmail
--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/bb2a979c-e1d8-49ff-b184-df2d49a81452%40googlegroups.com.
Chris,With my Advanced GAM (https://github.com/taers232c/GAMADV-X) or Advanced GAM with Team Drives (https://github.com/taers232c/GAMADV-XTD) you can do what you want directly with GAM.
Suppose you've downloaded a Google Sheet into a CSV file GroupMembers.csv with two columns of interest: GroupEmail,MemberEmail
GroupEmail,MemberEmail
…
GroupMembers.csv can have rows in any order.
This command will sync members for all groups in GroupMembers.csv.
gam update group csvkmd GroupMembers.csv keyfield GroupEmail datafield MemberEmail sync member csvdata MemberEmail
Here's the basic syntax and a breakdown of the command.
gam update group <GroupEntity> sync member <UserTypeEntity>
gam update group - We're updating groups
<GroupEntity> - Define fields: csvkmd GroupMembers.csv keyfield GroupEmail datafield MemberEmail
sync member - We're syncing members
<UserTypeEntity> - Reference previously defined field: csvdata MemberEmail
Ross
On Mon, Mar 26, 2018 at 8:44 AM, Chris Harding <chris....@huttoisd.net> wrote:
--Thanks. I didn't know the syntax for that. I probably would have upgraded to PowerShell, imported the CSV as an object, and turned it into a text file with clean data instead, but I probably would have started there anyway for larger, long-term viability of the script, where it would loop through multiple groups using a Google sheet that was effectively a metadata management file for the script (containing fields like user, file, file id). Internally, we're already using dynamically managed AD groups that get scraped to temp files and synchronized in PowerShell, but there are a few groups where members will always be external to the organization where I may use this method instead. The idea would be to empower end-users to manage memberships in organization-owned groups, without having to teach them to use the Groups service, or giving them too much access to group management settings where they will inevitably break their own group.I know it isn't hard to do that in the Groups service directly, but some of these employees are having trouble with the fact we have a password policy now, and remembering their password when we're gone for a week or two. We have one group where SMS messages are required, and I may simplify it to the point where all they have to update is the phone number and carrier, and then post-process that file to transpose that to the SMS gateway address.
On Monday, March 26, 2018 at 10:24:59 AM UTC-5, Ross Scroggs wrote:Chris,You solution works if there is no header row, if there are header rows, then you need a slight change.gam update group foogroup@foo.com sync member csvfile C:\Scripts\testsheet.csv:HeaderNameHereRoss
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/bb2a979c-e1d8-49ff-b184-df2d49a81452%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/XBC23QmID8Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAJkvRS8rMKcHxMqOOETUiOC-%3D8VnTYD%2BYw0aiRK%3DOdzkG48n2g%40mail.gmail.com.
Is it possible to schedule an email alerts?
Looks like a lot of work, Chris.Why not let GCDS sync from AD automatically?
--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/XBC23QmID8Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/46b7ea11-6a97-410b-ab60-53a4ac348b54%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/5ab0e256-63ee-493a-907f-9bd09147f648%40googlegroups.com.
Did you ever get this working via Apps Script?
GAMADV-XTD3 5.12.00
I am getting below error, is this a syntax issue or not supported in XTD3?gam user xxx get drivefile >>>id<<< 1mjZzeyRFI_0fE1CI2u7MNCaTdXBkUuGXY9000hoi-Mo format csv targetfile /home/user/
ERROR: Invalid choice (id): Expected <accept|add|append|archive|cancel|check|claim|clear|collect|copy|create|dedup|delegate|delete|deprovision|draft|draftemail|empty|filter|forward|get|hide|imap|import|importemail|info|insert|insertemail|label|language|list|modify|move|pop|print|printers|printjobs|profile|purge|register|remove|sendas|sendemail|show|signature|signout|spam|suspend|sync|transfer|trash|turnoff2sv|undelete|unhide|unsuspend|untrash|update|vacation|watch|wipe>
Help: Syntax in file /home/ec2-user/bin/gamadv-xtd3/GamCommands.txt
Help: Documentation is at https://github.com/taers232c/GAMADV-XTD3/wiki
--
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/2ddfea38-8e27-4511-93bd-ea8c2883e56an%40googlegroups.com.