derekantrican / GAS-ICS-Sync

A Google Apps Script for syncing ICS/ICAL files faster than the current Google Calendar speed
GNU General Public License v3.0
1.5k stars 192 forks source link

Events are pulled in without notifications #409

Closed Carmageddon closed 7 months ago

Carmageddon commented 7 months ago

The problem

Despite having var addAlerts = "yes";, the events synched via the script have no 30 minutes notifications on them, and hence on my phone they dont pop up.

What details do you require to check it out?

So how do I get notifications added to all events by default?

Version of GAS-ICS-Sync

5.8

Additional information & file uploads

Screenshot 2024-01-30 at 01 01 51
var addEventsToCalendar = true;           // If you turn this to "false", you can check the log (View > Logs) to make sure your events are being read correctly before turning this on
var modifyExistingEvents = true;          // If you turn this to "false", any event in the feed that was modified after being added to the calendar will not update
var removeEventsFromCalendar = true;      // If you turn this to "true", any event created by the script that is not found in the feed will be removed.
var removePastEventsFromCalendar = true;  // If you turn this to "false", any event that is in the past will not be removed.
var addAlerts = "yes";                    // Whether to add the ics/ical alerts as notifications on the Google Calendar events or revert to the calendar's default reminders ("yes", "no", "default").
var addOrganizerToTitle = false;          // Whether to prefix the event name with the event organiser for further clarity
var descriptionAsTitles = false;          // Whether to use the ics/ical descriptions as titles (true) or to use the normal titles as titles (false)
var addCalToTitle = false;                // Whether to add the source calendar to title
var addAttendees = false;                 // Whether to add the attendee list. If true, duplicate events will be automatically added to the attendees' calendar.
var defaultAllDayReminder = 1440;           // Default reminder for all day events in minutes before the day of the event (-1 = no reminder, the value has to be between 0 and 40320)
                                          // See https://github.com/derekantrican/GAS-ICS-Sync/issues/75 for why this is neccessary.
var overrideVisibility = "";              // Changes the visibility of the event ("default", "public", "private", "confidential"). Anything else will revert to the class value of the ICAL event.
var addTasks = false;

var emailSummary = true;                 // Will email you when an event is added/modified/removed to your calendar
var email = "me_email@gmail.com";                           // OPTIONAL: If "emailSummary" is set to true or you want to receive update notifications, you will need to provide your email address
var customEmailSubject = "";              // OPTIONAL: If you want to change the email subject, provide a custom one here. Default: "GAS-ICS-Sync Execution Summary"

Example block from ICAL file that matches the screenshotted example:

BEGIN:VEVENT
DTEND;TZID=America/Halifax;VALUE=DATE-TIME:20240202T183000
DTSTART;TZID=America/Halifax;VALUE=DATE-TIME:20240202T160000
DTSTAMP;VALUE=DATE-TIME:20230928T151159Z
LAST-MODIFIED;VALUE=DATE-TIME:20230928T151159Z
UID:4032323-301283973
DESCRIPTION:Location: BHPCC - Upstairs Dance Studio / Multi-Purpose Room\
 n Training Starts at 4pm. Pick-Up at 6:30pm  (Arrival Time:  4:00 PM (At
 lantic Time (Canada)))
SUMMARY:Illusions Rising Stars - Anastasia\, Flora\, Kamila\, Kim\, Maisy
  and Sadie
LOCATION:202 Innovation Drive
SEQUENCE:0
END:VEVENT
jonas0b1011001 commented 7 months ago

There is no alert specified for the event you shared.

As the explanation states, you have the option to set var addAlerts to: yes: Will add the specific alarms defined for each event, in your case none no: Will not add any alarms default: will add the standard alarm defined by your target calendar

Carmageddon commented 7 months ago

Thanks, just re-installed with setting set to "default", and will update if that resolves the issue

jonas0b1011001 commented 7 months ago

Keep in mind that you'll have to sync to a different calendar for the changes to take effect.

Carmageddon commented 7 months ago

What do you mean? What's the process then? do I delete the calendar, and let it recreate it on next run? I'd like to keep the same name for the calendar

jonas0b1011001 commented 7 months ago

As the events from your source itself are unchanged, the script will not update them. Therefore you either have to: A) remove the previously synced events from your target calendar (by syncing an empty calendar to it, you can use https://pastes.io/raw/u71myu8zz4 as source url)

B) change the target calendar in var sourceCalendars

Carmageddon commented 7 months ago

Ok, I've resolved it - the problem was that I had to change the calendar setting to actually create that default - then every event immediately started showing notification for 1 hour beforehand, regardless of the script setting.

Thanks for the quick help!