Integration with Google Chat - How? Actually it was ultra easy

Appsheet should naturally get tied with G Suite services and product as the time goes by, which is basically โ€œNo Doubtโ€. I believe you app creators would agree with it.

Google Chat should be one of the service G Suite users are broadly adopting to their day to day jobs on the enterprise basis. It should be common needs โ€œHow to integrate Appsheet app with Google Chatโ€?

Bunch of people should have been implemented this integration, but I tried it out with my app, and found it was super simple and easy. To share my experiences for those who would seek a solution toward the future. (this is also my own memorandamโ€ฆ)

1. Get the โ€œEnd pointโ€ URL from your Google Chat Rooms.

  Beatifully simple. Go to your Chat room and copy the URL.

  Go to your chat rooms you want to submit messages.  And hit the Manage Webhook

2. Just copy the URL

3. Go to Appsheet editor, workflow and past the URL you copied.

3X_1_9_1921324d5038b8e48cf6b858e13f7c142007005f.gif

Note

Workflow settings.

  • Preset Custom
  • URL One you just copied
  • Verb POST
  • HTTM Content Type JSON
  • Body โ€“ JSON

Simple JSON!

{
โ€œtextโ€: โ€œ<<[FieldNameYourWantToPassFromaRowToGoogleChatRoom!]>>โ€
}

โ€“

Beside that, you simple set up workflow as usual, when and how to โ€œfireโ€ the workflow as you wish.

Thank you Appsheet team, to make it and our life super simple and easier!!!

According to Google API documentation, we could do lots, sending message to chat room with card view etc. Should be a fun.

https://developers.google.com/hangouts/chat/concepts/cards

Please try it out and kindly share your own experiences and tips you find.

We have had native connector on webhook set up for Slack even before Appsheet become google cloud team, so I suspect this integration should be come much more simpler, but until then we just set up in this way, but still easy.

@tmiyai

29 73 9,077
73 REPLIES 73

Hi.
Can you help honor json code to hide the link I circled in red?
Or shorten it for better visibility?


Thanks you so much!

Not sure what to do, but you may consider to pass values to google chat as card instead of text?

can you tell me more please
I want visualization to the receiver

As I said I m not sure.

Thanks so much!

I have tried your method and I donโ€™t seem to get any data going to my chat room?

Thanks you so much.
I tried again json by the way you said. But still the error.
I used โ€œBody templateโ€ but still got the error.
I donโ€™t think the problem is with json anymore.

Failed: Webhook HTTP post request failed with exception The remote server returned an error: (400) Bad Request.

hi
I tried again with this json structure and the results were successful.
{
โ€œtextโ€: โ€œYour message from << HH Name >> goes here.โ€
}

Thanks everyone!

Webhook HTTP post request failed with exception The remote server returned an error: (400) Bad Request

i think this is because of too much data. With less rows to post , it works fine the POST. Does the POST has limits in rows posted?

The 400 bad request with no details, was because of google chat limit number of charachters in a message

My next question, if someone has an idea, is how tdo I webhook to a specific thread in a google chat room ?!

Can this Google chat Appsheet integration used for a comment box on dedicated record?
For example letโ€™s say I have a real estate app with house listing. On each house, could I use that integration to open a chat room dedicated for this house and access past conversation?

The App can not create Google chat rooms. Chat rooms must be manually created as a Gsuite user.

The App can only post to a room. It will not receive messages from that room. So, the app can post anything to a room , including comments added from app. You will comment in the app too if you want your reply to appear in the room.

With a workflow for the integration described here, you can โ€œlinkโ€ only one room. You will need different workflows for different rooms.

It you have just a few houses, itโ€™s your call if you want to create a room and a workflow for each house.

Personally , I created for myself a chat room for notifications from all my apps. I see there ( and I search fast if I need to ) something like "User X commented โ€œbla bla blaโ€ , about house Y, in app Z.

The real use is for sending notifications and information in GChat different departments Rooms , where users already direct chat every day.

This is great job Mr @tsuji_koichi

I need some help addapting the workflow to send the message to a specific topic in google chat.

How do i addapt something like this webhook url :
https://chat.googleapis.com/v1/spaces/someletters/messages?key=blablabla-WEfRq3CPzqKqqsHI&token=othe...

I have sent a topic to my email , and itโ€™s url is :
h t tps://chat.google.com/room/someletters/Amnz_Mk_SLk

I guess I must insert Amnz_Mk_SLk in the webhook url , but I donโ€™t know where.

Thank you

I changed some letters in the link, for privacy .

