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;