Suggestion: facilitate importing ics files to calendars.

701 views
Skip to first unread message

John Utsey

unread,
Aug 8, 2017, 8:35:08 PM8/8/17
to GAM for G Suite
Hi,

I import room schedules into resource calendars, and I import teacher schedules into their personal calendars.
I use the import function in the classic calendar app to do this, but it is a one file to one calendar at a time process filled with repetitive clicking. 
It seems like a feature that would fit in well with GAM's command line scriptable interface.

Something like
gam calendar jsm...@acme.com import file.ics


I apologize if this isn't the right forum to make product suggestions.

Cheers,
John

Ross Scroggs

unread,
Aug 8, 2017, 11:44:33 PM8/8/17
to google-ap...@googlegroups.com
John,


I don't see anything about importing an .ics file, thus Gam can't help you.

There is Python code to parse .ics files, someone (???) could use that code to get the events and then use the Calendar API to add them in.

--
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/21135737-1fc5-46ae-8bee-484c7468693f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

John Utsey

unread,
Aug 9, 2017, 11:11:51 AM8/9/17
to google-ap...@googlegroups.com
Hi,
Thanks for the quick reply.  
In a quick perusal of the API I found this page.

All of the variables described are part of the structure of .ics files. 

So it might not be trivial to call an ics import library, but the API does support adding events.
If GAM would add functionality to import events, I could rewrite my python to produce the file containing events into CSV, or whatever form is needed. I don't feel like I am good enough with python to program directly against Google's API to do this directly.  And I like using GAM.   :)

Cheers, 
John




John Utsey
Technology Director
Santa Fe Preparatory School
1101 Camino de la Cruz Blanca
Santa Fe, NM 87505
505.795.7532

On Tue, Aug 8, 2017 at 9:44 PM, Ross Scroggs <ross.s...@gmail.com> wrote:
John,


I don't see anything about importing an .ics file, thus Gam can't help you.

There is Python code to parse .ics files, someone (???) could use that code to get the events and then use the Calendar API to add them in.

On Aug 8, 2017, at 5:35 PM, John Utsey <jut...@sfprep.org> wrote:

Hi,

I import room schedules into resource calendars, and I import teacher schedules into their personal calendars.
I use the import function in the classic calendar app to do this, but it is a one file to one calendar at a time process filled with repetitive clicking. 
It seems like a feature that would fit in well with GAM's command line scriptable interface.

Something like
gam calendar jsm...@acme.com import file.ics


I apologize if this isn't the right forum to make product suggestions.

Cheers,
John


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

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

Ross Scroggs

unread,
Aug 9, 2017, 11:48:30 AM8/9/17
to google-ap...@googlegroups.com
John,

Gam can already add events, from GamCommands.txt:

<EventAttributes> ::=

        (anyonecanaddself)|(guestscantinviteothers)|(guestscantseeothers)|(notifyattendees)|(available)|(visibility default|public|prvate)|(tentative)|

        (attendee <EmailAddress>)|(optionalattendee <EmailAddress>)|

        (description <String>)|(summary <String>)|(location <String>)|(id <String>)|

        (source <String> <URL>)|(privateproperty <PropertyKey> <PropertyValue>)|(sharedproperty <PropertyKey> <PropertyValue>)|

        (recurrence <RRULE, EXRULE, RDATE and EXDATE line>)|

        (start allday <Date>)|(start <Time>)|(end allday <Date>)|(end <Time>)|(timezone <Timezone>)|

        (noreminders|(reminder <Number> email|popup|sms))|

        (colorindex|colorid <EventColorIndex>)

gam calendar <CalendarItem> addevent <EventAttributes>+


Gam uses:

insert: https://developers.google.com/google-apps/calendar/v3/reference/events/insert


that is subtly different from:


import: https://developers.google.com/google-apps/calendar/v3/reference/events/import


Import has organizer, insert doesn't.


Import has icalUID, insert has id. This might be significant for recurring events.


I'll investigate import.


If you convert your .ics file to a CSV file, you could do the inserts now.


Ross


To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsubscribe...@googlegroups.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/tgIAB35I5EE/unsubscribe.
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.

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

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



--

John Utsey

unread,
Aug 9, 2017, 12:25:53 PM8/9/17
to google-ap...@googlegroups.com
Hi,

Thanks, some how I missed that. I will investigate and see if i can get it to work.
I appreciate the help.

Cheers,
John
 

John Utsey
Technology Director
Santa Fe Preparatory School
1101 Camino de la Cruz Blanca
Santa Fe, NM 87505
505.795.7532




--

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

Ross Scroggs

