mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -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',
|
multipleValueButtonText: 'Add Attendee',
|
||||||
},
|
},
|
||||||
default: '',
|
default: '',
|
||||||
description: 'The attendees of the event',
|
description: 'The attendees of the event. Multiple ones can be separated by comma.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Color',
|
displayName: 'Color',
|
||||||
|
@ -810,7 +810,7 @@ export const eventFields = [
|
||||||
multipleValueButtonText: 'Add Attendee',
|
multipleValueButtonText: 'Add Attendee',
|
||||||
},
|
},
|
||||||
default: '',
|
default: '',
|
||||||
description: 'The attendees of the event',
|
description: 'The attendees of the event. Multiple ones can be separated by comma.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Color',
|
displayName: 'Color',
|
||||||
|
|
|
@ -259,11 +259,10 @@ export class GoogleCalendar implements INodeType {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
if (additionalFields.attendees) {
|
if (additionalFields.attendees) {
|
||||||
body.attendees = (additionalFields.attendees as string[]).map(
|
body.attendees = [];
|
||||||
attendee => {
|
(additionalFields.attendees as string[]).forEach(attendee => {
|
||||||
return { email: attendee };
|
body.attendees!.push.apply(body.attendees, attendee.split(',').map(a => a.trim()).map(email => ({ email })));
|
||||||
},
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
if (additionalFields.color) {
|
if (additionalFields.color) {
|
||||||
body.colorId = additionalFields.color as string;
|
body.colorId = additionalFields.color as string;
|
||||||
|
@ -504,11 +503,10 @@ export class GoogleCalendar implements INodeType {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (updateFields.attendees) {
|
if (updateFields.attendees) {
|
||||||
body.attendees = (updateFields.attendees as string[]).map(
|
body.attendees = [];
|
||||||
attendee => {
|
(updateFields.attendees as string[]).forEach(attendee => {
|
||||||
return { email: attendee };
|
body.attendees!.push.apply(body.attendees, attendee.split(',').map(a => a.trim()).map(email => ({ email })));
|
||||||
},
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
if (updateFields.color) {
|
if (updateFields.color) {
|
||||||
body.colorId = updateFields.color as string;
|
body.colorId = updateFields.color as string;
|
||||||
|
|
Loading…
Reference in a new issue