Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/malykhin/hangouts-chat


https://github.com/malykhin/hangouts-chat

chat chatbot hangouts nodejs

Last synced: 13 days ago
JSON representation

Awesome Lists containing this project

README

        

# hangouts-chat

Simple client for Google Hangouts Chat

## Features

- Send messages to an incoming webhook registered to a Hangouts Chat room

## Installing

```bash
$ npm install hangouts-chat
```

## Using

```js
const IncomingWebHook = require('hangouts-chat').IncomingWebHook

const incomingWebHook = new IncomingWebHook('YOUR_WEB_HOOK_URL')

const messageObject = {text: 'hello'}

incomingWebHook.send(messageObject)

incomingWebHook.sendText('hello')
```

## Docs

For messageObject reference object check Google documentation:

- Simple Text Messages: https://developers.google.com/hangouts/chat/reference/message-formats/basic
- Card Formatting Messages: https://developers.google.com/hangouts/chat/reference/message-formats/cards
- Creating an incoming webhook: https://developers.google.com/hangouts/chat/how-tos/webhooks