Giter Site home page Giter Site logo

node-red-contrib-hangouts-chat's Introduction

Hangouts Chat for Node-RED

A node for you to make a chat bot on Hangouts Chat with node red. Please note that Hangouts Chat is only available for paid G Suite customers.

This is a work in progress, please write issues to ask for changes

Installation

Use npm install node-red-contrib-hangouts-chat to install.

Usage

This package provides nodes to send and receive messages on Hangouts Chat via Node-RED.

The input node is used to receive messages from hangouts chat. You can use msg.roomId to filter incoming messages by conversation. The message contains the message in msg.payload, the conversation id in msg.roomId and the complete message event object in msg.event.

The output node is used to send messages to an existing conversation. You can use the conversation id on the properties or provide a valid conversation id in msg.roomId. The msg.payload will be send to the conversation.

You will need to create a project in Google cloud platform with Hangouts chat enabled. To do so, login to developer console. Create a new project, and enable Hangout Chat API. Under configuration, set:

  • status: live
  • bot name (this is how you will add and ping the bot)
  • avatar
  • description
  • functionality: rooms
  • connection settings – bot URL:
  • permission: everyone in your domain

You will need a google service account to use the send node.

License

MIT

node-red-contrib-hangouts-chat's People

Contributors

lexoyo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

node-red-contrib-hangouts-chat's Issues

It would be great if this worked with Pub/Sub

As the subject says, it would be great if this worked with Pub/Sub as described here:
https://developers.google.com/hangouts/chat/how-tos/pub-sub

This would allow people with node red installations behind a firewall to use chatbots without exposing their Node red installation to the outside world.

The setup for this is more complex than the URL based service: the node would need the Google Service Account credentials (normally a JSON file) as well as the Project ID and the Subscription ID for the pub/sub service.

I have a working bot client set up on my PC based on the Java code in the above URL (which needed some tweaking) if you have questions.

Dependency Issue with agent-base <6.0.0 and Node-RED 2.0

Hi,

We've detected that your node has a dependency on an old version of agent-base (<6.0.0) ,
These old versions were patching a core node.js function in a way that could break other libraries - including one we started using in Node-RED 2.0 for the HTTP Request node.
Therefore any users that upgrade to Node-RED 2.0 and have your node installed (or later try to install it) will get errors when using the http-request node.

Could you please take a look at your dependencies and see if you can update the versions so that you are no longer dependent on agent-base before version 6.0.0

Note this could be a module that you are using has a dependency on agent-base so you might need to check for updates to that module, to help you we've attached your nodes dependency tree below

More details on this issue and the warning message that is now displayed in Node-RED 2.0.2 are on the forum at link https://discourse.nodered.org/t/node-red-2-0-2-released/48767

