Git Product home page Git Product logo

Comments (2)

scrthq avatar scrthq commented on July 16, 2024

This is now working in local, both with Webhooks and with the .NET SDK for Hangouts Chat.

Tidying up the last few issues to get the pipeline working the way I want it to and finishing up the documentation around this as well. Once done, this will be getting pushed up as a new release 😃


Webhook Notes

Webhooks are the most straightforward as far as additional setup is concerned. Specifically, you don't need to even have a PSGSuite config set up first in order to use Webhooks, since the Webhook URL contains the auth token already once generated.

The downsides to using Webhooks are that...

  1. they are Room (Space) specific, so you need a unique Webhook per Space you'd like to post messages to, and...
  2. they only allow posting messages into Hangouts Chat

Some additional functionality has been added to allow storage of encrypted Webhooks in the PSGSuite config directly via dictionary/hashtable. This allows you to use the hash key in your scripts as $hook with Send-GSChatMessage -Webhook $hook so you don't expose the Webhook in your script itself.

SDK Notes

Going the SDK route requires a few more steps to get set up. You'll need to add the Chat API to your project and configure it, which includes specifying a bot endpoint that is either:

  • Public API endpoint URL to send bot messages to
    • If using PSGSuite to handle the logic around message handling, this requires some additional routing logic in your infrastructure to enable
    • This would provide the only way to really respond back to messages sent to the bot directly with PSGSuite, assuming your API server is running PSGSuite itself and the POST to the API triggers the PowerShell backend
  • Google Apps Script deployment ID
    • This would be the only truly free option, as G Suite users already have access to Apps Script and other Google Services like it
    • This could possibly use Google Sheets as a sort of message queue and log for the bot, with a local instance of PSGSuite running in a loop and polling the Sheet for new messages every few seconds. I will be building a POC of this approach and adding to the documentation of it works as expected.
  • a Google Cloud Pub/Sub endpoint
    • Requires a Google Cloud Platform subscription
    • Requires additional logic to poll the Pub/Sub endpoint that is not yet built out in PSGSuite
    • Can be costly if you aren't careful with your polling settings, as each request counts, even if it there aren't any new messages to grab from the queue

from psgsuite.

scrthq avatar scrthq commented on July 16, 2024

added in v2.12.0

from psgsuite.

Related Issues (20)

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.