Connect Google Chat
Turn on Chat first. An owner or admin connects the workspace.
You need your Google Workspace customer ID, and your devboxes email must belong to that Workspace. In the Google Admin console, go to Account > Account settings > Profile and copy the value next to Customer ID, for example C01ab2cd3.
-
Start the connection:
google-chat.json { "organizationId": "<organization id>", "customerId": "<customer id>" }devboxes invoke chat.connect-google-chat --input @google-chat.json -
Within 15 minutes, sign in to Google Chat with the same email and add the devboxes app to a space.
-
Run
chat.integrations. If it shows no entry withplatformset togoogle_chatandinstalledset totrue, the customer ID or the email did not match, or the 15 minutes passed. Runchat.connect-google-chatagain with the correct values, remove the devboxes app from the space, and add it again. -
Find the space's ID with
chat.channels, then assign the space to Projects. -
Let devboxes read your spaces, so it follows replies in a thread and reads a thread's earlier messages.
-
Mention
@devboxesin the space. Anyone can type/helpin Google Chat to see what devboxes does and how to start.
When someone adds devboxes to a space or a direct message, devboxes posts one welcome there. In a Workspace that no Organization has connected, the welcome and every answer to a mention give the link to these steps.
Let devboxes read your spaces
Until devboxes can read a space, it answers a mention from the mentioned message alone: it doesn't read the thread's earlier messages or follow its replies. In a direct message, devboxes reads no earlier messages, because Google doesn't allow that access there.
devboxes reads your spaces as a Workspace member that you choose, through Google's domain-wide delegation. It follows the spaces that it was added to and that the member is in, so choose a member of those spaces, for example a dedicated devboxes@ account. devboxes still posts its answers as the devboxes app.
-
A Google Workspace super administrator opens the Google Admin console and goes to Security > Access and data control > API controls > Manage Domain Wide Delegation.
-
Click Add new. Enter the client ID
116909016002372119076and the OAuth scopehttps://www.googleapis.com/auth/chat.messages.readonly, then click Authorize. -
An owner or admin names the member. Find the
integrationIdwithchat.integrations:delegation.json { "organizationId": "<organization id>", "integrationId": "<integration id>", "delegatedUser": "[email protected]" }devboxes invoke chat.configure-google-chat-delegation --input @delegation.jsonYou can also enter the member on the Google Chat page under Integrations in the dashboard. devboxes asks Google which spaces the member is in, and answers with each space and whether it follows it. It refuses the member with
GOOGLE_CHAT_DELEGATION_REFUSEDuntil the delegation is granted, and withGOOGLE_CHAT_MEMBER_NOT_IN_SPACEwhen the member is in none of its spaces. Send"delegatedUser": nullto stop reading as the member.
When someone adds devboxes to a space that the member isn't in, the welcome says so. Add the member to the space, then name the member again to follow it.