mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 23:01:09 +03:00
Google Calendar Tool Missing sendUpdates Parameter (#5241)
* Google Calendar Tool Missing sendUpdates Parameter * option in Tools and NOT default to send all
This commit is contained in:
@@ -272,6 +272,22 @@ class GoogleCalendar_Tools implements INode {
|
|||||||
additionalParams: true,
|
additionalParams: true,
|
||||||
optional: true
|
optional: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'Send Updates to',
|
||||||
|
name: 'sendUpdates',
|
||||||
|
type: 'options',
|
||||||
|
description: 'Send Updates to attendees',
|
||||||
|
options: [
|
||||||
|
{ label: 'All', name: 'all' },
|
||||||
|
{ label: 'External Only', name: 'externalOnly' },
|
||||||
|
{ label: 'None', name: 'none' }
|
||||||
|
],
|
||||||
|
show: {
|
||||||
|
eventActions: ['createEvent', 'updateEvent']
|
||||||
|
},
|
||||||
|
additionalParams: true,
|
||||||
|
optional: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: 'Recurrence Rules',
|
label: 'Recurrence Rules',
|
||||||
name: 'recurrence',
|
name: 'recurrence',
|
||||||
@@ -560,7 +576,6 @@ class GoogleCalendar_Tools implements INode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const defaultParams = this.transformNodeInputsToToolArgs(nodeData)
|
const defaultParams = this.transformNodeInputsToToolArgs(nodeData)
|
||||||
|
|
||||||
const tools = createGoogleCalendarTools({
|
const tools = createGoogleCalendarTools({
|
||||||
accessToken,
|
accessToken,
|
||||||
actions,
|
actions,
|
||||||
@@ -587,6 +602,7 @@ class GoogleCalendar_Tools implements INode {
|
|||||||
if (nodeData.inputs?.startDate) defaultParams.startDate = nodeData.inputs.startDate
|
if (nodeData.inputs?.startDate) defaultParams.startDate = nodeData.inputs.startDate
|
||||||
if (nodeData.inputs?.endDate) defaultParams.endDate = nodeData.inputs.endDate
|
if (nodeData.inputs?.endDate) defaultParams.endDate = nodeData.inputs.endDate
|
||||||
if (nodeData.inputs?.attendees) defaultParams.attendees = nodeData.inputs.attendees
|
if (nodeData.inputs?.attendees) defaultParams.attendees = nodeData.inputs.attendees
|
||||||
|
if (nodeData.inputs?.sendUpdates) defaultParams.sendUpdates = nodeData.inputs.sendUpdates
|
||||||
if (nodeData.inputs?.recurrence) defaultParams.recurrence = nodeData.inputs.recurrence
|
if (nodeData.inputs?.recurrence) defaultParams.recurrence = nodeData.inputs.recurrence
|
||||||
if (nodeData.inputs?.reminderMinutes) defaultParams.reminderMinutes = nodeData.inputs.reminderMinutes
|
if (nodeData.inputs?.reminderMinutes) defaultParams.reminderMinutes = nodeData.inputs.reminderMinutes
|
||||||
if (nodeData.inputs?.visibility) defaultParams.visibility = nodeData.inputs.visibility
|
if (nodeData.inputs?.visibility) defaultParams.visibility = nodeData.inputs.visibility
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ const CreateEventSchema = z.object({
|
|||||||
endDate: z.string().optional().describe('End date for all-day events (YYYY-MM-DD)'),
|
endDate: z.string().optional().describe('End date for all-day events (YYYY-MM-DD)'),
|
||||||
timeZone: z.string().optional().describe('Time zone (e.g., America/New_York)'),
|
timeZone: z.string().optional().describe('Time zone (e.g., America/New_York)'),
|
||||||
attendees: z.string().optional().describe('Comma-separated list of attendee emails'),
|
attendees: z.string().optional().describe('Comma-separated list of attendee emails'),
|
||||||
|
sendUpdates: z.enum(['all', 'externalOnly', 'none']).optional().default('all').describe('Whether to send notifications to attendees'),
|
||||||
recurrence: z.string().optional().describe('Recurrence rules (RRULE format)'),
|
recurrence: z.string().optional().describe('Recurrence rules (RRULE format)'),
|
||||||
reminderMinutes: z.number().optional().describe('Minutes before event to send reminder'),
|
reminderMinutes: z.number().optional().describe('Minutes before event to send reminder'),
|
||||||
visibility: z.enum(['default', 'public', 'private', 'confidential']).optional().describe('Event visibility')
|
visibility: z.enum(['default', 'public', 'private', 'confidential']).optional().describe('Event visibility')
|
||||||
@@ -70,6 +71,7 @@ const UpdateEventSchema = z.object({
|
|||||||
endDate: z.string().optional().describe('Updated end date for all-day events (YYYY-MM-DD)'),
|
endDate: z.string().optional().describe('Updated end date for all-day events (YYYY-MM-DD)'),
|
||||||
timeZone: z.string().optional().describe('Updated time zone'),
|
timeZone: z.string().optional().describe('Updated time zone'),
|
||||||
attendees: z.string().optional().describe('Updated comma-separated list of attendee emails'),
|
attendees: z.string().optional().describe('Updated comma-separated list of attendee emails'),
|
||||||
|
sendUpdates: z.enum(['all', 'externalOnly', 'none']).optional().default('all').describe('Whether to send notifications to attendees'),
|
||||||
recurrence: z.string().optional().describe('Updated recurrence rules'),
|
recurrence: z.string().optional().describe('Updated recurrence rules'),
|
||||||
reminderMinutes: z.number().optional().describe('Updated reminder minutes'),
|
reminderMinutes: z.number().optional().describe('Updated reminder minutes'),
|
||||||
visibility: z.enum(['default', 'public', 'private', 'confidential']).optional().describe('Updated event visibility')
|
visibility: z.enum(['default', 'public', 'private', 'confidential']).optional().describe('Updated event visibility')
|
||||||
@@ -286,8 +288,11 @@ class CreateEventTool extends BaseGoogleCalendarTool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (params.visibility) eventData.visibility = params.visibility
|
if (params.visibility) eventData.visibility = params.visibility
|
||||||
|
const queryParams = new URLSearchParams()
|
||||||
|
if (params.sendUpdates) queryParams.append('sendUpdates', params.sendUpdates)
|
||||||
|
|
||||||
|
const endpoint = `calendars/${encodeURIComponent(params.calendarId)}/events?${queryParams.toString()}`
|
||||||
|
|
||||||
const endpoint = `calendars/${encodeURIComponent(params.calendarId)}/events`
|
|
||||||
const response = await this.makeGoogleCalendarRequest({ endpoint, method: 'POST', body: eventData, params })
|
const response = await this.makeGoogleCalendarRequest({ endpoint, method: 'POST', body: eventData, params })
|
||||||
return response
|
return response
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -395,8 +400,12 @@ class UpdateEventTool extends BaseGoogleCalendarTool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (params.visibility) updateData.visibility = params.visibility
|
if (params.visibility) updateData.visibility = params.visibility
|
||||||
|
const queryParams = new URLSearchParams()
|
||||||
|
if (params.sendUpdates) queryParams.append('sendUpdates', params.sendUpdates)
|
||||||
|
|
||||||
const endpoint = `calendars/${encodeURIComponent(params.calendarId)}/events/${encodeURIComponent(params.eventId)}`
|
const endpoint = `calendars/${encodeURIComponent(params.calendarId)}/events/${encodeURIComponent(
|
||||||
|
params.eventId
|
||||||
|
)}?${queryParams.toString()}`
|
||||||
const response = await this.makeGoogleCalendarRequest({ endpoint, method: 'PUT', body: updateData, params })
|
const response = await this.makeGoogleCalendarRequest({ endpoint, method: 'PUT', body: updateData, params })
|
||||||
return response
|
return response
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user