by Fran T
Version 32 (October 15, 2024)
Download (254 downloads)
Displays your agenda for your choice of calendars and range of dates.
Despite the ease of use of the Automate Calendar blocks, there are inconsistencies in Google's internal API that result in it being very tricky to get your events correctly. All-day events cause special difficulty, which we delve into in this Forum thread:
https://groups.google.com/forum/m/#!topic/automate-user/JfGZl5gLoFY
Some things to watch out for:
• All-day events that start on the following day are returned within the window of the current day and must be filtered out, first converting their beginning and ending times to the GMT (UTC) time zone
• All-day events that start on the current day are not found, requiring the GMT offset be subtracted from the midnight time in order to be detected
• All-day anniversary events are defined having both starting and ending times of midnight on the same date
• The beginning and ending times in the Has Event block are both inclusive and have one-second resolution, so the number of seconds in a day since midnight 𝙢𝙞𝙣𝙪𝙨 𝙤𝙣𝙚 (86399) must be used for the ending date to return results only for the current day
• Care must be taken not to inappropriately filter out multiday events or single events which span dates
In light of all these issues, I originally wrote this flow as a demo to figure out the best way to resolve them in my flows. It's written so that the critical logic is contained in a subroutine to make it easier to copy into your own flows. The subroutine returns the past, upcoming, and ongoing event counts, the starting and ending times of the agenda, and the agenda itself, which is a dictionary that maps the midnight time of each day to an array of the day's events from all of the selected calendars. To set up the subroutine, give it a variable called 'calendars', which is a dictionary of calendar URI keys mapped to calendar names. You can create that dictionary using the "Calendar Picker" subroutine, which also demonstrates how to do a content query to get calendar information. The Date Pick blocks also contain a workaround for having the date correctly default to today.
--------------
Updates:
• Work around another framework bug where all-day events are not detected for the current day; improve support for events which span days; allow multiple calendars to be chosen; rewrite user experience to be a standalone app
• Show repeating non-all-day events having the same title on the same day; improve all-day event deduplication; improve support for non-all-day events which span days; sort displayed events
• Add UI to change the date window after viewing the agenda; fix for window spanning DST
• Make dialog text more compact; preselect calendars and date
• Add event description/notes; linkify agenda dialog text
• Strikethrough text for today's past events
• Small fix for events at DST end
• Fix for missing location and description for all-day events
5 stars | 2 | |
4 stars | 0 | |
3 stars | 0 | |
2 stars | 0 | |
1 star | 0 | |
Reports | 0 |
Rate and review within the app in the Community section.