Calendar API v3 event structure issues

I’m having trouble creating calendar events and they’re not being added properly. Can someone check if my event structure is correct?

I’ve been working on this for hours and can’t figure out what’s wrong. The event creation seems to fail silently. Here’s my current code:

private void CreateCalendarEvent()
{
    List<EventAttendee> attendeeList = new List<EventAttendee>();
    attendeeList.Add(new EventAttendee{ Email = "[email protected]"});

    List<EventReminder> reminderList = new List<EventReminder>();
    reminderList.Add(new EventReminder{ Minutes = 10, Method = "popup"});

    Event.RemindersData reminders = new Event.RemindersData();            
    reminders.Overrides = reminderList;

    Event calendarEvent = new Event
    {
        Attendees = attendeeList,
        Reminders = reminders,       
        Summary = "Team Meeting",
        Description = "Weekly sync meeting",
        Location = "Conference Room A",                
        Start = new EventDateTime
        {
            Date = "2023-10-15",
            DateTime = "2023-10-15T14:30:00.000-05:00",
            TimeZone = "America/New_York"
        },
        End = new EventDateTime
        {
            Date = "2023-10-15",
            DateTime = "2023-10-15T15:30:00.000-05:00",
            TimeZone = "America/New_York"
        },
    };

    _calendarService.Events.Insert(calendarEvent, "primary").Execute();
}

Any ideas what might be wrong with this format?

Silent Calendar API failures are the worst. Everyone’s mentioned the Date/DateTime conflict, but your timezone handling could be the real culprit. I’ve seen the API accept broken timezone identifiers then just fail to create events. Stick with standard formats like “America/New_York” or convert everything to UTC first. Also check if your EventAttendee objects have the Optional property set - some setups won’t work without it. The API sometimes validates attendee permissions before creating events, so if an attendee email doesn’t have calendar access, it’ll just silently drop. Log your event object before Execute() to make sure it’s serializing properly.

Been fighting Calendar API headaches for years - manual event creation with all those data structures is pure torture. Your code looks fine, but debugging silent failures will eat your entire day.

I ditched the direct API approach and automated everything through Latenode instead. Set up workflows that handle event creation with actual error handling that works. It sorts out DateTime/Date conflicts automatically and handles timezones without breaking.

Best part? Create templates for different event types and just pass parameters. No more manually building attendee lists and reminder objects every single time.

My flows pull meeting details from our project system and auto-create calendar events. Takes 10 minutes to build vs hours debugging API nonsense.

You can actually see where things break in the workflow instead of guessing why Execute() crapped out.

The silent failure is happening because you’re missing error handling around that Execute() call. Wrap it in a try-catch block to see what’s actually breaking.

Your event structure has that Date/DateTime issue others mentioned. I’ve been burned by this exact same thing.

I always validate the calendar ID exists before inserting. Sometimes “primary” isn’t what you think it is, especially with multiple calendars or shared ones.

Try this quick test - create a super simple event with just Summary, Start DateTime (no Date field), and End DateTime. No attendees, no reminders. If that works, add the other fields back one by one.

Make sure your calendar service scope includes write permissions when you initialize it. Read permissions won’t throw an error but events just won’t get created.

You’re setting both Date and DateTime properties in your EventDateTime objects - that’s the problem. These are mutually exclusive. Use Date for all-day events or DateTime for timed events, never both. Since you want a timed meeting (2:30-3:30 PM), drop the Date properties completely. Just keep DateTime and TimeZone. Also, set reminders.UseDefault to false when using custom overrides. The API ignores custom reminders otherwise. I ran into the same silent failures until I fixed this.

yeah, i’ve hit this before. add reminders.UseDefault = false; and drop those Date fields from EventDateTime - just use the DateTime property for timed events. also check your calendar service has write permissions. that was causing silent failures for me.