{"id":15306715,"url":"https://github.com/t0mer/green-api-custom-notifier","last_synced_at":"2025-06-16T19:34:05.200Z","repository":{"id":230911062,"uuid":"780379795","full_name":"t0mer/green-api-custom-notifier","owner":"t0mer","description":"Send whatsapp notification using green API","archived":false,"fork":false,"pushed_at":"2024-08-13T12:50:58.000Z","size":983,"stargazers_count":60,"open_issues_count":8,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-08T21:51:16.449Z","etag":null,"topics":["greenapi","home-assistant","home-automation","python3","whatsapp","whatsapp-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/t0mer.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-01T10:59:55.000Z","updated_at":"2025-04-07T12:23:43.000Z","dependencies_parsed_at":"2024-04-23T16:47:38.403Z","dependency_job_id":"3ae6f902-0d5f-4339-bd00-f773ce781f58","html_url":"https://github.com/t0mer/green-api-custom-notifier","commit_stats":null,"previous_names":["t0mer/green-api-custom-notifier"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/t0mer/green-api-custom-notifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t0mer%2Fgreen-api-custom-notifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t0mer%2Fgreen-api-custom-notifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t0mer%2Fgreen-api-custom-notifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t0mer%2Fgreen-api-custom-notifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t0mer","download_url":"https://codeload.github.com/t0mer/green-api-custom-notifier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t0mer%2Fgreen-api-custom-notifier/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260224286,"owners_count":22977373,"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":["greenapi","home-assistant","home-automation","python3","whatsapp","whatsapp-bot"],"created_at":"2024-10-01T08:07:01.862Z","updated_at":"2025-06-16T19:34:05.168Z","avatar_url":"https://github.com/t0mer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# green-api-custom-notifier\n\n[green-api](https://green-api.com/en) is a service that allows us to send and receive text, photo and video using stable WhatsApp API gateway. The service includes free account that can be used to send notifications to 3 chats (Group or Private) and many more.\n\n\n[green-api-custom-notifier](https://github.com/t0mer/green-api-custom-notifier) is a [Homeassistant ](https://www.home-assistant.io/) custom notification component that enables us to send notification to Whatsapp groups using [green-api](https://green-api.com/en).\n\n\n## Limitations\n* The free account is limited to 3 chats (Group or Private).\n\n\n## Getting started\n\n### Setup Green API account\nNevigate to [https://green-api.com/en](https://green-api.com/en) and register for a new account:\n![Register](screenshots/register.png)\n\nFill up your details and click on **Register**:\n![Create Account](screenshots/create_acoount.png)\n\n\nNext, click on the \"Create an instance\":\n![Create Instance](screenshots/create_instance.png)\n\n\nSelect the \"Developer\" instance (Free):\n![Developer Instance](screenshots/developer_instance.png)\n\n\nCopy the InstanceId and Token, we need it for the integration settings:\n![Instance Details](screenshots/instance_details.png)\n\nNext, Lets connect our whatsapp with green-api. On the left side, Under API --\u003e Account, click on QR and copy the QR URL to the browser and click on \"Scan QR code\"\n\n![Send QR](screenshots/send_qr.png)\n\n![Scan QR](screenshots/scan_qr.png)\n\nNext, Scan the QR code to link you whatsapp with Green API:\n\n![QR Code](screenshots/qr.png)\n\nAfter the account link, you will notice that the instance is active by the green light in the instance header:\n![Active Instance](screenshots/active_instance.png)\n\n\n\n### Getting the Contacts and Groups\nBefore we can start messaging, we need to get the Contact/Group details. we can do it using Green API endpoint.\nOn the lef side, Under API --\u003e Service methods, click on \"getContacts\" and then click \"Send\":\n![Get Contacts](screenshots/get_contacts.png)\n\nAs a result, you will get the list of Contacts and Groups.\n* The contact number ends with **@c.us**\n* The group number ends with **@g.us**\n\n![Contacts Lists](screenshots/contacts_list.png)\n\nWrite down the Id, you will need it to configure the notification.\n\n\n### Setting up the notification in Home Assistant\n\nDownload the [green-api-custom-notifier](https://github.com/t0mer/green-api-custom-notifier), place it under the **custom_components** folder.\nRestart Home Assistant and add the following section to your *configuration.yaml* file:\n\n\n```yaml\nnotify:\n  - platform: greenapi\n    name: greenapi\n    instance_id:  #REQUIRED: Set the instanceid\n    token:  #REQUIRED: Set the greenapi token.\n    target:  #OPTIONAL! Set the detault target. If you set the default target here, you won't have to specify it again in your service calls.\n```\n\n* instance_id is the Green API instance id.\n* token is the Green API instance token.\n* target is the chat/contact/group id to send the message to:\n  * For groups, the id should end with *@g.us*\n  * For chats, the id should end with *@c.us*\n\n\n## Sending a message\nTo Send a message you call the service and provide the following parameters:\n* message (**Required**): Test to send.\n* title (**OPTIONAL**): Add a title for the message in **bold**.\n* target (**OPTIONAL** if you've already defined the default target in your notify service, otherwise required): The chat/group id to send the message to.\n\n![Send text message](screenshots/text_message.png)\n\nOr from Yaml mode:\n```yaml\nservice: notify.greenapi\ndata:\n  message: New Whatsapp component\n  target: 972*********@c.us\n```\n\n### Optional - Attach media to message\nTo send message with media, add the following to the data parameter:\n* file : [Path to the file]\n\n![Send media](screenshots/send_media.png)\n\nOr from Yaml mode:\n```yaml\nservice: notify.greenapi\ndata:\n  message: New Whatsapp component\n  target: 972*********@c.us\n  data:\n    file: /config/images/Capture.png\n\n```\n\n#### Important\nIf the path to the file does not exist, the message will still be sent; but will log a warning.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft0mer%2Fgreen-api-custom-notifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft0mer%2Fgreen-api-custom-notifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft0mer%2Fgreen-api-custom-notifier/lists"}