batch
Batch inserts events using a CSV file as input.
Synopsis
Implements the API documented at https://developers.google.com/calendar/api/v3/reference/events/insert
gsm events insert batch [flags]
Options
--addConferenceData int Whether to add a Meet conference to the event.
--addConferenceData_ALL Same as addConferenceData but value is applied to all lines in the CSV file
--anyoneCanAddSelf int Whether anyone can invite themselves to the event (currently works for Google+ events only).
--anyoneCanAddSelf_ALL Same as anyoneCanAddSelf but value is applied to all lines in the CSV file
--attendees int Must be given in the following format: "--attendees "email=some.address@domain.com;resource=[true|false];optional=[true|false];responseStatus=accepted""
Can be used multiple times to invite more than one attendee.
If you batchPatch an event, rememder to specify ALL attendees (not just new ones)!
--attendees_ALL strings Same as attendees but value is applied to all lines in the CSV file
--batchThreads int Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16)
--calendarId int Calendar identifier. To retrieve calendar IDs call the calendarList.list method.
If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.
--calendarId_ALL string Same as calendarId but value is applied to all lines in the CSV file
--colorId int The color of the event.
This is an ID referring to an entry in the event section of the colors definition (see the colors endpoint).
--colorId_ALL string Same as colorId but value is applied to all lines in the CSV file
--conferenceDataVersion int Version number of conference data supported by the API client.
Version 0 assumes no conference data support and ignores conference data in the event's body.
Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData.
--conferenceDataVersion_ALL int Same as conferenceDataVersion but value is applied to all lines in the CSV file
--delimiter string Delimiter to use for CSV columns. Must be exactly one character. Default is ';'
--description int Description of the event. Can contain HTML.
--description_ALL string Same as description but value is applied to all lines in the CSV file
--endDate int The date, in the format "yyyy-mm-dd", if this is an all-day event.
--endDateTime int The time, as a combined date-time value (formatted according to RFC3339).
A time zone offset is required unless a time zone is explicitly specified in timeZone.
--endDateTime_ALL string Same as endDateTime but value is applied to all lines in the CSV file
--endDate_ALL string Same as endDate but value is applied to all lines in the CSV file
--endTimeZone int The time zone in which the time is specified.
(Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".)
For recurring events this field is required and specifies the time zone in which the recurrence is expanded.
For single events this field is optional and indicates a custom time zone for the event start/end.
--endTimeZone_ALL string Same as endTimeZone but value is applied to all lines in the CSV file
--fields int Fields allows partial responses to be retrieved.
See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
--fields_ALL string Same as fields but value is applied to all lines in the CSV file
--fileUrl int URL link to the attachment.
For adding Google Drive file attachments use the same format as in alternateLink property of the Files resource in the Drive API.
Can be used multiple times to add more than one file.
--fileUrl_ALL strings Same as fileUrl but value is applied to all lines in the CSV file
--guestsCanInviteOthers int Whether attendees other than the organizer can invite others to the event.
--guestsCanInviteOthers_ALL Same as guestsCanInviteOthers but value is applied to all lines in the CSV file
--guestsCanModify int Whether attendees other than the organizer can modify the event.
--guestsCanModify_ALL Same as guestsCanModify but value is applied to all lines in the CSV file
--guestsCanSeeOtherGuests int Whether attendees other than the organizer can see who the event's attendees are.
--guestsCanSeeOtherGuests_ALL Same as guestsCanSeeOtherGuests but value is applied to all lines in the CSV file
-h, --help help for batch
--id int Opaque identifier of the event. When creating new single or recurring events, you can specify their IDs.
Provided IDs must follow these rules:
characters allowed in the ID are those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938
the length of the ID must be between 5 and 1024 characters
the ID must be unique per calendar
Due to the globally distributed nature of the system, we cannot guarantee that ID collisions will be detected at event creation time.
To minimize the risk of collisions we recommend using an established UUID algorithm such as one described in RFC4122.
If you do not specify an ID, it will be automatically generated by the server.
Note that the icalUID and the id are not identical and only one of them should be supplied at event creation time.
One difference in their semantics is that in recurring events, all occurrences of one event have different ids while they all share the same icalUIDs.
--location int Geographic location of the event as free-form text.
--location_ALL string Same as location but value is applied to all lines in the CSV file
--maxAttendees int The maximum number of attendees to include in the response.
If there are more than the specified number of attendees, only the participant is returned.
--maxAttendees_ALL int Same as maxAttendees but value is applied to all lines in the CSV file
--path string Path of the import file (CSV)
--privateExtendedProperty int Properties that are private to the copy of the event that appears on this calendar.
--privateExtendedProperty_ALL strings Same as privateExtendedProperty but value is applied to all lines in the CSV file
--recurrence int List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event, as specified in RFC5545.
Note that DTSTART and DTEND lines are not allowed in this field; event start and end times are specified in the start and end fields.
This field is omitted for single events or instances of recurring events.
--recurrence_ALL strings Same as recurrence but value is applied to all lines in the CSV file
--reminderOverride int If the event doesn't use the default reminders, this lists the reminders specific to the event, or, if not set, indicates that no reminders are set for this event.
The maximum number of override reminders is 5.
Must be specified in the following format: "--reminderOverride "method=[email|popup];minutes=[0-40320]""
Can be used multiple times to specify more than one reminder override.
--reminderOverride_ALL strings Same as reminderOverride but value is applied to all lines in the CSV file
--sendUpdates int Guests who should receive notifications about the event update (for example, title changes, etc.).
[all|externalOnly|none]
all - Notifications are sent to all guests.
externalOnly - Notifications are sent to non-Google Calendar guests only.
none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used).
--sendUpdates_ALL string Same as sendUpdates but value is applied to all lines in the CSV file
--sequence int Sequence number as per iCalendar.
--sequence_ALL int Same as sequence but value is applied to all lines in the CSV file
--sharedExtendedProperty int Properties that are shared between copies of the event on other attendees' calendars.
--sharedExtendedProperty_ALL strings Same as sharedExtendedProperty but value is applied to all lines in the CSV file
--skipHeader Whether to skip the first row (header)
--startDate int The date, in the format "yyyy-mm-dd", if this is an all-day event.
--startDateTime int The time, as a combined date-time value (formatted according to RFC3339).
A time zone offset is required unless a time zone is explicitly specified in timeZone.
--startDateTime_ALL string Same as startDateTime but value is applied to all lines in the CSV file
--startDate_ALL string Same as startDate but value is applied to all lines in the CSV file
--startTimeZone int The time zone in which the time is specified.
(Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".)
For recurring events this field is required and specifies the time zone in which the recurrence is expanded.
For single events this field is optional and indicates a custom time zone for the event start/end.
--startTimeZone_ALL string Same as startTimeZone but value is applied to all lines in the CSV file
--status int Status of the event.
[confirmed|tentative|cancelled]
confirmed - The event is confirmed. This is the default status.
tentative - The event is tentatively confirmed.
cancelled - The event is cancelled (deleted). The list method returns cancelled events only on incremental sync (when syncToken or updatedMin are specified) or if the showDeleted flag is set to true. The get method always returns them.
A cancelled status represents two different states depending on the event type:
Cancelled exceptions of an uncancelled recurring event indicate that this instance should no longer be presented to the user. Clients should store these events for the lifetime of the parent recurring event.
Cancelled exceptions are only guaranteed to have values for the id, recurringEventId and originalStartTime fields populated. The other fields might be empty.
All other cancelled events represent deleted events. Clients should remove their locally synced copies. Such cancelled events will eventually disappear, so do not rely on them being available indefinitely.
Deleted events are only guaranteed to have the id field populated.
On the organizer's calendar, cancelled events continue to expose event details (summary, location, etc.) so that they can be restored (undeleted). Similarly, the events to which the user was invited and that they manually removed continue to provide details. However, incremental sync requests with showDeleted set to false will not return these details.
If an event changes its organizer (for example via the move operation) and the original organizer is not on the attendee list, it will leave behind a cancelled event where only the id field is guaranteed to be populated.
--status_ALL string Same as status but value is applied to all lines in the CSV file
--summary int Title of the event.
--summary_ALL string Same as summary but value is applied to all lines in the CSV file
--supportsAttachments int Whether API client performing operation supports event attachments.
--supportsAttachments_ALL Same as supportsAttachments but value is applied to all lines in the CSV file
--transparency int Whether the event blocks time on the calendar.
[opaque|transparent]
opaque - Default value. The event does block time on the calendar. This is equivalent to setting Show me as to Busy in the Calendar UI.
transparent - The event does not block time on the calendar. This is equivalent to setting Show me as to Available in the Calendar UI.
--transparency_ALL string Same as transparency but value is applied to all lines in the CSV file
--useDefaultReminders int Whether the default reminders of the calendar apply to the event.
--useDefaultReminders_ALL Same as useDefaultReminders but value is applied to all lines in the CSV file
--visibility int Visibility of the event.
[default|public|private|confidential]
default - Uses the default visibility for events on the calendar. This is the default value.
public - The event is public and event details are visible to all readers of the calendar.
private - The event is private and only event attendees may view event details.
confidential - The event is private. This value is provided for compatibility reasons.
--visibility_ALL string Same as visibility but value is applied to all lines in the CSV file
Options inherited from parent commands
--compressOutput By default, GSM outputs "pretty" (indented) objects. By setting this flag, GSM's output will be compressed. This may or may not improve performance in scripts.
--config string config file (default is $HOME/.config/gsm/.gsm.yaml)
--delay int This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable.
--dwdSubject string Specify a subject used for DWD impersonation (overrides value in config file)
--log string Set the path of the log file. Default is either ~/gsm.log or defined in your config file
--maxElapsedTime int This is the maximum total time that will be spent retrying a request in minutes. (default 15)
--maxRetryInterval int This is the maximum interval that will be used between retry attempts in seconds. (default 320)
--redirectPort int This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback (default 8081)
--retryOn ints Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error
--streamOutput Setting this flag will cause GSM to output slice values to stdout one by one, instead of one large object
SEE ALSO
- gsm events insert - Creates an event.