Google Chat

Google Chat, in two nodes. The action posts in a space — as you, through a webhook, or as the HostWebhook bot — and can also be an AI toolkit. The trigger fires a flow when someone mentions the bot, writes to it, types /run or clicks one of its buttons.

Setup: three ways to talk in Chat

You pick one when you create the credential. They differ in who speaks and what they need.

CredentialSpeaks asIt canNeeds
Google ChatYouPost in your spaces and in direct messages, mention people, reply in a thread, react; list your spaces and their members.A Google Workspace account (work or school).
Google Chat webhookA webhook, in one spacePost text or a card in that space, in a thread.A webhook URL from the space. No Google sign-in.
Google Chat botThe HostWebhook botPost, change its own messages, mention people and send private messages in the space it is linked to — and fire flows when it is mentioned.Add HostWebhook to the space and link it with a code.

Google Chat (as you)

Connect it under Settings → Credentials, or straight from the node, and press Allow and connect. Google asks for four permissions, and HostWebhook asks for nothing else: post messages and files as you, see your spaces, see who is in them, and add emoji reactions. It never reads the messages in your spaces. The account has to be a Google Workspace account: Google documents the Chat API for Workspace only, and a personal account is refused with Google Chat needs a Google Workspace account (work or school).

Google Chat webhook

In Chat open the space, then Apps & integrations → Add webhooks, name it and copy its URL. Paste it as a new Google Chat webhook credential. The URL is a secret — anyone who has it can post in that space — so HostWebhook keeps it encrypted, shows only the space, and refuses anything that isn't a Google Chat webhook address: That's not a Google Chat webhook URL. Copy it again from the space. Send a test message posts only when you press it. A webhook can't be revoked from outside: to stop it, delete it in the space.