This is what I found out, to send workflows to the same thread in a google chat room :

The url webhook , as described in this awesome topic , is something like
"https://chat.googleapis.com/v1/spaces/AAAAxtPmhr8/messages?key=AIzasomelettershCZtE6vySjMmq3CPzqKqqs...โ€™

A workflow webhooked to this url will create a new thread every time, in the google chat room.

In my case, I wanted that updates of the same row to be sent in gchat room in the same designated thread, because it was a mess otherwise :
Thread1
Thread2
Thread3
Thread2update1
Thread4
Thread1update1
Thread2update2
Thread1update1 and so on.

I wanted :
Thread1
Thread1update1
Thread1update2
Thread1update3
Thread2
Thread2update1
Thread2update2 and so on .

To do this, it appears that all you have to do is to add at the end of the webhook url , without quotes , โ€œ&threadKey=anynameyouwantโ€ . Watch for the K , is case sensitive.

โ€œAnynameyouwantโ€ can be any string , if itโ€™s the first use of this string, a new thread will be created, if not, the messeges will be posted in the thread that first used that string.

So I added at the end of my webhook url :

&threadKey=<<[idx]>>

[idx] being my uniqueid() from my table.

And now , creation and all updates of the same row, goes as a reply to the same thread, and all my gchat โ€œnotificationsโ€ are nicely grouped now.

I feel good.

I will experience google chat cards next.

Just a simple add for those in need :

{
โ€œtextโ€ : โ€œ<<[nr Auto]>>,<<[litri]>> Litri,<https://www.google .com/maps/search/?api=1&query=<<substitute([gps];โ€ โ€œ;โ€")>>|HARTA> \n"
}

This puts a link go an appsheet recorded gps possition in a google chat workflow text.

Iโ€™m still struggling to find a way to write link to an appsheet generated file.

edit : this works for hyperlinks
<https://www.appsheet.com/template/gettablefileurl?appName=AdministrativXYZ&tableName=inregPVSP&fileN...<<encodeurl([foto fisa])>>|FOTO>

@tsuji_koichi This works perfectly if I want to send notifications in a Google Chat room. Can I send notifications to individual users? I do not want to add users to the Google Chat room and notifications are individually specific. Eg. if Event A - X should be notified and if event B - Y should be notified on google chat.

Please help me understand if this is possible.

As far as I know, Google chat webhook only allows to send message to room , not to individual.

Hi @tsuji_koichi How can make a private chat for every user?
As I know Appsheet only support group chat, but If I have many rows with difference user. How can I send a message to each with be confident from Appsheet?

Thanks,

I dont thik Google Chat API provide endpoint so that you communicate with single user. Google Chat API is currently able to send message to Group only.

How can we change the Url webhook dependented on group chat?

giแบฃ sแปญ cรณ 4 nhรณm, nแบฟu muแป‘n gแปญi thรดng bรกo ฤ‘แบฟn 1 trong 4 nhรณm ฤ‘รณ phแปฅ thuแป™c vร o mแป™t ฤ‘iแปu kiแป‡n nร o ฤ‘รณ thรฌ phฦฐฦกng รกn tแป‘t nhแบฅt sแบฝ lร  tแบกo 4 automation gแปญi thรดng bรกo cho 4 nhรณm, phแบงn ฤ‘iแปu kiแป‡n sแบฝ ฤ‘แบทt cho ฤ‘iแปu kiแป‡n cแปงa sแปฑ kiแป‡n mแป—i automation

Yes

Iโ€™ve ever think about this way, It better than if we can set a private only for persional messenges or only for sender and receiver.

What do I need to have the MANAGE WEBHOOKS option in that menu?
Martin_Hurtado_0-1647559876918.png

 

I suppose you are not using Google Workspace, but your are on the Google free account?

https://stackoverflow.com/questions/68312859/i-am-unable-to-get-configure-webhook-option-within-goog...

@Koichi_Tsuji 

You are absolutely right, my account is free, I was reviewing and I need to be an administrator to authorize certain permissions and one of them is in the google chat, thanks for the attention and the prompt response...

Thanks @Koichi_Tsuji , please you can update process and images for appsheet 2023?

 

The process did not change for me , since 2020 I have not updated some of the gchat webhooks,and they still work just fine.

One small change is that now appsheets has automation bots instead of previous action types, but the webhook part is the same.

Screenshot_20230202-221024.png

โ€ƒ@Koichi_Tsuji , this thread was a game changer in our organization . Thank you again. Without it, Appsheet would have probably not been implemented this deep and in all departments 

 

Top Labels in this Space