0

The final idea of the bot that I am building will be to send out messages on the chat when a google sheet is edited. But first I am trying just to create a Google Chat bot linked to a google sheet with the hangouts chat template given by google. For this I used the steps described in the following link: https://developers.google.com/hangouts/chat/quickstart/apps-script-bot

With this, I was able to create a bot that works with a standalone app script (a standalone script is any script that is not bound to Google Sheets, Docs, Slides, or Forms file or Google Sites) but when I work with a bounded app script (bounded with a google sheet), I receive a message "...bot not responding" in the chat. To change from the standalone script to the bounded script I just changed the deployment ID of the app scripts under the Connection settings (step 2 in the link above). Should I do something else for this to work?

I am not finding that much documentation about this so I would be very happy if you have any suggestions for me.

user14491665
  • 35
  • 11
  • If you did all the steps for the bound script in the same way like for the standaloen one - the problem must be related to the content of your bound script. What is the difference to the standalone? Can you show your code? – ziganotschka Oct 21 '20 at 10:31
  • Hi @ziganotschka. You are right. I was finally able to understand what was missing here. In my manifest file I was missing the "chat": {} object in it. Another quick question, are you familiar with making a bot send a message to a room when a sheet is edited? Should I use an onEdit function? How does the bot know to which room should it send out the message? – user14491665 Oct 21 '20 at 12:04
  • 1
    @ziganotschka no worry about it, I have already found how to do this last part also! (: – user14491665 Oct 21 '20 at 14:01
  • Can you please share that code for study purposes? – Mehdi Abbas Jun 13 '22 at 08:19

1 Answers1

0

I was missing the "chat": {} object on my manifest file.

{
  "timeZone": "America/Los_Angeles",
  "dependencies": {},
  "chat": {
    "addToSpaceFallbackMessage": "Thank you for adding me!"
  },
  "exceptionLogging": "STACKDRIVER"
}
user14491665
  • 35
  • 11