Google Chat

Send messages in Google Chat spaces and conversations.

CommunicationOAuth6 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (6)
  4. addASpaceMember
  5. findMember
  6. getDirectMessageDetails
  7. getMessageDetails
  8. searchMessages
  9. sendAMessage
  10. Details

Connect

Auth type: OAuth (oauth2). The connection holds the provider's OAuth tokens. They are sealed on the server and only opened when an action runs.

Scopes requested: https://www.googleapis.com/auth/chat.messages

  • From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
  • Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
  • Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.

Call it from a workflow

step.ctx.integrations.invoke("googlechat", action, input) resolves with the provider's answer and rejects when Google Chat isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. sendAMessage runs in the platform itself; the other actions run through the integration runner, which the server's operator turns on.

Workflow
// workflows/notify.ts: call Google Chat when a booking is confirmed
import { on } from "@appbricx/workflows";

export const tellGooglechat = on.transition("booking", "status", "confirmed", async (_event, step) => {
  // Recorded once: a retry doesn't send it twice. Rejects when Google Chat isn't connected.
  const output = await step.run("Google Chat", () =>
    step.ctx.integrations.invoke("googlechat", "addASpaceMember", {
      "spaceId": "<spaceId>",
      "personId": "<personId>"
    }),
  );
  step.ctx.log("Google Chat answered", output);
});
Try it from your agent
{
  "name": "integrations",
  "arguments": {
    "project_id": "<project-id>",
    "action": "call",
    "piece": "googlechat",
    "piece_action": "addASpaceMember",
    "input": {
      "spaceId": "<spaceId>",
      "personId": "<personId>"
    },
    "env": "dev"
  }
}
From another backend (connector proxy)
curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/googlechat/addASpaceMember" \
  -H "Authorization: Bearer $APP_KEY" \
  -H "content-type: application/json" \
  -d '{"props":{"spaceId":"<spaceId>","personId":"<personId>"}}'

Actions

addASpaceMember

Add a Space Member. Add a user to a Google Chat space.

InputTypeDescription
spaceIdrequiredid (picked from your account)Select a Space
personIdrequiredid (picked from your account)Select a person

findMember

Find Member. Search space member by email

InputTypeDescription
spaceIdrequiredid (picked from your account)Select a Space
emailrequiredtextThe email address of the member to find

getDirectMessageDetails

Get Direct Message Details. Retrieve details of a specific direct message by ID.

InputTypeDescription
directMessageIdrequiredid (picked from your account)Select a Direct Message

getMessageDetails

Get Message Details. Retrieve details of a specific message by ID. Supports both system-generated and custom message IDs.

InputTypeDescription
namerequiredtextThe full resource name of the message. Format: spaces/{space}/messages/{message}

searchMessages

Search Messages. Search within Chat for messages matching keywords or filters.

InputTypeDescription
spaceIdrequiredid (picked from your account)Select a Space
keywordrequiredtextSearch for messages containing this text
limitoptionalnumberMaximum number of messages to return

sendAMessagebuilt in

Send a Message. Send a message to a space or direct conversation.

InputTypeDescription
spaceIdrequiredid (picked from your account)Select a Space
textrequiredlong textThe message content to send. Supports basic formatting like *bold*, _italic_, and @mentions.
threadoptionalid (picked from your account)Select a thread to reply to, leave empty for new thread
messageReplyOptionoptionalone of "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD" | "REPLY_MESSAGE_OR_FAIL"How to handle replies when thread ID is provided.
customMessageIdoptionaltextOptional unique ID for this message (auto-generated if empty). Useful for deduplication.
isPrivateoptionalbooleanSend this message privately to a specific user. Requires app authentication.
privateMessageVieweroptionalid (picked from your account)Select the user who can view this private message.

Details

Id
googlechat
Category
Communication
Tags
chat, google, workspace, team
Package
@activepieces/piece-googlechat@0.1.3
Runs
sendAMessage in the platform; the rest through the integration runner