{"id":19107173,"url":"https://github.com/govtechsg/chatbot-notifier","last_synced_at":"2025-04-30T18:21:55.931Z","repository":{"id":57556427,"uuid":"228314595","full_name":"GovTechSG/chatbot-notifier","owner":"GovTechSG","description":"This application allow sending of messages to chat group with token ecryption capabilities","archived":false,"fork":false,"pushed_at":"2019-12-24T03:49:45.000Z","size":21,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-19T08:10:26.495Z","etag":null,"topics":["chatbots","notification-service","telegram"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GovTechSG.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-16T06:06:49.000Z","updated_at":"2023-09-05T04:49:40.000Z","dependencies_parsed_at":"2022-09-14T12:22:04.392Z","dependency_job_id":null,"html_url":"https://github.com/GovTechSG/chatbot-notifier","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GovTechSG%2Fchatbot-notifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GovTechSG%2Fchatbot-notifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GovTechSG%2Fchatbot-notifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GovTechSG%2Fchatbot-notifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GovTechSG","download_url":"https://codeload.github.com/GovTechSG/chatbot-notifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251758301,"owners_count":21639008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatbots","notification-service","telegram"],"created_at":"2024-11-09T04:11:32.037Z","updated_at":"2025-04-30T18:21:55.904Z","avatar_url":"https://github.com/GovTechSG.png","language":"Go","readme":"# chatbot-notifier\n\nchatbot-notifier is a tool for sending message with telegram bot while securing chat id and token using AWS KMS.\u003cbr/\u003e\nchatbot-notifier aims to make sending notification to telegram chat group in an easy yet secure way.\n\n## How it works\n\nchatbot-notifier uses aws-sdk-go to implement the encryption and decryption operation. Thus you will require an amazon web services access key id and secret access key. Similar to using terraform or terragrunt, AWS_PROFILE have to be pass in the command line. Example will be \"AWS_PROFILE=\u003cPROFILE NAME\u003e notifier send -f credential.yml -m textfile.txt\". This profile read from ~/.aws/credentials. If the access key id and secret access key are set as default profile in ~/.aws/credentials, then AWS_PROFILE will not need to be pass. Example \"notifier send -f credential.yml -m textfile.txt\".\n\nExample of ~/.aws/credential\n\n```aws\n[default]\nrole_arn = arn:aws:iam::123456789012:role/testing\nsource_profile = default\nrole_session_name = OPTIONAL_SESSION_NAME\n\n[profile_project1]\nrole_arn = arn:aws:iam::123456789012:role/testing\nsource_profile = default\nrole_session_name = OPTIONAL_SESSION_NAME\n```\n\nFor more information, see \u003chttps://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials_profiles.html\u003e \n\nnotifier will then get key from AWS KMS to encrypt credential.yml. ENCRYPTED credential.yml WILL NOT BE ABLE TO DECRYPT THROUGH notifier. THIS IS TO ENSURE THAT TOKEN AND CHAT ID ARE SAFE IN THE SERVER. \u003cbr/\u003e\n\nnotifier will then be able to send message using credential.yml. \u003cbr/\u003e\n\n## Usage Example\n\n### Encrypt credential.yml\n\n```bash\nnotifier encrypt -f credential.yml\n\nor\n\nAWS_PROFILE=profile_project1 notifier encrypt -f credential.yml\n```\n\n### Message can only be send after encryption\n\nSending message file content to chat group\n\n```bash\nnotifier send -f credential.yml -m message.txt\n\nor\n\nAWS_PROFILE=profile_project1 notifier send -f credential.yml -m message.txt\n\n```\n\nSending text message to chat group\n\n```bash\nnotifier text -f credential.yml -m \"Hello World\"\n\nor\n\nAWS_PROFILE=profile_project1 notifier text -f credential.yml -m \"Hello World\"\n\n```\n\n## credential.yml format (SAMPLE NOT REAL INFOR) (File can be other name)\n\nFor more information on how to get token, see \u003chttps://core.telegram.org/bots#6-botfather\u003e\nTo get your chat id, update the URL with your bot token \u003chttps://api.telegram.org/bot\u003c token \u003e/getUpdates\u003e\n\n```yaml\naws:\n- arn: arn:aws:kms:ap-southeast-1:XXXXXXXXXX:key/XXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX\ntelegram:\n- token: 2312312312:DASDASGSDFDSFADSA\n  chatid: -32213123123\n```\n\n## message.txt (File can be other name)\n\nAny free text file.\n\n### Self-compile\n\n```bash\ngit clone https://github.com/GovTechSG/chatbot-notifier.git\n\n# MacOS\nenv GOOS=darwin GOARCH=amd64 go build -o notifier cmd/notifier/main.go\n\n# Linux\nenv GOOS=linux GOARCH=amd64 go build -o notifier cmd/notifier/main.go\n\n# Window\nenv GOOS=windows GOARCH=amd64 go build -o notifier cmd/notifier/main.go\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgovtechsg%2Fchatbot-notifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgovtechsg%2Fchatbot-notifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgovtechsg%2Fchatbot-notifier/lists"}