Communication
Google Chat in your product and your AI agents, through one API
The Google Chat toolkit covers spaces, direct messages, messages, reactions and members, all acting as the user who connected. Your customer authorizes Google once with OAuth, and your product or AI agent calls each operation through Connect, which stores and renews the credentials and logs every execution.
15 days to try it. No credit card.
POST https://connect.reportei.com/api/tools/google_chat_create_space/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json
{
"customer_toolkit": "<connection UUID>",
"arguments": {
"space": {}
}
}How it works
From a connected customer to the first Google Chat call.
- 1
Your customer connects the account
Your system opens a Connect session for the toolkit and your customer connects their Google Chat account. You get the connection id.
- 2
Your product calls the tool
A POST to /api/tools/{tool}/execute with the connection id and arguments. On success, Connect preserves the app's response status and body.
- 3
Connect handles the rest
It stores the credential encrypted, renews tokens for OAuth connections that support renewal and records executions in an audit trail available through the API.
Use cases
What your product does with Google Chat.
Notify teams in their chat
Send a message from your product to a space or a direct message, or reply inside an existing thread when an alert gets an update.
Spin up a space per project
Create a space, invite the right people and add members later when a new person joins the account or project.
A chat-aware agent
Let an AI agent search messages across the user's spaces, read a conversation and reply or react on the user's behalf.
Tools
11 Google Chat tools
- List spacesGETLists the spaces, group chats and direct messages the user is a member of, with name, displayName and spaceType. The part of the name after spaces/ is the spaceId of the other tools, and group chats and direct messages only show up after their first message.
- Get direct messageGETReturns the direct message space between the user and another person; the part of its name after spaces/ is the spaceId for Send message. Responds 404 when the two have no direct message yet, which Create space starts.
- Create spacePOSTCreates a space with the user in it and invites other people. SPACE needs displayName and takes up to 49 people; GROUP_CHAT takes at least two people and no name; DIRECT_MESSAGE takes exactly one person and returns the existing direct message when there is one.
- List messagesGETLists the messages of a space, oldest first by default, with name, sender, createTime, text and thread. Senders come as users/ followed by an id, without the display name; send nextPageToken as pageToken for the next page.
- Search messagesPOSTSearches messages by keywords in every space and direct message of the user, latest first. Each result has the message, whose name carries the space and message ids; messages from Chat apps, private messages and muted spaces are left out.
- Send messagePOSTSends a text message from the user to a space or direct message. To reply in a thread, send thread with the thread name from List messages and messageReplyOption; without messageReplyOption the message starts a new thread.
- Update messagePATCHChanges the text of a message, with updateMask set to text.
- Delete messageDELETEDeletes a message. A message with replies in a thread is only deleted with force set to true, which deletes the replies too.
- Create reactionPOSTAdds an emoji reaction from the user to a message.
- List membersGETLists the members of a space with role and state. Members come as users/ followed by an id, without the display name; send nextPageToken as pageToken for the next page.
OAuth with your product's app
You register your product's OAuth app once, with POST /api/merchants/credentials/google_chat, and your customer authorizes the account on a consent screen. Connect renews the token when it is about to expire.
Questions about the Google Chat toolkit
Do I need to build against the Google Chat API?
No. Connect ships 11 Google Chat tools, described and ready. Your customer connects the account and your system calls every tool through the same endpoint, with the same request format.
How does my customer connect their Google Chat account?
With the mode the toolkit accepts: OAuth with your product's app. Connect stores the credential encrypted and never returns it to your system.
Does it work with AI agents?
Yes. Each tool's input is described in JSON Schema, which your agent uses directly as a tool definition. The agent picks the tool and the arguments, and your system makes the call to Connect.
Does my customer need a Reportei account?
No. Your customer connects the account on a Connect screen, or your system sends the credential through the API, and they keep using only your product.
See Connect applied to your product.
Try it for 15 days with no card, or walk our team through your use case.
