Calendars and events

2,243 views
Skip to first unread message

Rick Humphrey

unread,
Sep 20, 2018, 10:05:55 AM9/20/18
to GAM for G Suite
This is like a two part question

Is it possible to use gam and get a list of calendars own by a user outputed to a csv.

Then I want to take that CSV and filter it to some specifically named calendars (should be able to do this by filtering and removing the calendars I don't want to run the next command against.)

Then using gam find out all events that are scheduled in each of those calendars.

Thanks

+KimNilsson

unread,
Sep 20, 2018, 10:20:09 AM9/20/18
to GAM for G Suite
Sounds perfectly doable.

gamx user dude@someplace print calendars
todrive or > calendars.csv at the end should work fine.
I just tried with todrive for a list of my own calendars.

+KimNilsson

unread,
Sep 20, 2018, 10:23:14 AM9/20/18
to GAM for G Suite
Columns primaryEmail, and calendarId look relevant to you.

gam csv calendars.csv gam user ~primaryemail print events ~calendarId 
And push that with todrive or to a file.

Rick Humphrey

unread,
Sep 20, 2018, 10:59:48 AM9/20/18
to GAM for G Suite
Is GamX advance gam?
If I don't have that setup can I do just gam user dude@someplace print calendars

Thanks

Kim Nilsson

unread,
Sep 20, 2018, 11:06:49 AM9/20/18
to Google Apps Manager
Just try it. 

/Kim Nilsson
No Substitute
google.com/+KimNilsson

Rick Humphrey

unread,
Sep 20, 2018, 11:21:27 AM9/20/18
to google-ap...@googlegroups.com
First command worked great to get the list but error running second command, any thoughts

Second command gam csv calendars2.csv gam user ~primaryEmail print events ~calendarId >event.csv

ERROR: events is not a valid argument for "gam <users> print"

--
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/CAGPzzFuDt76KpDip0Gj6ZXoonTZ3E30iHgRXWUpA%2B-eFkL9GiQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


--

Rick Humphrey
Wolf Creek Public Schools
Technology Services

Kim Nilsson

unread,
Sep 20, 2018, 11:28:49 AM9/20/18
to Google Apps Manager
The syntax for managing calendar events with regular GAM is probably different. 

Try with a single calendar. 

Rick Humphrey

unread,
Sep 20, 2018, 11:38:11 AM9/20/18
to google-ap...@googlegroups.com
Also tried this command that Ross gave me a while ago

gam user email@domain print events allcalendars endtime -72w >allcalPO.csv

ERROR: events is not a valid argument for "gam <users> print"


--
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.

For more options, visit https://groups.google.com/d/optout.

Kim Nilsson

unread,
Sep 20, 2018, 11:40:08 AM9/20/18
to Google Apps Manager
Hmmm, try put print after the ID. 

Kim Nilsson

unread,
Sep 20, 2018, 11:41:48 AM9/20/18
to Google Apps Manager
We may actually need a different word than events. Might need "calendar calendarId" first, or something.

Left work, on my bike, so can't check the syntax. Check the wiki. 

Rick Humphrey

unread,
Sep 20, 2018, 11:46:52 AM9/20/18
to google-ap...@googlegroups.com
Thanks for the suggestion but not it

Invalid argument for gam

On Thu, Sep 20, 2018 at 9:40 AM Kim Nilsson <there.is.no...@gmail.com> wrote:
Hmmm, try put print after the ID. 

--
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.

For more options, visit https://groups.google.com/d/optout.

Bradley Stinson

unread,
Sep 20, 2018, 11:47:13 AM9/20/18
to google-ap...@googlegroups.com
Try the command below. The word events doesn't appear by itself in the GamCommands.txt file that gets downloaded with the install of regular gam

gam csv calendars2.csv gam user ~primaryEmail print allevents ~calendarId > event.csv

On Thu, Sep 20, 2018 at 8:41 AM Kim Nilsson <there.is.no...@gmail.com> wrote:
We may actually need a different word than events. Might need "calendar calendarId" first, or something.

Left work, on my bike, so can't check the syntax. Check the wiki. 

--
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.

Rick Humphrey

unread,
Sep 20, 2018, 11:55:13 AM9/20/18
to google-ap...@googlegroups.com
Thanks for suggestion but I get
gam csv calendars2.csv gam user ~primaryEmail print allevents ~calendarId > event.csv  
ERROR: allevents is not a valid argument for "gam <users> print"

My csv is A1= PrimaryEmail (under that is the full email address of the user)
B1 =  CalendarId (and under that are the ids of that users calendars)




For more options, visit https://groups.google.com/d/optout.

Rick Humphrey

unread,
Sep 20, 2018, 11:56:46 AM9/20/18
to google-ap...@googlegroups.com
csv correction looks like 
My csv is A1= primaryEmail (under that is the full email address of the user)
B1 =  calendarId (and under that are the ids of that users calendars)

Ross Scroggs

unread,
Sep 20, 2018, 1:01:24 PM9/20/18
to google-ap...@googlegroups.com
Rick,

Messages like this come from standard Gam:
ERROR: events is not a valid argument for "gam <users> print"

This is an Advanced Gam command:
gam user email@domain print events allcalendars endtime -72w >allcalPO.csv

Ross


For more options, visit https://groups.google.com/d/optout.


--

Rick Humphrey

unread,
Sep 20, 2018, 1:05:06 PM9/20/18
to google-ap...@googlegroups.com
Thanks Ross
So are you saying I won't be able to use Gam for what I wanted to do in the original request

Rick


For more options, visit https://groups.google.com/d/optout.

+KimNilsson

unread,
Sep 20, 2018, 1:05:22 PM9/20/18
to GAM for G Suite
Rick, you should spend the few minutes it takes to install GAMADV-XTD parallel to your GAM.
There simply are some things you can't do in regular GAM.

Ross Scroggs

unread,
Sep 20, 2018, 1:55:45 PM9/20/18
to google-ap...@googlegroups.com
Rick,

This the command that Standard GAM supports:

gam <UserTypeEntity> print calendars [todrive]


Ross


On Thu, Sep 20, 2018 at 10:05 AM +KimNilsson <there.is.no...@gmail.com> wrote:
Rick, you should spend the few minutes it takes to install GAMADV-XTD parallel to your GAM.
There simply are some things you can't do in regular GAM.

--
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.

For more options, visit https://groups.google.com/d/optout.


--
Reply all
Reply to author
Forward
0 new messages