I'm currently implementing the insert-function from the google-calendar-api (api reference) but after creating the event successfully, it never shows up on non-gmail-accounts (such as ...@icloud.com). This is also true when testing with the api-explorer. It only silently appears in gmail-accounts.
I've set sendNotifications
to true
and sendUpdates
to all
. No invite is sent out and yes, I've checked the spam-directory. I'm sitting at this problem for some days now and it just boggles my mind that this isn't working. The service is currently unusable as I can't event add attendees with non-gmail-addresses.
I've been following the documentation, tried the api-explorer and also tested the node.js-library as well as plain http-requests.
As said, the invite/non-gmail-accounts won't even work with the api-explorer. How can this bug be fixed?
Edit 1:
The function in Typescript that calls the corresponding api. oAuth2Client
gets initialized correctly. googleapis
is version 48.0.0
. The start and end times are correctly formatted strings, as the event gets created successfully but without a notification.
export async function createGoogleCalendarEntry(
uid: string,
props: CreateGoogleCalendarEntryProps,
context: CallableContext
): Promise<CreateCalendarEntryRes<CreateGoogleCalendarEntryRes>> {
const { title, start, end, attendees, desc } = props;
const oAuth2Client = await getAuthnAuthzGcpOAuth2ClientFromCallableContext(uid, context, c => c.gcp!);
return google
.calendar({ version: "v3", auth: oAuth2Client })
.events.insert({
calendarId: "primary",
sendUpdates: "all",
sendNotifications: true,
requestBody: {
summary: title,
description: desc,
start: { dateTime: start },
end: { dateTime: end },
attendees: attendees.map(a => ({ email: a.mail }))
}
})
.then(res => ({
provider: "google",
externalCalId: res.data.id!,
meta: res.data as CreateGoogleCalendarEntryRes
}));
}
I tested this out using the Calendars: Events.insert
Try this API functionality and was able to replicate this, so I had a look on Google's Issue Tracker and there is already a report which details the same kind of behaviour:
Google does seem to know about this issue but if it's causing problems you can file your own bug about it here.
You can also hit the ☆ next to the issue number in the top left on the aforementioned pages which lets Google know more people are encountering this and so it is more likely to be seen to faster.