1.1.0 • Published 5 years ago
chat-adv-service v1.1.0
Chat Advanced Service
Interact with the Google Chat API via AppsScripts.
Getting Started
- Create a service account that has access to Chat API
- Add
ChatServiceto your project with Library ID1XDYAGcUoblJ073Kjveni2WOZHpKLYE8qlYMkeHViavLXvsKnBIl1DR2A - Send the
privateKeyandissuerEmailto theChatService.initmethod - The returning object has
Spaces,Members, andMessagesnamespaces, which themselves have methods that match the reference documentation.
const Chat = ChatService.init('<privateKey>', '<issuerEmail>');
const rooms = Chat.Spaces.list();
Logger.log(rooms);- Use the provided documentation for learn how to use all of these methods.
Motivation
AppsScript doesn't have a native advanced service to interact with the Chat API. And I need one, so I made one!
Possible Use Cases
- A Google Form that opens a new thread on a Google Chat room on submission
- Poll your domain for Chat room activity
Issues?
Currently used in production, but feedback welcome. Thanks for any contributions. Use the issue github tracker for issues.
1.1.0
5 years ago