Google Chat web hook not working with Notification alerts channel in GAE

368 views
Skip to first unread message

Sajal Gupta

unread,
Jan 23, 2022, 2:26:22 AM1/23/22
to Google App Engine
Hi,

I am trying to setup a webhook notification channel to a google chat room/space via its web hook functionality.

When I send a test message, it says that test message has been sent but it is not received on the google chat space.

Any ideas or any step by step documentation to set up webhook notification channel to send notification to google chat?

Thanks

Sajal 

Felipe Bergallo Corral

unread,
Jan 24, 2022, 3:55:25 AM1/24/22
to Google App Engine
Well, there is step-by-step documentation here, but I'm guessing you already read that so if you're having trouble setting it up... Would you mind showing us a sanitized version of your code? (Might be something in there that's off which is stopping your bot from saying anything in the chat while technically not being an error)

Sajal Gupta

unread,
Jan 24, 2022, 4:22:39 AM1/24/22
to Google App Engine
Hello Felipe,

My own bot written using instructions in GAE documentation is working fine for Google chat webhooks. I am facing a problem with Notification Channels on GAE console.

This is where I am trying to add the webhook.

notification channel.jpg

When I add Google chat room webhook here, and try TEST CONNECTION, I dont receive a message in my Chat space.

So, wondering what additional steps may be required for this to work correctly.

Thanks

Sajal

Felipe Bergallo Corral

unread,
Jan 26, 2022, 10:45:18 AM1/26/22
to Google App Engine
I recognize that dialog(ue) box from the Monitoring section, I don't recall it being in the GAE Dashboard.
Eitherway, I think the issue here is that it's not gonna send the same kind of message as the Chat Webhook is expecting (here's what Monitoring is sending), but I've also found this site which suggests using Auth, so I'm going to test that when I have a moment, but I believe that'll post it as a user, not sure.

Felipe Bergallo Corral

unread,
Jan 26, 2022, 11:54:40 AM1/26/22
to Google App Engine
Alright, I've been testing this and my understanding is that the "Add Webhook" dialog box is to create a webhook rather than linking up and existing webhook... The naming is somewhat confusing, but after re-reading the docs, that seems to be the intent

Felipe Bergallo Corral

unread,
Jan 26, 2022, 12:00:32 PM1/26/22
to Google App Engine
I would recommend using a Cloud Pub/Sub trigger to run your code inside of a Cloud Run instance
(in short add a "Cloud Pub/Sub" notification channel instead of a webhook, then create a Cloud Run instance with the cloud pub/sub channel as a trigger; it's considered an EventArc trigger, you should be able to select Pub/Sub as one of the trigger types in there)
Reply all
Reply to author
Forward
0 new messages