Regarding obtaining an event ID for Google Calendar

Thanks for your help.

When I get an event imported by CSV, it becomes "CSVConvert~". Is it possible to get this with a normal event ID?

We are creating a script that searches Google Calendar by name and date for a specific appointment date and time in GAS, deletes the existing appointment date and time, and registers a new appointment date and time.

To confirm the existing appointment date and time from the user, I searched by name and date, saved the event ID when found, and when I tried to delete the appointment in Google Calendar with that event ID, an error occurred because the event ID was different.

After doing some research, I found out that the current appointment was imported data from a CSV file, so "CSVConvert~" would be attached to the beginning of the file.
The actual event ID is "8d9~" according to Google Calendar's troubleshooting information, which is totally different.

I asked ChatGPT about it.

Regarding the issue of getting and matching the event IDs, there are a few things that are important to consider about what is different between the `checkReservationForDate` function and the `deleteCalendarEvent_` function.

1. **Format of Event IDs**: The `checkReservationForDate` function searches for events associated with a particular date and retrieves their event IDs. The `deleteCalendarEvent_` function, on the other hand, is trying to delete an event using a specific event ID. The problem is that this retrieved event ID may not match the format expected by `deleteCalendarEvent_`.

2.**Source of event IDs**: For events imported in CSV, the event IDs may be provided in a different format (e.g. `CSVConvert~`). This suggests that Google Calendar internally handles regular events and CSV-imported events differently. 3.

3. **API Response**: If the response obtained by `checkReservationForDate` is different from the information required by `deleteCalendarEvent_`, there may be a data mismatch between these functions.

In light of these points, modifying or troubleshooting the script requires a detailed analysis of the response from the API and rechecking the format of the event IDs and how they are retrieved. You may also refer to Google Calendar documentation and support resources to find a more specific solution.

I was told something like the following.

The permissions are set to administrator for both change and delete. We are currently successfully registering new appointment dates and times that do not require an event ID.

It would be helpful if there is a way to convert the event ID starting with CSVConvert or a GAS code to get the actual event ID that is not CSVConvert.

Or could you please share some wisdom with us?

Thank you in advance.

0 0 148
0 REPLIES 0
Top Labels in this Space