└─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  │  └─ [email protected]
   │  ├─ [email protected]
   │  ├─ [email protected]
   │  │  ├─ [email protected]
   │  │  ├─ [email protected]
   │  │  ├─ [email protected]
   │  │  ├─ [email protected]
   │  │  └─ [email protected]
   │  ├─ [email protected]
   │  ├─ [email protected]
   │  ├─ [email protected]
   │  │  └─ [email protected]
   │  ├─ [email protected]
   │  │  └─ [email protected]
   │  ├─ [email protected]
   │  ├─ [email protected]
   │  │  ├─ [email protected]
   │  │  ├─ [email protected]
   │  │  ├─ [email protected]
   │  │  └─ [email protected]
   │  └─ [email protected]
   │     ├─ [email protected]
   │     │  └─ [email protected]
   │     └─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  │  ├─ [email protected]
   │  │  ├─ [email protected]
   │  │  │  ├─ [email protected]
   │  │  │  ├─ [email protected]
   │  │  │  └─ [email protected]
   │  │  ├─ [email protected]
   │  │  │  ├─ [email protected]
   │  │  │  │  ├─ [email protected]
   │  │  │  │  ├─ [email protected]
   │  │  │  │  │  └─ [email protected]
   │  │  │  │  └─ [email protected]
   │  │  │  └─ [email protected]
   │  │  ├─ [email protected]
   │  │  │  ├─ [email protected]
   │  │  │  │  └─ [email protected]
   │  │  │  │     └─ [email protected]
   │  │  │  └─ [email protected]
   │  │  ├─ [email protected]
   │  │  │  ├─ [email protected]
   │  │  │  │  ├─ [email protected]
   │  │  │  │  │  └─ [email protected]
   │  │  │  │  ├─ [email protected]
   │  │  │  │  ├─ [email protected]
   │  │  │  │  └─ [email protected]
   │  │  │  │     ├─ [email protected]
   │  │  │  │     │  └─ [email protected]
   │  │  │  │     │     └─ [email protected]
   │  │  │  │     └─ [email protected]
   │  │  │  │        └─ [email protected]
   │  │  │  ├─ [email protected]
   │  │  │  ├─ [email protected]
   │  │  │  ├─ [email protected]
   │  │  │  │  ├─ [email protected]
   │  │  │  │  └─ [email protected]
   │  │  │  └─ [email protected]
   │  │  ├─ [email protected]
   │  │  └─ [email protected]
   │  │     ├─ [email protected]
   │  │     └─ [email protected]
   │  └─ [email protected]
   │     ├─ [email protected]
   │     ├─ [email protected]
   │     ├─ [email protected]
   │     ├─ [email protected]
   │     │  └─ [email protected]
   │     │     ├─ [email protected]
   │     │     │  ├─ [email protected]
   │     │     │  ├─ [email protected]
   │     │     │  └─ [email protected]
   │     │     │     └─ [email protected]
   │     │     ├─ [email protected]
   │     │     └─ [email protected]
   │     │        ├─ [email protected]
   │     │        └─ [email protected]
   │     ├─ [email protected]
   │     └─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   └─ [email protected]
      ├─ [email protected]
      │  ├─ [email protected]
      │  ├─ [email protected]
      │  │  └─ [email protected]
      │  └─ [email protected]
      │     └─ [email protected]
      ├─ [email protected]
      └─ [email protected]
         ├─ [email protected]
         ├─ [email protected]
         ├─ [email protected]
         │  └─ [email protected]
         ├─ [email protected]
         ├─ [email protected]
         ├─ [email protected]
         │  └─ [email protected]
         │     ├─ [email protected]
         │     ├─ [email protected]
         │     ├─ [email protected]
         │     ├─ [email protected]
         │     ├─ [email protected]
         │     └─ [email protected]
         ├─ [email protected]
         ├─ [email protected]
         ├─ [email protected]
         ├─ [email protected]
         ├─ [email protected]
         ├─ [email protected]
         │  ├─ [email protected]
         │  ├─ [email protected]
         │  │  └─ [email protected]
         │  └─ [email protected]
         ├─ [email protected]
         │  ├─ [email protected]
         │  │  └─ [email protected]
         │  ├─ [email protected]
         │  │  ├─ [email protected]
         │  │  │  └─ [email protected]
         │  │  ├─ [email protected]
         │  │  ├─ [email protected]
         │  │  ├─ [email protected]
         │  │  └─ [email protected]
         │  │     └─ [email protected]
         │  ├─ [email protected]
         │  └─ [email protected]
         │     ├─ [email protected]
         │     ├─ [email protected]
         │     │  └─ [email protected]
         │     ├─ [email protected]
         │     │  └─ [email protected]
         │     ├─ [email protected]
         │     └─ [email protected]
         ├─ [email protected]
         │  ├─ [email protected]
         │  ├─ [email protected]
         │  │  └─ [email protected]
         │  ├─ [email protected]
         │  │  └─ [email protected]
         │  └─ [email protected]
         │     └─ [email protected]
         ├─ [email protected]
         │  ├─ [email protected]
         │  ├─ [email protected]
         │  │  ├─ [email protected]
         │  │  ├─ [email protected]
         │  │  ├─ [email protected]
         │  │  └─ [email protected]
         │  │     ├─ [email protected]
         │  │     ├─ [email protected]
         │  │     └─ [email protected]
         │  └─ [email protected]
         │     ├─ [email protected]
         │     │  └─ [email protected]
         │     ├─ [email protected]
         │     │  ├─ [email protected]
         │     │  └─ [email protected]
         │     ├─ [email protected]
         │     │  └─ [email protected]
         │     ├─ [email protected]
         │     ├─ [email protected]
         │     │  └─ [email protected]
         │     ├─ [email protected]
         │     ├─ [email protected]
         │     ├─ [email protected]
         │     └─ [email protected]
         │        └─ [email protected]
         ├─ [email protected]
         │  └─ [email protected]
         ├─ [email protected]
         ├─ [email protected]
         ├─ [email protected]
         ├─ [email protected]
         └─ [email protected]


Thanks in advance for looking into this.

Sam

PS Sorry for the templated issue but we've got a number of nodes with the issue so I'm automating the issue creation.

Any tips on setting this up?

First I tried to use botman. I ran into issues serving laravel as https. Documentation on this is near nonexistent, so to troubleshoot I set up apache for https using a domain wildcard cert.

Google chat window status says the bot is available. I can send messages to the bot. I see access requests come from "google dynamite" in the apache log but they are empty, no REQUEST/GET/POST data in them at all. I can write out a line like '{"text": "this is a test"}' and it shows me the response in the chat. I figured since there's no documentation on laravel and https I'll try node-red. to my surprise I found this module almost instantly! I tried using node-red-contrib-hangouts-chat and again, I ran into issues serving as https. I found a script to redirect http/https for port 1880 (node-red) and I think that I've got this figured out now, but I don't get messages in node-red debug either. I'm starting to wonder if it's a problem with my certificate but google won't help me at all.

I have not tried to redirect http / https traffic to botman yet. I will try that next, but in the meantime: Any tips on setting this up? NGINX? Apache? Certificates? Google settings, this one mainly about their request to use a long string for a url?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.