1.1.0 • Published 3 years ago

chat-adv-service v1.1.0

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

Chat Advanced Service

Interact with the Google Chat API via AppsScripts.

Getting Started

  • Create a service account that has access to Chat API
  • Add ChatService to your project with Library ID 1XDYAGcUoblJ073Kjveni2WOZHpKLYE8qlYMkeHViavLXvsKnBIl1DR2A
  • Send the privateKey and issuerEmail to the ChatService.init method
  • The returning object has Spaces, Members, and Messages namespaces, which themselves have methods that match the reference documentation.
const Chat = ChatService.init('<privateKey>', '<issuerEmail>');
const rooms = Chat.Spaces.list();
Logger.log(rooms);

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

3 years ago