{"id":17487551,"url":"https://github.com/tchiotludo/hangouts-chat-webhook","last_synced_at":"2026-02-22T12:50:23.837Z","repository":{"id":48029304,"uuid":"153908814","full_name":"tchiotludo/hangouts-chat-webhook","owner":"tchiotludo","description":"Fluent api to send webhook to Hangouts chat","archived":false,"fork":false,"pushed_at":"2022-12-08T03:18:12.000Z","size":91,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-19T06:09:53.215Z","etag":null,"topics":["google-chat","hangout-chat","webhook"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/tchiotludo.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":"2018-10-20T13:33:20.000Z","updated_at":"2021-01-28T13:58:11.000Z","dependencies_parsed_at":"2023-01-25T04:00:59.644Z","dependency_job_id":null,"html_url":"https://github.com/tchiotludo/hangouts-chat-webhook","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchiotludo%2Fhangouts-chat-webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchiotludo%2Fhangouts-chat-webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchiotludo%2Fhangouts-chat-webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchiotludo%2Fhangouts-chat-webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tchiotludo","download_url":"https://codeload.github.com/tchiotludo/hangouts-chat-webhook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230542290,"owners_count":18242332,"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":["google-chat","hangout-chat","webhook"],"created_at":"2024-10-19T03:05:02.697Z","updated_at":"2026-02-22T12:50:18.800Z","avatar_url":"https://github.com/tchiotludo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hangouts-chat-webhook\n\u003e Fluent api to send webhook to Hangouts chat\n\n[![license](https://img.shields.io/github/license/tchiotludo/hangouts-chat-webhook.svg?maxAge=2592000\u0026style=flat-square)](https://github.com/tchiotludo/hangouts-chat-webhook/blob/master/LICENSE)\n[![npm](https://img.shields.io/npm/v/hangouts-chat-webhook.svg?maxAge=2592000?style=flat-square)](https://www.npmjs.com/package/hangouts-chat-webhook)\n[![Dependency Status](https://david-dm.org/tchiotludo/hangouts-chat-webhook.svg?style=flat-square)](https://david-dm.org/tchiotludo/hangouts-chat-webhook)\n[![devDependency Status](https://david-dm.org/tchiotludo/hangouts-chat-webhook/dev-status.svg?style=flat-square)](https://david-dm.org/tchiotludo/hangouts-chat-webhook#info=devDependencies)\n\n\n## Installation\n\n```sh\n$ npm install --save hangouts-chat-webhook\n```\n\n## Usage\n\nWe don't include any http client in order to let you choose your preferred one.\nBelow is a simple example with [superagent](https://github.com/visionmedia/superagent).\n\n```js\nimport * as superagent from \"superagent\";\nimport { Button, Card, CardHeader, Icon, Image, KeyValue, Message, OnClick, OpenLink, Section, TextButton, TextParagraph, WidgetMarkup } from \"hangouts-chat-webhook\";\n\nconst message: Message = new Message()\n    .addCard(new Card()\n        .setHeader(new CardHeader()\n            .setTitle(\"Google Chat\")\n            .setSubtitle(\"Incoming Webhook\")\n        )\n        .addSection(new Section()\n            .addWidget(new WidgetMarkup()\n                .setImage(new Image()\n                    .setImageUrl(\"https://www.gstatic.com/images/branding/product/2x/chat_64dp.png\")\n                )\n            )\n            .addWidget(new WidgetMarkup()\n                .setKeyValue(new KeyValue()\n                    .setIcon(Icon.DESCRIPTION)\n                    .setTopLabel(\"Key\")\n                    .setContent(\"Value\")\n                )\n            )\n            .addWidget(new WidgetMarkup()\n                .setTextParagraph(new TextParagraph()\n                    .setText(\"Incoming webhook\")\n                )\n            )\n            .addWidget(new WidgetMarkup()\n                .addButton(new Button()\n                    .setTextButton(new TextButton()\n                        .setText(\"Open\")\n                        .setOnClick(new OnClick()\n                            .setOpenLink(new OpenLink()\n                                .setUrl(\"https://gsuite.google.com/products/chat/\")\n                            )\n                        )\n                    )\n                )\n            )\n        )\n    );\n\nsuperagent.post(\"https://chat.googleapis.com/v1/spaces/...\")\n    .set(\"Content-Type\", \"application/json; charset=UTF-8\")\n    .send(message)\n    .then((res: superagent.Response) =\u003e {\n        console.log(res.status, res.body);\n    })\n    .catch((err: any) =\u003e {\n        console.error(err.response \u0026\u0026 err.response.text ? JSON.parse(err.response.text) : err);\n    })\n;\n\n```\n\n## Warning \nThe Api list is coming directly from [Google Api](http://googleapis.github.io/google-api-nodejs-client/modules/_apis_chat_v1_.html), BUT a lot of method are present (ex: `keyValue.setBottomLabel`) but **don't work** with hangouts chat, resulting a response code 200 and a blank message. No way for developper to understand the reason. \n\nAlso, the [Hangouts Chat message formats documentation](https://developers.google.com/hangouts/chat/reference/message-formats/) is not complete and don't allow to clearly understand how to build message correctly.\n\nYou have to test directly on hangout chat in order to be sure that the message will work.\n\n## License\nMIT © [tchiotludo](https://github.com/tchiotludo)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftchiotludo%2Fhangouts-chat-webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftchiotludo%2Fhangouts-chat-webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftchiotludo%2Fhangouts-chat-webhook/lists"}