Skip to content

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmitul9 committed May 21, 2024
1 parent 9007552 commit b7043e1
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Google Webhook Notification Generator

This Python script facilitates the generation of notifications using Google webhook for Hangouts Chat. It constructs a card with specified content and sends it to the designated Google Chat space URL.

## Prerequisites

Before running the script, ensure you have the following:
- Python installed on your system
- An active Google Chat space URL
- URLs for the document and meeting where applicable, to be included in the card content

## Usage

1. Clone this repository to your local machine or download the `main.py` file.
2. Open the `main.py` file in a text editor.
3. Replace placeholders with your actual Google Chat space URL, document URL, and meeting URL where indicated.
4. Save the changes.
5. Run the script by executing `python main.py` in your terminal or command prompt.

## Script Overview

- The `main()` function constructs a JSON payload representing a card with specified content, including a text paragraph and buttons.
- The constructed payload is sent as an HTTP POST request to the provided Google Chat space URL.
- Upon successful execution, the script prints the HTTP response.

## Customization

- Modify the text content within the `card_content` dictionary to suit your notification message requirements.
- Adjust the button text and URLs to tailor the card content to your specific use case.

## License

This project is licensed under the [Apache License 2.0](LICENSE).

0 comments on commit b7043e1

Please sign in to comment.