0

Through the google calendar publish event interface, it is possible to copy an URL link which can be used by others to see that event, if they have access to the calendar.

Google Calendar Publish Event Window(https://i.sstatic.net/9yDLNAKN.png)

The event publish URL follows this format:

https://calendar.google.com/calendar/event?action=TEMPLATE&tmeid=ENCODED-TMEID&tmsrc=CALENDAR-ID

I am attempting to create the ENCODED-TMEID programmatically via google scripts, but I cannot figure how to do it.

NOTE: this is for a group google calendar not the primary calendar, which I have full access. The calendar is not public.

Attempting the following code does not yield the same ENCODED-TMEID that is obtained through publish event interface.

const eventID = event.getId().split('@');
const eid = Utilities.base64Encode(eventID).replace("=",'');

I have also tried several attempts at generating event URL link without success.

const eventUrl = "https://www.google.com/calendar/event?eid=" + eid + "&cid=" + CALENDAR-ID;

const eventUrl = "https://www.google.com/calendar/event?action=TEMPLATE&eid=" + eid + "&tmsrc=" + CALENDAR_ID;

It appears other posts are outdate with no longer supported functionality.

This is the most relevant post, but it appears the functionality has changed or it does not work because of account access.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.