mirror of
https://github.com/vercel/chat.git
synced 2026-09-14 18:32:29 +08:00
6ef8816a55
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@chat-adapter/gchat
Google Chat adapter for Chat SDK. Supports service account authentication with optional Pub/Sub for receiving all messages.
Installation
npm install chat @chat-adapter/gchat
Usage
import { Chat } from "chat";
import { createGoogleChatAdapter } from "@chat-adapter/gchat";
const bot = new Chat({
userName: "mybot",
adapters: {
gchat: createGoogleChatAdapter({
credentials: JSON.parse(process.env.GOOGLE_CHAT_CREDENTIALS!),
}),
},
});
bot.onNewMention(async (thread, message) => {
await thread.post("Hello from Google Chat!");
});
Documentation
Full setup instructions, configuration reference, and features at chat-sdk.dev/docs/adapters/gchat.
License
MIT