Google Chat bot: link a space

  1. In HostWebhook choose New credential → Google Chat bot. It shows a code like K7QM-4XPA: works once, for 10 minutes.
  2. In Chat, add HostWebhook to the space (or open a direct message with it). It says hello and how to link.
  3. In the space, type /link, pick HostWebhook in the list, then paste the code (K7QM-4XPA). The bot answers Linked to Acme on HostWebhook. @mention me to run its flows. and the credential turns to Linked in the panel.
  • One space, one organization. A space already linked to another HostWebhook account says so and can't be linked again. Each event goes only to the triggers of the organization that linked its space; a space that isn't linked never fires anything.
  • Don't paste /link and the code as one text. Chat sends that as a plain message: the bot never receives it, and everyone in the space sees a code that still works for 10 minutes. Type /link, pick HostWebhook's command in the list, and paste only the code.
  • A wrong, used or expired code says That code doesn't work. Get a new one in HostWebhook → Credentials. Tries are limited, so a code can't be guessed. A code is used up the moment it is typed, even if the link doesn't happen: everyone in the space sees it, so it can't be used again.
  • /unlink (any person in the space can type it; an app can't) unlinks the space and pauses its triggers; the bot stays in the space. Removing the bot from the space does the same, right then. In both cases the credential stays, so linking the same space again reuses it and the flows that point to it. Deleting the credential unlinks the space and closes its triggers. The credential holds no secret, so its page has no Rotate or Replace: it shows the space, since when it is linked, and how to unlink it.
  • An unlinked space can't be posted to with its credential, even though the credential is still there: the node checks the link before every call and says spaces/AAAAbcd123 isn't linked anymore. Type /link, pick HostWebhook, paste a new code (add the bot first if it left).
  • /help tells what the bot does. /run starts a flow with the text after it.
ℹWhat the bot sees. Only the messages that @mention it, direct messages to it, its commands and clicks on its buttons — never the rest of the space. What it receives goes to the flow it fires and shows up in that flow's run history like any other trigger input; what Google sends is never used to train an AI.

What your Google admin must allow

If a person can't add the bot or a webhook, the admin of the Google Workspace has it off. In the Admin console, under Apps → Google Workspace → Google Chat → Chat apps, Allow users to install Chat apps must be on — when it is off, no app works — and Allow users to add and use incoming webhooks for webhooks. If the organization restricts the Marketplace to an allowlist, HostWebhook has to be on it. HostWebhook says Your Google admin must allow HostWebhook in Chat.


Google's limits

  • 1 message per second per space, shared with every other app in that space. Over it, Google answers 429 and HostWebhook waits and tries again up to 3 times: Google Chat allows 1 message per second per space. Trying again.
  • 32,000 bytes per message. A longer one is refused: Too long for one Chat message. Shorten it or split it.
  • Google also limits all HostWebhook customers together per minute, so a very busy flow can be slowed down.
  • A retry never posts twice: every message carries its own ID, so if the same send is repeated Google says it exists and that counts as done.
WhatCalls to Google it uses
Connecting “Google Chat” (as you)1
Linking a space to the bot0 — it is the answer to your /link
An event arriving at the bot (a mention, a message, /run, a button)0 — it carries the message, who sent it and the space
The bot's first reply (“On it…”)0 — it goes in the answer to the event
Sending or changing a message1 — and 1 more with an email (to find the direct message), and 1 more with a file (to upload it)
The bot's access token2 at most once an hour, kept in memory
Each dropdown in the panel (spaces, members)1 each time you open it or press Refresh — the answer is kept for 60 seconds
Sending through a webhook1
Saving a file sent to the bot (with “Download attachments”)1 per file, with the bot's token
Health check (once a day)1 per linked space

Operations

The panel and the AI toolkit only offer what the credential you picked can do.

Send

ValueIn the dropdownWhat it doesWith
sendMessageSend messagePosts a message in a space — as you, through a webhook, or as the bot (only in the space it is linked to).All three
updateMessageUpdate messageChanges a message the bot sent earlier — for example from “On it…” to the result. It cannot change anyone else's.The bot
addReactionAdd reactionAdds one emoji to a message.You

Spaces

ValueIn the dropdownWhat it doesWith
listSpacesList spacesThe spaces you are in, each with its name, title and type.You
getSpaceGet spaceOne space: its title, type and who created it. With the bot, only its own space.You, the bot
listMembersList membersThe people in a space, each with their name and user ID. Use the ID to @mention them.You
findDirectMessageFind direct messageThe direct message space you already have with a person, by their work email. It doesn't create one.You

Filling in the fields

  • Space is where the message goes — Ops alerts; pick it from the list or type a template. With the bot or a webhook there is no Space field: the credential is the space.
  • To a person is their work email — ana@acme.com — and only works if you've chatted before: You've never chatted with ana@acme.com. Start a chat with them first.
  • Message is text for the space; *bold*, _italic_ and links work — Order {{payload.id}} failed.
  • Card is optional. Buttons work only on the bot's cards: a click arrives at the trigger as Button clicked.
  • Mention lists the people to @mention — they get notified. Reply in thread is the thread to answer in — {{payload.message.thread}}.
  • Only visible to (bot only) makes the message private to one person — {{payload.user.id}}.
  • Message to update is a message the bot sent earlier — {{steps.ack.name}}; it only works on messages your organization's flows sent as the bot. Reaction is one emoji — 👍.
  • File (only with “Google Chat”) is one file from an earlier step — {{payload.file._file}}, like an upload or a Drive download — up to 16 MB. Its name needs an extension, like invoice.pdf. HostWebhook reads it from your organization's files, uploads it to the space and attaches it to the message.
ℹOnly “Google Chat” (as you) can send a file. Google lets only a person upload files, so the bot and a webhook can't: put a link in the message. The trigger doesn't save or list the files people send to the bot yet.

A sent message comes back with its name (use it in Message to update), thread and space. Lists come back as { spaces: [...], count } (or members) and the next node runs once per item.

⚠Writes run for real, Run Test too. A message reaches everyone in the space, and an @mention notifies the person. The bot never posts outside the space it is linked to, and only changes its own messages.

AI toolkit mode

Once the credential is picked, the node asks for a Mode. AI toolkit turns it into up to 7 tools that an AI Node — or an MCP client, through one of your MCP servers — calls by name. Only the tools the credential can use are offered: a webhook gives one, the bot three, and “Google Chat” six.

ToolArguments
send_google_chat_messagespace? · to_email? · text? · card? · mentions? · thread? · only_visible_to?
update_google_chat_messagemessage_name · text? · card?
add_google_chat_reactionmessage_name · emoji
list_google_chat_spacesspace_type? · limit?
get_google_chat_spacespace
list_google_chat_membersspace · limit?
find_google_chat_direct_messageemail

What you control

  • The bot's and a webhook's space is fixed by the credential. Their tools have no space argument, so the AI can't post anywhere else.
  • Who the AI can write to. With “Google Chat” (as you) the AI picks the space, and the setting says where it may post: only who sent the message that started the flow and the space it came from (the default), a list of spaces and people you write, or anyone. With the bot or a webhook the space is always the credential's, so the setting only decides whom the AI may @mention; an empty list means no @mentions, and it still posts in its own space. @mentioning everyone (<users/all>) only works with anyone, and a private message follows the same setting: by default, only the person who started the run sees it. A thread or a message from another space is refused too.
  • Blocked tools. None starts blocked, because nothing here deletes. update_google_chat_message overwrites a message the bot sent: block it if the agent shouldn't.
  • The messages people write to the bot are data written by anyone in the space. HostWebhook tells the model to treat them as data, not as instructions.
  • Characters per call sent to the model. 20,000 by default, anything from 1,000 to 200,000.

Testing a tool

⚠Only a tool call picks the tool. In AI toolkit mode, only an AI Node, an MCP client or a voice agent chooses which tool the node runs. Run Test, a flow or a webhook run the operation saved on the node: an operation in their payload that names another tool is refused.
✦To try a tool, call it from an AI Node or from an MCP client. Its arguments look like this:
jsonA tool call
{ "operation": "send_google_chat_message", "text": "Done: 3 orders processed." }
⚠A node in toolkit mode is not part of the pipeline. Events arriving through connections made before you switched are refused — the node only runs the tool it is asked for.

The trigger

Pick Google Chat as the service on a Trigger node and a Google Chat bot credential — a space you have linked. There is nothing to configure in Google: the bot is already there, and the trigger only fires for the space of its credential.

What fires it

  • Space is the linked space to listen to — Ops alerts.
  • Event Trigger: Mention or DM (the default) — someone @mentions the bot in the space, or writes to it in a direct message; Command /run — someone types /run report sales; Button clicked — someone clicks a button on a card the bot sent.
  • Starts with is optional: the first word after the mention or /run — report — so several flows can share one space.
  • First reply is what the bot says right away while the flow runs — On it…
  • Download attachments is off by default. Turn it on to save the files people send with the message for 24 hours.
  • What it sees. The bot only sees messages that @mention it, DMs, its commands and its buttons.

The bot answers Google in 30 seconds with the first reply and starts the flows after that. If Google sends the same event again, HostWebhook recognises it and the flow runs once. The bot doesn't receive its own messages. If the space has no active trigger, it says No flow is listening here yet. Add a Google Chat trigger in HostWebhook. If there are triggers but none matches the message (another event, or a different Starts with), it stays silent.

Download attachments

Off by default, so a file sent to the bot is never saved. Turn it on and the files people upload with the message are saved in your organization's storage, scanned like any other file, and deleted after 24 hours — move them (to Drive, to an email) in the same flow if you need to keep them. The first one is {{payload.message.attachments[0]._file}} — hand it to a node that takes a file; its link is ._file.downloadUrl.

  • Up to 16 MB per file, 5 files per message and 100 files a day for the whole organization (the day ends at midnight UTC). Your plan's file size and storage limits apply too; the files use your storage while they are kept.
  • Files shared from Google Drive aren't saved. Google doesn't let the bot read them: they come as a link, and the flow gets drive_file.
  • The flow always runs. The files are saved first, a few seconds after the first reply; if one can't be, the rest still are, and message.attachmentErrors says which and why. It is always there when the box is on — an empty list, [], when every file was saved or the message had none — so a later step can count on it.
  • The file type (_file.mimeType) is the one Google reports when it is specific; when Google only says application/octet-stream, it is the one the message declared (a PNG stays image/png).
reasonWhat happened
too_largeThe file is over 16 MB (or over your plan's file size).
too_many_filesThe message had more than 5 files: the first 5 are saved.
daily_limitThe organization already used its 100 files for today (every try counts).
storage_fullThere is no storage left in your plan.
drive_fileIt was shared from Google Drive, which the bot can't read.
no_accessGoogle didn't let the bot read the file.
not_foundThe file is no longer there.
bad_referenceGoogle sent a file reference that can't be used.
failedAnything else; try again.

What the trigger sends downstream

The event as Google sends it, tidied: the space, who wrote, and the message. argumentText is the message without the mention — what you will usually use. Everything in message and user was written by someone in the space: treat it as data.

{
  "event": "mention",
  "eventId": "MESSAGE:spaces/AAAAbc123/messages/BBBB.CCCC",
  "space": { "name": "spaces/AAAAbc123", "displayName": "Ops alerts", "type": "ROOM" },
  "user": { "id": "users/111222333", "displayName": "Ana Ruiz", "type": "HUMAN" },
  "message": {
    "name": "spaces/AAAAbc123/messages/BBBB.CCCC",
    "text": "@HostWebhook report sales",
    "argumentText": "report sales",
    "thread": "spaces/AAAAbc123/threads/TTTT",
    "createTime": "2026-10-30T20:00:00Z",
    "attachments": []
  }
}

With Download attachments on, each file the bot could save gets a _file (like the files of a Gmail trigger), and the ones it couldn't are listed in attachmentErrors — only the file name and a fixed reason (with the box on it is always there, [] when all went well):

"message": {
  ...
  "attachments": [
    {
      "name": "spaces/AAAAbc123/messages/BBBB.CCCC/attachments/k7QMq4XPA",
      "contentName": "sales.pdf",
      "contentType": "application/pdf",
      "source": "UPLOADED_CONTENT",
      "_file": { "id": "…", "originalName": "sales.pdf", "mimeType": "application/pdf", "size": 48213, "downloadUrl": "https://…" }
    }
  ],
  "attachmentErrors": [ { "filename": "demo.mp4", "reason": "too_large" } ]
}

Command /run adds "command": { "text": "report sales" }; Button clicked adds "button": { "action": "approve", "parameters": { ... } }. The sender's email is there only when Google sends it.

Trying it out

The trigger's Test push shows examples with the exact shape of each event, so you can write {{payload.message.argumentText}} in the nodes below it from the start. To see a real one, mention the bot in the space: it shows up in the run history of the flow it fires.

Health check

Once a day HostWebhook checks that the bot is still in the space (one call per linked space). If it was removed, the trigger pauses and your organization gets a warning that names the trigger and the reason. The same happens when someone types /unlink or removes the bot: add HostWebhook to the space again if it left, type /link, pick HostWebhook and paste a new code, and activate the trigger.


Gotchas

  • The bot doesn't read the space. It can't fire on any message, only on a mention, a direct message, /run or a button. That is how it avoids the permission to read all your messages.
  • Files are saved only with “Download attachments”. Without it message.attachments comes empty, there is no attachmentErrors, and nothing is stored.
  • The buttons are the bot's. A card sent as you or through a webhook shows its buttons, but a click only reaches HostWebhook if the bot sent the card. A click on a card that belonged to another organization that had the space before is ignored.
  • Loops. A flow that @mentions the bot as you doesn't fire itself: what a flow posts as you is marked for two minutes.
  • The access is removed. If you remove HostWebhook from your Google account, the node says “Reconnect Google Chat: access was removed.”
  • Google decides who can see the bot. Until HostWebhook is published in the Google Workspace Marketplace, only the accounts it has been shared with can add it.