Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Google Chat Support #346

Merged
merged 2 commits into from
Jan 11, 2021
Merged

Added Google Chat Support #346

merged 2 commits into from
Jan 11, 2021

Conversation

caronc
Copy link
Owner

@caronc caronc commented Jan 11, 2021

Description:

Related issue (if applicable): #344

Setup

For this to work correctly you need to create a webhook. You'll also
need a GSuite account (there are free trials if you don't have one)

  • Open Google Chat in your browser:
    Link: https://chat.google.com/
  • Go to the room to which you want to add a bot.
  • From the room menu at the top of the page, select Manage webhooks.
  • Provide it a name and optional avatar and click SAVE
  • Copy the URL listed next to your new webhook in the Webhook URL column.
  • Click outside the dialog box to close.

When you've completed, you'll get a URL that looks a little like this:

  • https://chat.googleapis.com/v1/spaces/AAAAk6lGXyM/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=O7b1nyri_waOpLMSzbFILAGRzgtQofPW71fEEXKcyFk%3D

Simplified, it looks like this:

  • https://chat.googleapis.com/v1/spaces/WORKSPACE/messages?key=WEBHOOK_KEY&token=WEBHOOK_TOKEN

Syntax

This plugin will simply work using the urls of:

  • gchat://{workspace}/{key}/{token}
  • https://chat.googleapis.com/v1/spaces/{workspace}/messages?key={key}&token={token}
    • Hence, you can just pass in the generated webhook as is straight into Apprise. It will know what to do.

New Service Completion Status

  • apprise/plugins/NotifyGoogleChat.py
  • setup.py
    • add new service into the keywords section of the setup() declaration
  • README.md
    • add entry for new service to table (as a quick reference)
  • packaging/redhat/python-apprise.spec
    • add new service into the %global common_description

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • No lint errors (use flake8)
  • 100% test coverage

@caronc caronc merged commit cf6df97 into master Jan 11, 2021
caronc added a commit that referenced this pull request Jan 11, 2021
@caronc caronc deleted the 344-google-chat-support branch January 26, 2021 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant