From 38f24a6184b9bb79f38dfc9186d067a0644dab61 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 28 Nov 2023 09:11:05 +0000 Subject: [PATCH] fix(Google Calendar Trigger Node): Fix issue preventing birthday and holiday calendars from working (#7832) Github issue / Community forum post (link here to close automatically): https://community.n8n.io/t/issue-with-some-google-calendars/33411 --------- Co-authored-by: Michael Kret --- .../Google/Calendar/GoogleCalendarTrigger.node.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/nodes-base/nodes/Google/Calendar/GoogleCalendarTrigger.node.ts b/packages/nodes-base/nodes/Google/Calendar/GoogleCalendarTrigger.node.ts index 48c091b235..ed3456220e 100644 --- a/packages/nodes-base/nodes/Google/Calendar/GoogleCalendarTrigger.node.ts +++ b/packages/nodes-base/nodes/Google/Calendar/GoogleCalendarTrigger.node.ts @@ -9,7 +9,12 @@ import { NodeApiError, NodeOperationError } from 'n8n-workflow'; import moment from 'moment'; -import { getCalendars, googleApiRequest, googleApiRequestAllItems } from './GenericFunctions'; +import { + encodeURIComponentOnce, + getCalendars, + googleApiRequest, + googleApiRequestAllItems, +} from './GenericFunctions'; export class GoogleCalendarTrigger implements INodeType { description: INodeTypeDescription = { @@ -132,7 +137,9 @@ export class GoogleCalendarTrigger implements INodeType { async poll(this: IPollFunctions): Promise { const poolTimes = this.getNodeParameter('pollTimes.item', []) as IDataObject[]; const triggerOn = this.getNodeParameter('triggerOn', '') as string; - const calendarId = this.getNodeParameter('calendarId', '', { extractValue: true }) as string; + const calendarId = encodeURIComponentOnce( + this.getNodeParameter('calendarId', '', { extractValue: true }) as string, + ); const webhookData = this.getWorkflowStaticData('node'); const matchTerm = this.getNodeParameter('options.matchTerm', '') as string;