mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 05:17:28 -08:00
⚡ Allow multiple attendees in one field in Google Calendar
This commit is contained in:
parent
e428ccffba
commit
f79cb7e989
|
@ -166,7 +166,7 @@ export const eventFields = [
|
|||
multipleValueButtonText: 'Add Attendee',
|
||||
},
|
||||
default: '',
|
||||
description: 'The attendees of the event',
|
||||
description: 'The attendees of the event. Multiple ones can be separated by comma.',
|
||||
},
|
||||
{
|
||||
displayName: 'Color',
|
||||
|
@ -810,7 +810,7 @@ export const eventFields = [
|
|||
multipleValueButtonText: 'Add Attendee',
|
||||
},
|
||||
default: '',
|
||||
description: 'The attendees of the event',
|
||||
description: 'The attendees of the event. Multiple ones can be separated by comma.',
|
||||
},
|
||||
{
|
||||
displayName: 'Color',
|
||||
|
|
|
@ -259,11 +259,10 @@ export class GoogleCalendar implements INodeType {
|
|||
},
|
||||
};
|
||||
if (additionalFields.attendees) {
|
||||
body.attendees = (additionalFields.attendees as string[]).map(
|
||||
attendee => {
|
||||
return { email: attendee };
|
||||
},
|
||||
);
|
||||
body.attendees = [];
|
||||
(additionalFields.attendees as string[]).forEach(attendee => {
|
||||
body.attendees!.push.apply(body.attendees, attendee.split(',').map(a => a.trim()).map(email => ({ email })));
|
||||
});
|
||||
}
|
||||
if (additionalFields.color) {
|
||||
body.colorId = additionalFields.color as string;
|
||||
|
@ -504,11 +503,10 @@ export class GoogleCalendar implements INodeType {
|
|||
};
|
||||
}
|
||||
if (updateFields.attendees) {
|
||||
body.attendees = (updateFields.attendees as string[]).map(
|
||||
attendee => {
|
||||
return { email: attendee };
|
||||
},
|
||||
);
|
||||
body.attendees = [];
|
||||
(updateFields.attendees as string[]).forEach(attendee => {
|
||||
body.attendees!.push.apply(body.attendees, attendee.split(',').map(a => a.trim()).map(email => ({ email })));
|
||||
});
|
||||
}
|
||||
if (updateFields.color) {
|
||||
body.colorId = updateFields.color as string;
|
||||
|
|
Loading…
Reference in a new issue