2022-08-17 08:50:24 -07:00
import { INodeProperties } from 'n8n-workflow' ;
2020-03-13 18:22:36 -07:00
2022-11-29 08:11:49 -08:00
import { TIMEZONE_VALIDATION_REGEX } from './GenericFunctions' ;
2021-12-03 00:44:16 -08:00
export const eventOperations : INodeProperties [ ] = [
2020-03-13 18:22:36 -07:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
2022-05-14 01:44:19 -07:00
noDataExpression : true ,
2020-03-13 18:22:36 -07:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'event' ] ,
2020-06-17 14:46:34 -07:00
} ,
2020-03-13 18:22:36 -07:00
} ,
options : [
{
name : 'Create' ,
value : 'create' ,
2020-06-17 14:46:34 -07:00
description : 'Add a event to calendar' ,
2022-07-10 13:50:51 -07:00
action : 'Create an event' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'Delete' ,
value : 'delete' ,
2020-06-17 14:46:34 -07:00
description : 'Delete an event' ,
2022-07-10 13:50:51 -07:00
action : 'Delete an event' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'Get' ,
value : 'get' ,
2020-06-17 14:46:34 -07:00
description : 'Retrieve an event' ,
2022-07-10 13:50:51 -07:00
action : 'Get an event' ,
2020-03-13 18:22:36 -07:00
} ,
{
2022-09-07 07:51:14 -07:00
name : 'Get Many' ,
2020-03-13 18:22:36 -07:00
value : 'getAll' ,
2022-09-13 03:36:36 -07:00
description : 'Retrieve many events from a calendar' ,
2022-09-08 08:10:13 -07:00
action : 'Get many events' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'Update' ,
value : 'update' ,
2020-06-17 14:46:34 -07:00
description : 'Update an event' ,
2022-07-10 13:50:51 -07:00
action : 'Update an event' ,
2020-10-22 06:46:03 -07:00
} ,
2020-03-13 18:22:36 -07:00
] ,
default : 'create' ,
2020-10-22 06:46:03 -07:00
} ,
2021-12-03 00:44:16 -08:00
] ;
2020-03-13 18:22:36 -07:00
2021-12-03 00:44:16 -08:00
export const eventFields : INodeProperties [ ] = [
2020-06-15 15:47:44 -07:00
/* -------------------------------------------------------------------------- */
2021-02-21 13:04:00 -08:00
/* event:getAll */
2020-06-15 15:47:44 -07:00
/* -------------------------------------------------------------------------- */
2020-03-13 18:22:36 -07:00
{
2022-11-29 08:11:49 -08:00
displayName : 'Calendar' ,
2020-03-13 18:22:36 -07:00
name : 'calendar' ,
2022-11-29 08:11:49 -08:00
type : 'resourceLocator' ,
default : { mode : 'list' , value : '' } ,
2020-03-13 18:22:36 -07:00
required : true ,
2022-11-29 08:11:49 -08:00
description : 'Google Calendar to operate on' ,
modes : [
{
displayName : 'Calendar' ,
name : 'list' ,
type : 'list' ,
placeholder : 'Select a Calendar...' ,
typeOptions : {
searchListMethod : 'getCalendars' ,
searchable : true ,
} ,
} ,
{
displayName : 'ID' ,
name : 'id' ,
type : 'string' ,
validation : [
{
type : 'regex' ,
properties : {
// calendar ids are emails. W3C email regex with optional trailing whitespace.
regex :
'(^[a-zA-Z0-9.!#$%&’ *+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*(?:[ \t]+)*$)' ,
errorMessage : 'Not a valid Google Calendar ID' ,
} ,
} ,
] ,
extractValue : {
type : 'regex' ,
regex : '(^[a-zA-Z0-9.!#$%&’ *+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*)' ,
} ,
placeholder : 'name@google.com' ,
} ,
] ,
2020-03-13 18:22:36 -07:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'event' ] ,
2020-06-17 14:46:34 -07:00
} ,
2020-03-13 18:22:36 -07:00
} ,
} ,
2020-10-30 01:32:35 -07:00
/* -------------------------------------------------------------------------- */
/* event:create */
/* -------------------------------------------------------------------------- */
2020-03-13 18:22:36 -07:00
{
displayName : 'Start' ,
name : 'start' ,
type : 'dateTime' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'create' ] ,
resource : [ 'event' ] ,
2020-06-17 14:46:34 -07:00
} ,
2020-03-13 18:22:36 -07:00
} ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Start time of the event' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'End' ,
name : 'end' ,
type : 'dateTime' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'create' ] ,
resource : [ 'event' ] ,
2020-06-17 14:46:34 -07:00
} ,
2020-03-13 18:22:36 -07:00
} ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'End time of the event' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Use Default Reminders' ,
name : 'useDefaultReminders' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'create' ] ,
resource : [ 'event' ] ,
2020-06-17 14:46:34 -07:00
} ,
2020-03-13 18:22:36 -07:00
} ,
2020-10-22 06:46:03 -07:00
default : true ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'create' ] ,
resource : [ 'event' ] ,
2020-06-17 14:46:34 -07:00
} ,
2020-03-13 18:22:36 -07:00
} ,
options : [
{
displayName : 'All Day' ,
name : 'allday' ,
2022-04-22 09:29:51 -07:00
type : 'options' ,
2020-03-13 18:22:36 -07:00
options : [
{
name : 'Yes' ,
2020-06-17 14:46:34 -07:00
value : 'yes' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'No' ,
2020-06-17 14:46:34 -07:00
value : 'no' ,
} ,
2020-03-13 18:22:36 -07:00
] ,
default : 'no' ,
2020-10-22 06:46:03 -07:00
description : 'Wheater the event is all day or not' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Attendees' ,
name : 'attendees' ,
type : 'string' ,
typeOptions : {
multipleValues : true ,
2020-06-17 14:46:34 -07:00
multipleValueButtonText : 'Add Attendee' ,
2020-03-13 18:22:36 -07:00
} ,
default : '' ,
2020-12-01 01:13:48 -08:00
description : 'The attendees of the event. Multiple ones can be separated by comma.' ,
2020-03-13 18:22:36 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Color Name or ID' ,
2020-03-13 18:22:36 -07:00
name : 'color' ,
type : 'options' ,
typeOptions : {
2020-06-17 14:46:34 -07:00
loadOptionsMethod : 'getColors' ,
2020-03-13 18:22:36 -07:00
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The color of the event. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-03-13 18:22:36 -07:00
} ,
2020-10-22 23:00:00 -07:00
{
displayName : 'Conference Data' ,
name : 'conferenceDataUi' ,
placeholder : 'Add Conference' ,
type : 'fixedCollection' ,
typeOptions : {
multipleValues : false ,
} ,
default : { } ,
options : [
{
displayName : 'Conference Link' ,
name : 'conferenceDataValues' ,
values : [
{
2022-06-03 10:23:49 -07:00
displayName : 'Type Name or ID' ,
2020-10-22 23:00:00 -07:00
name : 'conferenceSolution' ,
type : 'options' ,
2022-08-17 08:50:24 -07:00
description :
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>' ,
2020-10-22 23:00:00 -07:00
typeOptions : {
loadOptionsMethod : 'getConferenceSolutations' ,
2022-08-17 08:50:24 -07:00
loadOptionsDependsOn : [ 'calendar' ] ,
2020-10-22 23:00:00 -07:00
} ,
default : '' ,
} ,
] ,
} ,
] ,
description : 'Creates a conference link (Hangouts, Meet etc) and attachs it to the event' ,
} ,
2020-06-20 08:51:11 -07:00
{
displayName : 'Description' ,
name : 'description' ,
type : 'string' ,
default : '' ,
} ,
2020-03-13 18:22:36 -07:00
{
displayName : 'Guests Can Invite Others' ,
name : 'guestsCanInviteOthers' ,
type : 'boolean' ,
default : true ,
2020-06-17 14:46:34 -07:00
description : 'Whether attendees other than the organizer can invite others to the event' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Guests Can Modify' ,
name : 'guestsCanModify' ,
type : 'boolean' ,
default : false ,
2020-06-17 14:46:34 -07:00
description : 'Whether attendees other than the organizer can modify the event' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Guests Can See Other Guests' ,
name : 'guestsCanSeeOtherGuests' ,
type : 'boolean' ,
default : true ,
2022-08-17 08:50:24 -07:00
description :
"Whether attendees other than the organizer can see who the event's attendees are" ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'ID' ,
name : 'id' ,
type : 'string' ,
default : '' ,
2020-06-17 14:46:34 -07:00
description : 'Opaque identifier of the event' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Location' ,
name : 'location' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Geographic location of the event as free-form text' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Max Attendees' ,
name : 'maxAttendees' ,
type : 'number' ,
default : 0 ,
2022-08-17 08:50:24 -07:00
description :
'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.' ,
2020-03-13 18:22:36 -07:00
} ,
{
2022-06-13 12:55:54 -07:00
displayName : 'Repeat Frequency' ,
2020-03-13 18:22:36 -07:00
name : 'repeatFrecuency' ,
type : 'options' ,
options : [
{
name : 'Daily' ,
2020-06-17 14:46:34 -07:00
value : 'Daily' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'Weekly' ,
2020-06-17 14:46:34 -07:00
value : 'weekly' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'Monthly' ,
2020-06-17 14:46:34 -07:00
value : 'monthly' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'Yearly' ,
2020-06-17 14:46:34 -07:00
value : 'yearly' ,
2020-10-22 06:46:03 -07:00
} ,
2020-03-13 18:22:36 -07:00
] ,
2020-06-17 14:46:34 -07:00
default : '' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Repeat How Many Times?' ,
name : 'repeatHowManyTimes' ,
type : 'number' ,
typeOptions : {
2020-10-22 06:46:03 -07:00
minValue : 1 ,
2020-03-13 18:22:36 -07:00
} ,
2020-10-22 06:46:03 -07:00
default : 1 ,
2020-03-13 18:22:36 -07:00
} ,
2022-05-14 01:44:19 -07:00
{
displayName : 'Repeat Until' ,
name : 'repeatUntil' ,
type : 'dateTime' ,
default : '' ,
} ,
2021-02-21 13:04:00 -08:00
{
displayName : 'RRULE' ,
name : 'rrule' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'Recurrence rule. When set, the parameters Repeat Frequency, Repeat How Many Times and Repeat Until are ignored.' ,
2021-02-21 13:04:00 -08:00
} ,
2020-03-13 18:22:36 -07:00
{
displayName : 'Send Updates' ,
name : 'sendUpdates' ,
type : 'options' ,
options : [
{
name : 'All' ,
value : 'all' ,
2020-10-22 06:46:03 -07:00
description : 'Notifications are sent to all guests' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'External Only' ,
value : 'externalOnly' ,
2020-06-17 14:46:34 -07:00
description : 'Notifications are sent to non-Google Calendar guests only' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'None' ,
value : 'none' ,
2022-08-17 08:50:24 -07:00
description :
'No notifications are sent. This value should only be used for migration use case.' ,
2020-10-22 06:46:03 -07:00
} ,
2020-03-13 18:22:36 -07:00
] ,
2020-06-17 14:46:34 -07:00
description : 'Whether to send notifications about the creation of the new event' ,
default : '' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Show Me As' ,
name : 'showMeAs' ,
type : 'options' ,
options : [
{
name : 'Available' ,
value : 'transparent' ,
2020-06-17 14:46:34 -07:00
description : 'The event does not block time on the calendar' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'Busy' ,
value : 'opaque' ,
2022-05-06 14:01:25 -07:00
description : 'The event does block time on the calendar' ,
2020-10-22 06:46:03 -07:00
} ,
2020-03-13 18:22:36 -07:00
] ,
default : 'opaque' ,
2020-06-17 14:46:34 -07:00
description : 'Whether the event blocks time on the calendar' ,
2020-03-13 18:22:36 -07:00
} ,
2022-05-14 01:44:19 -07:00
{
displayName : 'Summary' ,
name : 'summary' ,
type : 'string' ,
default : '' ,
description : 'Title of the event' ,
} ,
2020-03-13 18:22:36 -07:00
{
displayName : 'Visibility' ,
name : 'visibility' ,
type : 'options' ,
options : [
{
name : 'Confidential' ,
value : 'confidential' ,
2020-06-17 14:46:34 -07:00
description : 'The event is private. This value is provided for compatibility reasons.' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'Default' ,
value : 'default' ,
2022-05-06 14:01:25 -07:00
description : 'Uses the default visibility for events on the calendar' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'Private' ,
value : 'private' ,
2022-05-06 14:01:25 -07:00
description : 'The event is private and only event attendees may view event details' ,
2020-03-13 18:22:36 -07:00
} ,
2020-03-16 06:34:04 -07:00
{
name : 'Public' ,
value : 'public' ,
2022-08-17 08:50:24 -07:00
description :
'The event is public and event details are visible to all readers of the calendar' ,
2020-06-17 14:46:34 -07:00
} ,
2020-03-13 18:22:36 -07:00
] ,
default : 'default' ,
2022-05-06 14:01:25 -07:00
description : 'Visibility of the event' ,
2020-06-17 14:46:34 -07:00
} ,
] ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Reminders' ,
name : 'remindersUi' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-03-13 18:22:36 -07:00
placeholder : 'Add Reminder' ,
typeOptions : {
2020-10-22 06:46:03 -07:00
multipleValues : true ,
2020-03-13 18:22:36 -07:00
} ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'event' ] ,
operation : [ 'create' ] ,
useDefaultReminders : [ false ] ,
2020-06-17 14:46:34 -07:00
} ,
2020-03-13 18:22:36 -07:00
} ,
options : [
{
name : 'remindersValues' ,
displayName : 'Reminder' ,
values : [
{
displayName : 'Method' ,
name : 'method' ,
type : 'options' ,
options : [
{
name : 'Email' ,
2020-06-17 14:46:34 -07:00
value : 'email' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'Popup' ,
2020-06-17 14:46:34 -07:00
value : 'popup' ,
} ,
2020-03-13 18:22:36 -07:00
] ,
2020-06-17 14:46:34 -07:00
default : '' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Minutes Before' ,
name : 'minutes' ,
type : 'number' ,
typeOptions : {
minValue : 0 ,
2020-06-17 14:46:34 -07:00
maxValue : 40320 ,
2020-03-13 18:22:36 -07:00
} ,
2020-06-17 14:46:34 -07:00
default : 0 ,
} ,
] ,
} ,
2020-03-13 18:22:36 -07:00
] ,
2022-08-17 08:50:24 -07:00
description :
"If the event doesn't use the default reminders, this lists the reminders specific to the event" ,
2020-03-13 18:22:36 -07:00
} ,
2020-10-30 01:32:35 -07:00
2020-06-15 15:47:44 -07:00
/* -------------------------------------------------------------------------- */
/* event:delete */
/* -------------------------------------------------------------------------- */
2020-03-13 18:22:36 -07:00
{
displayName : 'Event ID' ,
name : 'eventId' ,
type : 'string' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'delete' ] ,
resource : [ 'event' ] ,
2020-06-17 14:46:34 -07:00
} ,
2020-03-13 18:22:36 -07:00
} ,
2020-06-17 14:46:34 -07:00
default : '' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Options' ,
name : 'options' ,
type : 'collection' ,
placeholder : 'Add Options' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'delete' ] ,
resource : [ 'event' ] ,
2020-06-17 14:46:34 -07:00
} ,
2020-03-13 18:22:36 -07:00
} ,
options : [
{
displayName : 'Send Updates' ,
name : 'sendUpdates' ,
type : 'options' ,
options : [
{
name : 'All' ,
value : 'all' ,
2020-06-17 14:46:34 -07:00
description : 'Notifications are sent to all guests' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'External Only' ,
value : 'externalOnly' ,
2020-06-17 14:46:34 -07:00
description : 'Notifications are sent to non-Google Calendar guests only' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'None' ,
value : 'none' ,
2022-08-17 08:50:24 -07:00
description :
'No notifications are sent. This value should only be used for migration use case.' ,
2020-10-22 06:46:03 -07:00
} ,
2020-03-13 18:22:36 -07:00
] ,
2020-06-17 14:46:34 -07:00
description : 'Whether to send notifications about the creation of the new event' ,
default : '' ,
} ,
] ,
2020-03-13 18:22:36 -07:00
} ,
2020-06-15 15:47:44 -07:00
/* -------------------------------------------------------------------------- */
/* event:get */
/* -------------------------------------------------------------------------- */
2020-03-13 18:22:36 -07:00
{
displayName : 'Event ID' ,
name : 'eventId' ,
type : 'string' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'get' ] ,
resource : [ 'event' ] ,
2020-06-17 14:46:34 -07:00
} ,
2020-03-13 18:22:36 -07:00
} ,
2020-06-17 14:46:34 -07:00
default : '' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Options' ,
name : 'options' ,
type : 'collection' ,
placeholder : 'Add Options' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'get' ] ,
resource : [ 'event' ] ,
2020-06-17 14:46:34 -07:00
} ,
2020-03-13 18:22:36 -07:00
} ,
options : [
{
displayName : 'Max Attendees' ,
name : 'maxAttendees' ,
type : 'number' ,
default : 0 ,
2022-08-17 08:50:24 -07:00
description :
'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.' ,
2020-03-13 18:22:36 -07:00
} ,
{
2022-11-29 08:11:49 -08:00
displayName : 'Timezone' ,
2020-03-13 18:22:36 -07:00
name : 'timeZone' ,
2022-11-29 08:11:49 -08:00
type : 'resourceLocator' ,
default : { mode : 'list' , value : '' } ,
2022-08-17 08:50:24 -07:00
description :
2022-11-29 08:11:49 -08:00
'Time zone used in the response. The default is the time zone of the calendar.' ,
modes : [
{
displayName : 'Timezone' ,
name : 'list' ,
type : 'list' ,
placeholder : 'Select a Timezone...' ,
typeOptions : {
searchListMethod : 'getTimezones' ,
searchable : true ,
} ,
} ,
{
displayName : 'ID' ,
name : 'id' ,
type : 'string' ,
validation : [
{
type : 'regex' ,
properties : {
regex : TIMEZONE_VALIDATION_REGEX ,
errorMessage : 'Not a valid Timezone' ,
} ,
} ,
] ,
extractValue : {
type : 'regex' ,
regex : '([-+/_a-zA-Z0-9]*)' ,
} ,
placeholder : 'Europe/Berlin' ,
} ,
] ,
2020-10-22 06:46:03 -07:00
} ,
] ,
2020-03-13 18:22:36 -07:00
} ,
2020-10-30 01:32:35 -07:00
2020-06-15 15:47:44 -07:00
/* -------------------------------------------------------------------------- */
/* event:getAll */
/* -------------------------------------------------------------------------- */
2020-03-13 18:22:36 -07:00
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'getAll' ] ,
resource : [ 'event' ] ,
2020-06-17 14:46:34 -07:00
} ,
2020-03-13 18:22:36 -07:00
} ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'getAll' ] ,
resource : [ 'event' ] ,
returnAll : [ false ] ,
2020-06-17 14:46:34 -07:00
} ,
2020-03-13 18:22:36 -07:00
} ,
typeOptions : {
minValue : 1 ,
2020-06-17 14:46:34 -07:00
maxValue : 500 ,
2020-03-13 18:22:36 -07:00
} ,
2022-05-14 01:44:19 -07:00
default : 50 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Options' ,
name : 'options' ,
type : 'collection' ,
placeholder : 'Add Option' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'getAll' ] ,
resource : [ 'event' ] ,
2020-06-17 14:46:34 -07:00
} ,
2020-03-13 18:22:36 -07:00
} ,
options : [
{
displayName : 'iCalUID' ,
name : 'iCalUID' ,
type : 'string' ,
default : '' ,
2020-06-17 14:46:34 -07:00
description : 'Specifies event ID in the iCalendar format to be included in the response' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Max Attendees' ,
name : 'maxAttendees' ,
type : 'number' ,
default : 0 ,
2022-08-17 08:50:24 -07:00
description :
'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.' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Order By' ,
name : 'orderBy' ,
type : 'options' ,
options : [
{
name : 'Start Time' ,
value : 'startTime' ,
2022-08-17 08:50:24 -07:00
description :
'Order by the start date/time (ascending). This is only available when querying single events (i.e. the parameter singleEvents is True).' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'Updated' ,
value : 'updated' ,
2022-05-06 14:01:25 -07:00
description : 'Order by last modification time (ascending)' ,
2020-10-22 06:46:03 -07:00
} ,
2020-03-13 18:22:36 -07:00
] ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The order of the events returned in the result' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Query' ,
name : 'query' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'Free text search terms to find events that match these terms in any field, except for extended properties' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Show Deleted' ,
name : 'showDeleted' ,
type : 'boolean' ,
default : false ,
2022-08-17 08:50:24 -07:00
description :
'Whether to include deleted events (with status equals "cancelled") in the result' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Show Hidden Invitations' ,
name : 'showHiddenInvitations' ,
type : 'boolean' ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to include hidden invitations in the result' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Single Events' ,
name : 'singleEvents' ,
type : 'boolean' ,
default : false ,
2022-08-17 08:50:24 -07:00
description :
'Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves' ,
2020-03-13 18:22:36 -07:00
} ,
{
2021-12-04 02:11:22 -08:00
displayName : 'Start Time' ,
2020-03-13 18:22:36 -07:00
name : 'timeMax' ,
type : 'dateTime' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description : "Upper bound (exclusive) for an event's start time to filter by" ,
2020-03-13 18:22:36 -07:00
} ,
{
2021-12-04 02:11:22 -08:00
displayName : 'End Time' ,
2020-03-13 18:22:36 -07:00
name : 'timeMin' ,
type : 'dateTime' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description : "Lower bound (exclusive) for an event's end time to filter by" ,
2020-03-13 18:22:36 -07:00
} ,
{
2022-11-29 08:11:49 -08:00
displayName : 'Timezone' ,
2020-03-13 18:22:36 -07:00
name : 'timeZone' ,
2022-11-29 08:11:49 -08:00
type : 'resourceLocator' ,
default : { mode : 'list' , value : '' } ,
2022-08-17 08:50:24 -07:00
description :
2022-11-29 08:11:49 -08:00
'Time zone used in the response. The default is the time zone of the calendar.' ,
modes : [
{
displayName : 'Timezone' ,
name : 'list' ,
type : 'list' ,
placeholder : 'Select a Timezone...' ,
typeOptions : {
searchListMethod : 'getTimezones' ,
searchable : true ,
} ,
} ,
{
displayName : 'ID' ,
name : 'id' ,
type : 'string' ,
validation : [
{
type : 'regex' ,
properties : {
regex : TIMEZONE_VALIDATION_REGEX ,
errorMessage : 'Not a valid Timezone' ,
} ,
} ,
] ,
extractValue : {
type : 'regex' ,
regex : '([-+/_a-zA-Z0-9]*)' ,
} ,
placeholder : 'Europe/Berlin' ,
} ,
] ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Updated Min' ,
name : 'updatedMin' ,
type : 'dateTime' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
"Lower bound for an event's last modification time (as a RFC3339 timestamp) to filter by. When specified, entries deleted since this time will always be included regardless of showDeleted." ,
2020-10-22 06:46:03 -07:00
} ,
] ,
2020-03-13 18:22:36 -07:00
} ,
2020-10-30 01:32:35 -07:00
2020-06-15 15:47:44 -07:00
/* -------------------------------------------------------------------------- */
/* event:update */
/* -------------------------------------------------------------------------- */
2020-03-13 18:22:36 -07:00
{
displayName : 'Event ID' ,
name : 'eventId' ,
type : 'string' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'update' ] ,
resource : [ 'event' ] ,
2020-06-17 14:46:34 -07:00
} ,
2020-03-13 18:22:36 -07:00
} ,
2020-06-17 14:46:34 -07:00
default : '' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Use Default Reminders' ,
name : 'useDefaultReminders' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'update' ] ,
resource : [ 'event' ] ,
2020-06-17 14:46:34 -07:00
} ,
2020-03-13 18:22:36 -07:00
} ,
2020-10-22 06:46:03 -07:00
default : true ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Update Fields' ,
name : 'updateFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'update' ] ,
resource : [ 'event' ] ,
2020-06-17 14:46:34 -07:00
} ,
2020-03-13 18:22:36 -07:00
} ,
options : [
{
displayName : 'All Day' ,
name : 'allday' ,
2022-04-22 09:29:51 -07:00
type : 'options' ,
2020-03-13 18:22:36 -07:00
options : [
{
name : 'Yes' ,
2020-06-17 14:46:34 -07:00
value : 'yes' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'No' ,
2020-06-17 14:46:34 -07:00
value : 'no' ,
2020-10-22 06:46:03 -07:00
} ,
2020-03-13 18:22:36 -07:00
] ,
default : 'no' ,
2020-06-17 14:46:34 -07:00
description : 'Wheater the event is all day or not' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Attendees' ,
name : 'attendees' ,
type : 'string' ,
typeOptions : {
multipleValues : true ,
2020-06-17 14:46:34 -07:00
multipleValueButtonText : 'Add Attendee' ,
2020-03-13 18:22:36 -07:00
} ,
default : '' ,
2020-12-01 01:13:48 -08:00
description : 'The attendees of the event. Multiple ones can be separated by comma.' ,
2020-03-13 18:22:36 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Color Name or ID' ,
2020-03-13 18:22:36 -07:00
name : 'color' ,
type : 'options' ,
typeOptions : {
2020-06-17 14:46:34 -07:00
loadOptionsMethod : 'getColors' ,
2020-03-13 18:22:36 -07:00
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The color of the event. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-03-13 18:22:36 -07:00
} ,
2020-06-20 08:51:11 -07:00
{
displayName : 'Description' ,
name : 'description' ,
type : 'string' ,
default : '' ,
} ,
2020-03-13 18:22:36 -07:00
{
displayName : 'End' ,
name : 'end' ,
type : 'dateTime' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'End time of the event' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Guests Can Invite Others' ,
name : 'guestsCanInviteOthers' ,
type : 'boolean' ,
default : true ,
2020-06-17 14:46:34 -07:00
description : 'Whether attendees other than the organizer can invite others to the event' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Guests Can Modify' ,
name : 'guestsCanModify' ,
type : 'boolean' ,
default : false ,
2020-06-17 14:46:34 -07:00
description : 'Whether attendees other than the organizer can modify the event' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Guests Can See Other Guests' ,
name : 'guestsCanSeeOtherGuests' ,
type : 'boolean' ,
default : true ,
2022-08-17 08:50:24 -07:00
description :
"Whether attendees other than the organizer can see who the event's attendees are" ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'ID' ,
name : 'id' ,
type : 'string' ,
default : '' ,
2020-06-17 14:46:34 -07:00
description : 'Opaque identifier of the event' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Location' ,
name : 'location' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Geographic location of the event as free-form text' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Max Attendees' ,
name : 'maxAttendees' ,
type : 'number' ,
default : 0 ,
2022-08-17 08:50:24 -07:00
description :
'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.' ,
2020-03-13 18:22:36 -07:00
} ,
{
2022-06-13 12:55:54 -07:00
displayName : 'Repeat Frequency' ,
2020-03-13 18:22:36 -07:00
name : 'repeatFrecuency' ,
type : 'options' ,
options : [
{
name : 'Daily' ,
2020-06-17 14:46:34 -07:00
value : 'Daily' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'Weekly' ,
2020-06-17 14:46:34 -07:00
value : 'weekly' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'Monthly' ,
2020-06-17 14:46:34 -07:00
value : 'monthly' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'Yearly' ,
2020-06-17 14:46:34 -07:00
value : 'yearly' ,
2020-10-22 06:46:03 -07:00
} ,
2020-03-13 18:22:36 -07:00
] ,
2020-06-17 14:46:34 -07:00
default : '' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Repeat How Many Times?' ,
name : 'repeatHowManyTimes' ,
type : 'number' ,
typeOptions : {
2020-06-17 14:46:34 -07:00
minValue : 1 ,
2020-03-13 18:22:36 -07:00
} ,
2020-06-17 14:46:34 -07:00
default : 1 ,
2020-03-13 18:22:36 -07:00
} ,
2022-05-14 01:44:19 -07:00
{
displayName : 'Repeat Until' ,
name : 'repeatUntil' ,
type : 'dateTime' ,
default : '' ,
} ,
2021-02-21 13:04:00 -08:00
{
displayName : 'RRULE' ,
name : 'rrule' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'Recurrence rule. When set, the parameters Repeat Frequency, Repeat How Many Times and Repeat Until are ignored.' ,
2021-02-21 13:04:00 -08:00
} ,
2020-03-13 18:22:36 -07:00
{
displayName : 'Send Updates' ,
name : 'sendUpdates' ,
type : 'options' ,
options : [
{
name : 'All' ,
value : 'all' ,
2022-05-06 14:01:25 -07:00
description : 'Notifications are sent to all guests' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'External Only' ,
value : 'externalOnly' ,
2020-06-17 14:46:34 -07:00
description : 'Notifications are sent to non-Google Calendar guests only' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'None' ,
value : 'none' ,
2022-08-17 08:50:24 -07:00
description :
'No notifications are sent. This value should only be used for migration use case.' ,
2020-10-22 06:46:03 -07:00
} ,
2020-03-13 18:22:36 -07:00
] ,
2020-06-17 14:46:34 -07:00
description : 'Whether to send notifications about the creation of the new event' ,
default : '' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Show Me As' ,
name : 'showMeAs' ,
type : 'options' ,
options : [
{
name : 'Available' ,
value : 'transparent' ,
2020-06-17 14:46:34 -07:00
description : 'The event does not block time on the calendar' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'Busy' ,
value : 'opaque' ,
2022-05-06 14:01:25 -07:00
description : 'The event does block time on the calendar' ,
2020-06-17 14:46:34 -07:00
} ,
2020-03-13 18:22:36 -07:00
] ,
default : 'opaque' ,
2020-06-17 14:46:34 -07:00
description : 'Whether the event blocks time on the calendar' ,
2020-03-13 18:22:36 -07:00
} ,
2022-05-14 01:44:19 -07:00
{
displayName : 'Start' ,
name : 'start' ,
type : 'dateTime' ,
default : '' ,
description : 'Start time of the event' ,
} ,
{
displayName : 'Summary' ,
name : 'summary' ,
type : 'string' ,
default : '' ,
description : 'Title of the event' ,
} ,
2020-03-13 18:22:36 -07:00
{
displayName : 'Visibility' ,
name : 'visibility' ,
type : 'options' ,
options : [
{
name : 'Confidential' ,
value : 'confidential' ,
2020-06-17 14:46:34 -07:00
description : 'The event is private. This value is provided for compatibility reasons.' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'Default' ,
value : 'default' ,
2022-05-06 14:01:25 -07:00
description : 'Uses the default visibility for events on the calendar' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'Public' ,
value : 'public' ,
2022-08-17 08:50:24 -07:00
description :
'The event is public and event details are visible to all readers of the calendar' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'Private' ,
value : 'private' ,
2022-05-06 14:01:25 -07:00
description : 'The event is private and only event attendees may view event details' ,
2020-10-22 06:46:03 -07:00
} ,
2020-03-13 18:22:36 -07:00
] ,
default : 'default' ,
2022-05-06 14:01:25 -07:00
description : 'Visibility of the event' ,
2020-06-17 14:46:34 -07:00
} ,
] ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Reminders' ,
name : 'remindersUi' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-03-13 18:22:36 -07:00
placeholder : 'Add Reminder' ,
typeOptions : {
2020-10-22 06:46:03 -07:00
multipleValues : true ,
2020-03-13 18:22:36 -07:00
} ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'event' ] ,
operation : [ 'update' ] ,
useDefaultReminders : [ false ] ,
2020-06-17 14:46:34 -07:00
} ,
2020-03-13 18:22:36 -07:00
} ,
options : [
{
name : 'remindersValues' ,
displayName : 'Reminder' ,
values : [
{
displayName : 'Method' ,
name : 'method' ,
type : 'options' ,
options : [
{
name : 'Email' ,
2020-06-17 14:46:34 -07:00
value : 'email' ,
2020-03-13 18:22:36 -07:00
} ,
{
name : 'Popup' ,
2020-06-17 14:46:34 -07:00
value : 'popup' ,
2020-10-22 06:46:03 -07:00
} ,
2020-03-13 18:22:36 -07:00
] ,
2020-06-17 14:46:34 -07:00
default : '' ,
2020-03-13 18:22:36 -07:00
} ,
{
displayName : 'Minutes Before' ,
name : 'minutes' ,
type : 'number' ,
typeOptions : {
minValue : 0 ,
2020-06-17 14:46:34 -07:00
maxValue : 40320 ,
2020-03-13 18:22:36 -07:00
} ,
2020-06-17 14:46:34 -07:00
default : 0 ,
} ,
] ,
} ,
2020-03-13 18:22:36 -07:00
] ,
2022-08-17 08:50:24 -07:00
description :
"If the event doesn't use the default reminders, this lists the reminders specific to the event" ,
2020-10-22 06:46:03 -07:00
} ,
2021-12-03 00:44:16 -08:00
] ;