How to send goog calander invitation with Customized UI Interface insteadof default google invitation interface

Viewed 19

Please Help out with my issue,

  • I want to override the invitation interface with my own content(HTML).

  • I want to replace Below attached UI below (default email template) with My customized design.

    private Event createCalendarEventBuilder(Event event) { try {

          event.setSummary("My Event").setLocation("India")
                        .setDescription("Please join the meeting");
    
                // Adding event Start date and time
                DateTime startDateTime = new DateTime("09-12-2021T01:22:00"));
                EventDateTime start = new EventDateTime().setDateTime(startDateTime)
                        .setTimeZone("18-12-2021T23:22:00");
                event.setStart(start);
                if (userCalendar.getIsItRecurringEvent()) {
                    event.setRecurrence(Arrays.asList("{RecurenceRull}"));
    
                    String recuEndDateTime = userCalendar.getStartDateTime().split("T")[0] + "T"
                            + userCalendar.getEndDateTime().split("T")[1];
    
                    DateTime endDateTime = new DateTime(recuEndDateTime);
                    EventDateTime end = new EventDateTime().setDateTime(endDateTime)
                            .setTimeZone("Asia/Kolkata");
                    event.setEnd(end);
    
                } 
    
                // Adding event reminders
                EventReminder[] reminderOverrides = new EventReminder[] {
                        new EventReminder().setMethod("email")
                                .setMinutes(10),
                        new EventReminder().setMethod("popup")
                                .setMinutes(2)
    
                };
                Event.Reminders reminders = new Event.Reminders().setUseDefault(false)
                        .setOverrides(Arrays.asList(reminderOverrides));
                event.setGuestsCanModify(false);
    
                event.setReminders(reminders);
    
                // Adding event attendees
                EventAttendee[] eAttendees;
                if (userCalendar.getAttendees() != null && !userCalendar.getAttendees().isEmpty()) {
                    eAttendees = new EventAttendee[userCalendar.getAttendees().size() + 1];
                    int idx = 1;
                    Iterator<String> attendeesMails = userCalendar.getAttendees().iterator();
                    while (attendeesMails.hasNext()) {
                        String attendeeMail = attendeesMails.next();
                        if (!(attendeeMail.equalsIgnoreCase(userCalendar.getMeetingModerator()))) {
                            eAttendees[idx] = new EventAttendee().setEmail(attendeeMail);
                            idx++;
                        }
                    }
                } else {
                    eAttendees = new EventAttendee[1];
                }
                EventAttendee moderatorAttendee = new EventAttendee();
                moderatorAttendee.setEmail(userCalendar.getMeetingModerator());
                moderatorAttendee.setComment(EventConstants.MOD_COMMENT);
                eAttendees[0] = moderatorAttendee;
                event.setAttendees(Arrays.asList(eAttendees));
    
            } catch (Exception e) {
                e.printStackTrace();
            }
            return event;
        }
    

Above is My code, Here I want to add Custom(HTML content) notification insteadof below attachment(enter image description here).

0 Answers
Related