Attendees not receiving email reminders for PHP-created Google Calendar events

Hey everyone, I’m having trouble with the Google Calendar API in PHP. I’m creating events with custom email reminders, but they’re not working as expected. When I add an event to the main calendar, it sends email notifications 24 hours and 1 hour before the event, which works perfectly for the calendar owner. The problem is that attendees only receive the standard 30-minute popup reminder. I adjusted my setup like this:

$event_details = [
    'guests' => $invite_list,
    'alerts' => [
        'custom' => true,
        'settings' => [
            ['type' => 'email', 'when' => 1440],
            ['type' => 'email', 'when' => 60],
            ['type' => 'popup', 'when' => 10],
        ],
    ],
];

$new_event = $calendar->events->create($main_calendar, $event_details, [
    'meetingInfo' => 1,
    'notifyGuests' => 'all',
    'sendAlerts' => true
]);

Does anyone know how to modify my settings so that all attendees receive the email reminders like the main account? Thanks in advance for any suggestions!

I’ve dealt with similar issues using the Google Calendar API. One often overlooked aspect is the attendees’ individual calendar settings. Even if you set custom reminders for an event, attendees’ personal preferences can override these.

A workaround I’ve found effective is to explicitly set the ‘overrideAnyExisting’ parameter to true in the reminders object. This forces the custom reminders to take precedence over attendees’ default settings. Here’s a snippet that might help:

$event = new Google_Service_Calendar_Event([
    'reminders' => [
        'useDefault' => false,
        'overrides' => [
            ['method' => 'email', 'minutes' => 1440, 'overrideAnyExisting' => true],
            ['method' => 'email', 'minutes' => 60, 'overrideAnyExisting' => true],
            ['method' => 'popup', 'minutes' => 10, 'overrideAnyExisting' => true]
        ]
    ]
]);

Also, ensure you’re using the latest version of the Google API client library, as older versions might have quirks with reminder behavior.

I’ve encountered this issue before, and it’s definitely challenging when the API behaves differently for organizers and attendees. In my experience, the key is to bypass the default reminder behavior by explicitly setting overrides for reminders during the event insertion. Instead of defining reminders in the usual event configuration, try constructing your event like this:

$event = new Google_Service_Calendar_Event([
    'attendees' => [
        ['email' => '[email protected]'],
        ['email' => '[email protected]']
    ],
    'reminders' => [
        'useDefault' => false,
        'overrides' => [
            ['method' => 'email', 'minutes' => 1440],
            ['method' => 'email', 'minutes' => 60],
            ['method' => 'popup', 'minutes' => 10]
        ]
    ]
]);

$calendar->events->insert('primary', $event, ['sendNotifications' => true]);

This method made sure that all attendees received the custom email reminders as desired. Make sure to double-check with your specific API version, as there might be slight variations in behavior.

hey ryan, i ran into this too. make sure ur using the ‘reminders’ field instead of ‘alerts’. try something like this:

$event = new Google_Service_Calendar_Event([
‘reminders’ => [
‘useDefault’ => false,
‘overrides’ => [
[‘method’ => ‘email’, ‘minutes’ => 1440],
[‘method’ => ‘email’, ‘minutes’ => 60]
]
]
]);

that shoud do the trick. lmk if it works!