[RELEASE] Google Calendar, Task, and Gmail Search and Gmail Notification Device

@fritz I haven’t gotten any communications about it specifically for the Google APIs. A few years ago I updated the app to use Oauth and a quick scan of the docs still have it being used. Appears MFA is only for typical user logins.

I will keep an eye on this.

2 Likes

Here is my notice.

Thank you for sharing the communication. Curious do you have MFA setup with your Google account to say login to Gmail or your Calendar? I do and it’s been setup for a few years and I did not receive this communication.

Assuming you do not have MFA setup, I expect this has to do with that along with logging into the Google Console (uses the same credentials) where MFA will be required in a few months.

Curious if others using GCal Search also received this communication and whether you have MFA setup.

No, I do not have MFA setup for this account.

I had been using Gcal Search to send SMS text messages via email for notifications but then my carrier (V) had issues which decreased reliability so I quickly pivoted to push notifications via the Hubitat app which is working well. I want to start using GCal Search again for some things but don’t want to start if new Google restrictions like MFA are going to complicate things.

I have been using MFA to login to my google account for years.

For logins that can’t use MFA, like an API call, google has permitted use of what they call “app passwords” for some time.

Hopefully that continues.

2 Likes

Let’s hope not considering that I didn’t receive a similar communication and have had MFA setup for years. I would setup MFA on your account so you can continue to login to your Google account and get past this requirement. Everything you have setup within the Google Console should continue to work.

Sounds like the change they’re making is to require MFA (for the logins mentioned in @fritz’s email that can support it), rather than to have MFA as an account option that can be enabled (or ignored) at the user’s discretion?

My interpretation of that communication is that MFA will be required for “human” logins to their services. Again I setup MFA years ago and I haven’t gotten the communication and assume I won’t since it doesn’t apply to me, no point in telling me to setup MFA since I already have it.

Years ago their API login requirements (non human logins/HE hub login) changed a bit and I refactored the app to utilize OAuth and their latest requirements at that time. I quickly scanned their development documentation yesterday and everything is still the same and no warnings about upcoming changes. I expect GCal to continue to work.

2 Likes

Hi, I've been using this for a while, working great, but I think I found a bug:

I have a GCal search trigger that looks for multiple events, like so (I'm not using google query matching):
NameA,NameB,NameC
It correctly finds the events, but the problem is that the Start time seems to be taken from the first event matched. Let me give you an example to explain what I mean:

NameA event starts on the 5th of March, and is an All-day event until the 8th of March.
NameB event starts on the 3rd of March, and is an All-day event until the 9th of March.

What the app does in this situation is that it correctly finds both events, but it sets the start time of the event to be 5th of March, the reason being that NameA is listed first in the Search String parameter. What I would like it to do is to set the event to Start on the 3rd of March.
If I change the order in the search string, then the start time becomes 3rd of March.

This problem doesn't occur for the End Date, because the Sequential Event setting correctly identifies the latter of the two and sets it.

I hope you understand what I mean. If not, please let me know.
Thank you!

Edit:
I made a simple fix, in my use case it works and doesn't seem to break anything else:
In line 909:

// Original line
items = matchItem(items, caseSensitive, search, eventField)

// Updated line
items = matchItem(items, caseSensitive, search, eventField).sort { a, b -> a.eventStartTime <=> b.eventStartTime }

Thank you for letting me know of a bug. Would you mind sharing an example search string parameter you are using? I want to try to reproduce this on my dev hub.

It's literally this:
NameA, NameB

So it matches events starting with NameA or NameB.

1 Like

This is great, I just set it up. One question. I want the gcal integration to speak all events from one calendar at the start of that event on one of my speakers. But only if a certain switch is off. How can I pull this off, so it reads the %eventTitle% %eventDescription%

Happy you are finding this useful. Within the Additional Actions \ Notifications there is an option to include details from all matching events. But this fires based on the start time of the event found by the search trigger and cannot check values of other switches.

My only idea is you use a Rule Machine rule to enable and disable your notification device based on the value of the switch you are referring to. If the notification device is disabled the notification won't happen when GCal tries to send the notification.

@ritchierich can you please update the Google API instructions? They look nothing like the current, and very confusing, Google UI and steps shown on Github.

I stumbled about and got there in the end, but I have no idea how.... :man_shrugging:

I am sorry for the confusion Google has updated their UI many times since this solution was launched and it’s hard to keep up. It is one of those things you do once and never have to go into the console again.

I welcome any pull requests if folks want to help keep them up to date.

2 Likes

I'd love to know what I did, but It took me an hour of futzing around till I found where they hid everything.

1 Like

I would like to set up a GCal Search that lets me know if an appointment with a certain title is in the calendar. I have it searching for "Personal Trainer" in my calendar to see if there is an occurrence by "End of Next Day". It seems to be working but only turning the switch on at the start of the appointment and then off at the end of the appointment.

This might be the desired behavior. But if it is then why is the "End of Next Day" option available?

What I want is for the switch to go on to indicate that I have a training the next day. Is this possible? I have included my setup below if that is helpful. Thanks.






This is the default behavior to wait for the event start. Within the Schedule Settings section you will see a “Delay to Calendar Event Start” toggle that you can turn off and it will immediately turn on the switch when the Search Trigger finds a matching event. Obviously you would need to time the search trigger to query toy calendar at an appropriate time when you want the switch to turn on if an event is found.

Thanks!

1 Like

@ritchierich, first of all thanks for the app, it is extremely useful!
I've been using it for several months and it works really well, except for a very strange issue.
I use it only to turn switches on (tasks) based on calendar events, currently I have 9 switches and they all work except for 1, I'm not sure if is something in its name, it should turn on every 3 months, last time it didn't work and I thought it was a network communication issue, but today it should have been turned on, and again it didn't work, but today there was another calendar event together (same time), and that one had no issues, so I ruled out a network issue.

The one that is not working is 'Turn on Task - Toothbrush Change'

These were the logs produced

app:454 2025-05-21 04:00:10.735 info Toggling Switches -
app:454 2025-05-21 04:00:10.733 info Toggling Switches - turning on: Task - Water Plants
dev:807 2025-05-21 04:00:10.726 info Task - Water Plants was turned on

I have double checked the name of the calendar event and that of the switch

image

The top of the Tasker app page is showing the following at the moment:

Do you have a clue on what could be the problem?

Edit: Solved
I had set this up so long ago that I forgot that the switches to be controlled should be specified in the app page :man_facepalming:

3 Likes