unread,
Aug 11, 2017, 10:31:18 AM8/11/17
to google-ap...@googlegroups.com
John,

I've added import support to my Advanced (https://github.com/taers232c/GAMADV-X or https://github.com/taers232c/GAMADV-XTD) versions.

Added commands to import events into calendars; this is useful when you want to import

events from .ics files. Importing events is similar to adding events; the principal difference

is that you must specify an iCalUID. All instances of recurring events will have the same

iCalUID but different event IDs. The import command supports two new attributes to set the

event organizer, but the API doesn't seem to honor the values; the organizer is set to

the calendar owner.

See: https://developers.google.com/google-apps/calendar/v3/reference/events/import

    <EventImportAttributes> ::=

        <EventAttributes>|

        (organizername <String>)|

        (organizeremail <EmailAddress>)

    gam calendar|calendars <CalendarEntity> import event icaluid <iCalUID> <EventImportAttributes>+

 

Ross


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.

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

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



--

Mr. G

unread,
Aug 17, 2017, 4:41:45 PM8/17/17
to GAM for G Suite
Ross, I am somewhat of a Noob with the API, but descent on GAM. I setup your GAM-ADV-X GREAT TOOL! So my question how will this work with a .ics file.

My situation is the following.

I have a Bamboo HR ICAL Feed, which im planning to download with a script using wget and want your GAM to populate a calendar with those events. Sort of confused as far as icalUID? 
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-ap...@googlegroups.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/tgIAB35I5EE/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-ap...@googlegroups.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-ap...@googlegroups.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/tgIAB35I5EE/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-ap...@googlegroups.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-ap...@googlegroups.com.



--

Ross Scroggs

unread,
Aug 17, 2017, 5:58:44 PM8/17/17
to google-ap...@googlegroups.com
Mr G.,

This the Google API documentation:

This document describes UIDs:

Google calls them iCalUID; in your ICS file they might be named UID.

The insert (GAM calls this add) and import commands are very similar; in insert, Google supplies the iCalUID and in import you do. It's most useful in repeating events.

 What GAM is doing for you is mapping command line arguments/values into the fields required by the API.
These are the command line arguments/values.

<EventAttributes> ::=

        (anyonecanaddself [<Boolean>])|

        (attendee <EmailAddress>)|

        available|

        (colorindex|colorid <EventColorIndex>))|

        (description <String>)|

        (end (allday <Date>)|<Time>)|

        (guestscaninviteothers <Boolean>)|

        guestscantinviteothers|

        (guestscanseeotherguests <Boolean>)|

        guestscantseeotherguests|

        (location <String>)|

        (noreminders|(reminder email|popup|sms <Number>))|

        (optionalattendee <EmailAddress>)|

        (privateproperty <PropertyKey> <PropertyValue>)|

        (recurrence <RRULE, EXRULE, RDATE and EXDATE line>)|

        (reminder <Number> email|popup|sms))|

        (sharedproperty <PropertyKey> <PropertyValue>)|

        (source <String> <URL>)|

        (start (allday <Date>)|<Time>)|

        (status confirmed|tentative|cancelled)|

        (summary <String>)|

        tentative|

        (timezone <TimeZone>)|

        (transparency opaque|transparent)|

        (visibility default|public|private)


<EventAddAttributes> ::=

        <EventAttributes>|

        notifyattendees|(sendnotifications <Boolean>)


<EventImportAttributes> ::=

        <EventAttributes>|

        (organizername <String>)|

        (organizeremail <EmailAddress>)


What you have to do outside of GAM is to take the fields from events in your ICS file and map then to the fields required by GAM.
GAM does not read an ICS file directly.

John talked about having a script that does the mapping, if he's willing to share it, it would be a starting point.

Ross


To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsubscribe...@googlegroups.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/tgIAB35I5EE/unsubscribe.
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-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

--
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+unsubscribe...@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.



--

--
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/tgIAB35I5EE/unsubscribe.
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-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

--
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+unsubscribe...@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.



--

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

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



--

+KimNilsson

unread,
Aug 21, 2017, 8:03:15 AM8/21/17
to GAM for G Suite
Highly interesting thread!
Thanks guys for going down this path, and best of luck to you.
I have the popcorn out and am enjoying it so far. I love the calendar, so anything that can make it even more powerful I like.

Mr. G

unread,
Aug 22, 2017, 5:28:47 PM8/22/17
to GAM for G Suite
Ross would this help, its a perl script

To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.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/tgIAB35I5EE/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-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

--
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-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.



--

--
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/tgIAB35I5EE/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-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

--
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-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.



--

--
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-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.



--
Reply all
Reply to author
Forward
0 new messages