1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-11 11:41:56 +02:00
2024-10-14 22:16:49 +03:00

25 lines
1.4 KiB
Plaintext

CurrentDate = OPI_Tools.GetCurrentDate();
Token = "ya29.a0AcM612wz9aICBaWkidDK9RjYOKNA-5daTuSlIg1ySVWeZ1tv8sadrCnslGDvFg-oJ-1T2Z-5KZJxlRN0jZLnsiQCsUG4gQRyhx_8nY2Pk...";
Calendar = "8ad7d0bf4ee08e49a3c1ebf1c05f766a6182d85fc76946e57a49b02fb44198fc@group.calendar.google.com";
Name = "New event";
Description = "TestEventDescription";
Hour = 3600;
Image1 = "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture.jpg"; // URL, Binary or Path to file
Image2 = "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture2.jpg"; // URL, Binary or Path to file
Attachments = New Map;
Attachments.Insert("Image1", Image1);
Attachments.Insert("Image2", Image2);
EventDescription = New Map;
EventDescription.Insert("Description" , Description);
EventDescription.Insert("Title" , Name);
EventDescription.Insert("Venue" , "InOffice");
EventDescription.Insert("StartDate" , CurrentDate);
EventDescription.Insert("EndDate" , EventDescription["StartDate"] + Hour);
EventDescription.Insert("ArrayOfAttachmentURLs" , Attachments);
EventDescription.Insert("SendNotifications" , True);
Result = OPI_GoogleCalendar.CreateEvent(Token, Calendar, EventDescription);