Bridging Google Chat and Matrix with mautrix-googlechat

mautrix-googlechat lets Matrix users reach Google Chat contacts during a move off Google Workspace or in mixed teams. This page covers what the bridge needs and where bridging stops being a migration plan.

On this page

How mautrix-googlechat bridges Google Chat into Matrix

Teams moving off Google Workspace often keep some people on Google Chat for months, and mixed teams need Matrix users and Google Chat users in the same conversations. mautrix-googlechat is one of the mautrix Go bridges, set up with the shared Go bridge procedure, and it relays Google Chat conversations into Matrix rooms. Matrix.org lists one bridge for Google Chat, so the choice is narrow, and the bridge is a coexistence tool, not a data migration. Chat history, Google accounts and Google-side spaces do not move into Matrix because a bridge runs. This section covers what the bridge needs, the configuration sequence, how identities and rooms map, the security questions it raises, and where bridging stops being a plan.

Start with the shared procedure. Work through the mautrix bridge setup documentation for Go bridges before touching the Google side, because it defines the appservice registration file, the homeserver settings the bridge depends on and the database the bridge writes to. Your Synapse or other homeserver must accept the appservice, and the bridge's own configuration must point at the right homeserver URL and bot account. Confirm the current Google login method, the message types the project relays and the features it does not support against the project's own documentation, not against this page. Then confirm with your Workspace administrator which Google accounts and spaces may be bridged, because the bridge acts as a user of those accounts and their permissions set what it can see.

Plan the mapping and the stop conditions before go-live. Each bridged Google Chat conversation becomes a Matrix room that is visible to everyone who joins it, so decide which Google spaces and direct messages are in scope and who owns each room. Identity mapping ties Matrix users to the Google accounts that send messages, and you should test how display names and edits appear on each side. Write down the exit criteria: the date after which new work moves to Matrix, the people who must stop using Google Chat, and the point at which the bridge is switched off. Treat bridging as a transition aid with a defined end, because a bridge that runs indefinitely keeps data in two systems, and your compliance team will need to review both.

What the bridge needs before installation

The bridge depends on five things lining up: a working homeserver, a database, a host with network reach in both directions, a Google account allowed to use chat, and a Matrix admin who can register an appservice. Confirm each one before the shared Go bridge procedure starts, because a gap in any card blocks installation.

A working Matrix homeserver

The bridge attaches to a homeserver you already run, so start by confirming the implementation is one the bridge supports. Synapse is the most documented option, and the bridge documentation should be checked for any other homeserver. Version floors come from the homeserver's own upgrade notes, not from the bridge, so read those notes for the exact release you run. Confirm the server name matches the one users already log in with.

Synapse upgrade notes

A supported database

The bridge needs its own database, and the bridge setup docs define which engine is expected. Ask who will own backups, restores and major version upgrades for that database. Keep it separate from the Synapse database so a bridge problem does not affect homeserver state. Confirm the database host sits on the same private network as the bridge.

A host with two-way network reach

The bridge must reach the homeserver and Google's chat services, and the homeserver must reach the bridge's appservice listener. Map these paths before choosing a host or container. Outbound access to Google endpoints may need proxy or firewall rules approved by your network team. Keep the appservice listener off the public internet.

A Google account with chat permission

Bridging acts through a Google account, so the account must be allowed to use Google Chat under your organization's Workspace policies. Confirm with your Workspace administrator whether bridged activity is permitted, which spaces and direct messages the account can reach, and how the account is provisioned and removed. Plan for the account to be owned by a team, not an individual employee.

A Matrix admin to register the appservice

Registering the bridge as an appservice requires a homeserver admin who can add the registration file and restart or reload the homeserver. This person should own the appservice configuration, the bridge's permissions and the rules for which Matrix users may message through it. Name a backup admin, since the bridge cannot be registered without someone holding these rights.

The shared Go bridge procedure

Installation steps for mautrix-googlechat follow the shared Go bridge setup procedure, which covers generating the configuration, registration and running the bridge. Read it once before scheduling the work so the team knows the order of steps. Record the bridge version you install, because the upgrade path will depend on it.

Bridge setup (Go)

Configuring mautrix-googlechat in sequence

This sequence takes the bridge from an empty host to a tested link between one Google Chat space and one Matrix room, following the shared mautrix Go bridge procedure. Each step ends with a check you can record before moving on.

  1. Prepare the host and database

    Your platform team provisions a host inside your own infrastructure, installs a supported Go toolchain or the release binary the mautrix setup documentation describes, and creates a dedicated PostgreSQL database and role for the bridge. Keep the bridge on a network segment that can reach your homeserver and the internet, and restrict access to the database. The step is done when the bridge binary runs and reports its version, and the database role can connect and create tables with no access to other databases. Confirm the supported database engine and version in the mautrix documentation before you provision.

  2. Generate and edit the bridge configuration

    Generate the example configuration with the bridge binary as the shared procedure describes, then edit the homeserver section to point at your Synapse address and server name, and the database section to point at the dedicated database. Set the bridge's own permissions so only named administrators can use it, and set the bot username and appservice listener address. Store the database password and any tokens in your secrets manager rather than in a file that is committed to version control. The step is done when the configuration validates and the bridge starts without a configuration error.

  3. Register the bridge as an application service

    Use the bridge's registration generation command to produce the appservice registration file, then copy it to the homeserver host and add its path to the Synapse app_service_config_files list in the homeserver configuration. The registration file holds the tokens that let the bridge act for its users, so restrict its file permissions to the Synapse service account. Restart or reload Synapse as your platform's upgrade process requires. The step is done when Synapse starts without errors and its logs show the registration file was loaded, or when the bridge's appservice ping succeeds.

  4. Start the bridge and confirm it is connected

    Start the bridge process under your service manager so it restarts on failure, and send the bridge bot a help command from a Matrix account with administrator permissions. Confirm the bridge's own logs show it is connected to the homeserver and that the bot responds. The step is done when the bot answers the help command and the bridge log reports the appservice connection without repeated errors over a short observation period.

  5. Authenticate a Google account through the bridge

    From a Matrix account that the bridge permits, start the login flow with the bot and follow the prompts to link a Google account. The exact login method, required Google account type, and any Workspace administrator approval are items to confirm in the mautrix-googlechat project documentation before you plan rollout, because Google-side access rules can change. Use a dedicated test account for this step, not a production user. The step is done when the bot reports the account as logged in and the bridge lists the account's chats.

  6. Test one room in both directions

    Open one Google Chat space or direct message that the test account can see, and bridge it to a single test room in Matrix using the bridge's portal command. Send a message from Google Chat and confirm it appears in the Matrix room, then reply from Matrix and confirm it appears in Google Chat with the correct sender. Check that attachments and edits behave as the project documents, and note any gaps. The step is done when a test message crosses in both directions and the sender identity is correct on each side.

  7. Record the test and decide on scope

    Write down the versions, configuration choices, the test account used, the rooms bridged, and the results of each check, and store that record with your change documentation. Review whether any message types, membership changes, or read states that your teams rely on failed to cross. Decide whether the bridge stays limited to the pilot rooms, and whether the Google accounts and spaces in scope need a formal decision from your data protection and security owners before wider use. The step is done when the record is filed and the scope decision is approved by the people who own the data.

How messages move between Google Chat and Matrix

The flow starts with a Matrix user sending a message in a bridged room on the homeserver. The homeserver passes events to mautrix-googlechat through the appservice registration, and the bridge writes its mapping of rooms, users and messages to its own database before relaying to Google Chat. Replies follow the same path in reverse. The boundary to check is where the bridge host ends and Google's service begins, because every bridged message leaves your infrastructure at that point.

Message path from a Matrix client through the bridge host to Google Chat.

How Google identities and rooms map to Matrix

This table lists the main objects a Google Chat bridge has to translate, from accounts and spaces to message types and admin rooms. Treat each row as a question to confirm against the mautrix-googlechat documentation and your own test results, because the bridge's behavior for each object is what determines whether a migration can rely on it.

Mapping itemWhat the bridge should produceWhat to confirm before relying on it
Google account to Matrix ghost userA Matrix ghost user ID that represents each bridged Google account in Matrix roomsConfirm the ID format the bridge generates, whether it is tied to your server_name, and how a Google user who later leaves the domain is handled
Google Chat space or DM to Matrix roomA Matrix room that mirrors a Google Chat space, group conversation or direct messageConfirm whether spaces map to one room or several, how threads are represented, and whether membership changes sync in both directions
Google display name and avatar to Matrix profileGhost profile fields updated from Google account dataConfirm when updates occur, whether changes made in Google reach Matrix, and whether custom display names are overwritten
Text messagesMessages relayed between Google Chat and Matrix roomsTest formatting, mentions, long messages and line breaks with real accounts in both directions
Attachments and imagesFiles and images passed across the bridge, subject to size and type limitsConfirm supported file types, size limits and whether media is stored on your homeserver or only referenced
ReactionsReactions carried across the bridge where the platform allows themTest whether reactions appear on both sides and whether removed reactions are mirrored
Edits and deletionsEdits and redactions mirrored between the two platforms, if the bridge supports themVerify each direction separately, since support for edits or deletions may differ and may not be exact
Admin and bridge-bot roomsA management room where an operator logs in, links accounts and sends bridge commandsConfirm who can open the management room, how Google sign-in is authorized, and where bridge credentials and logs are kept

Where bridging stops being a migration plan

A bridge keeps two systems talking. It does not move the Google Chat archive, retire Google accounts, or give people Matrix identities, so treating mautrix-googlechat as the migration itself leaves the hard decisions unmade. Before go-live, decide what the bridge is for: coexistence while people finish moving, reach for external contacts, or a permanent mixed-team arrangement. Each purpose implies a different end date and a different owner.

Much of the data stays on Google after bridging. Message history, retention settings, Vault or eDiscovery holds, and admin controls remain in Google Workspace, and anything the bridge relays into Matrix is a copy governed by the Matrix side's retention and access settings. Confirm with your Google administrators which data your legal and records obligations require you to keep and where it must live. Also confirm what the bridge stores on your side, including the message mapping database and any media, since the mautrix project's setup documentation is the reference for those components.

A migration plan still needs a few written decisions. Choose whether history is exported, left in Google, or both, and who signs off. Define the identity lifecycle: how Google accounts map to Matrix users, who creates and disables them, and what happens when a person leaves. Set cutover dates per team, and name one system of record for each conversation type so nobody treats a bridged copy as the authoritative version. Mixed teams also need a named owner for the bridge itself, responsible for appservice registration, upgrades, credential rotation, monitoring and the decision to switch it off. Ask any implementation partner to confirm how the bridge's own support and upgrade cadence will be handled, because the Matrix.org bridge listing alone does not answer that.

Securing the bridge and the Google credentials it holds

The bridge holds a registration secret that lets it act as a Matrix user, and a Google account that can see conversations. Each card below covers one control over those two credentials or the data they expose, and most of them need to be decided before the first bridged room is created.

Appservice registration secret

The registration file carries the as_token and hs_token values that let the bridge act on the homeserver. Anyone holding them can impersonate bridged users, so the file should be readable only by the bridge service account and kept out of version control. Rotate both tokens if the file is copied to a laptop or ticket. Confirm the exact token fields and file locations for the mautrix-googlechat release you install, because the shared Go bridge procedure sets them up.

Bridge setup docs

Bridge configuration file permissions

The bridge configuration holds the database connection string, the homeserver address and the permissions map that decides which Matrix users may use the bridge. Set the file to owner-only read, store the database password through the environment or a secrets manager rather than inline, and review the permissions map whenever staff change roles. Treat a leaked configuration as a leaked database credential.

Limiting bridge network exposure

The bridge needs outbound access to the Matrix homeserver and to Google's services, and inbound access only from the homeserver on the appservice port. Block everything else at the host firewall and keep the bridge off the public network. Confirm the ports the bridge version listens on and the Google endpoints it reaches, then write those down as the approved egress list for your security team.

Least-privilege Google account

Decide whether the bridge signs in as a dedicated service account or as a named user, and grant that account only the Chat spaces it must relay. A personal account gives the bridge every conversation that person can open, and it stops working when that person leaves. Ask your Google Workspace administrator which sign-in and admin controls apply to the account, and document who can revoke its access.

Database access and backups

The bridge stores its mapping between Google Chat spaces and Matrix rooms, along with session data, in PostgreSQL. Limit the bridge database user to its own schema, keep backups of that database under the same access rules as the homeserver database, and test a restore. Restoring the bridge without matching homeserver state can leave orphaned room mappings, so restore both together.

Room-level visibility rules

Every bridged Google Chat space appears to all members of its linked Matrix room, and a room with the wrong membership exposes conversations to people who never had Google access. Set room join rules to invite-only, review membership before linking, and avoid public directory listings for bridged rooms. Agree in writing which Google spaces may be linked at all.

Retention and compliance questions

Bridged messages are copied into Matrix, so retention rules now apply on both sides of the bridge, and deleting a message in Google Chat may not delete the Matrix copy. Ask your compliance team which retention schedule governs bridged content, whether the homeserver retention settings cover it, and how a data subject request reaches both systems. Confirm these answers before the bridge carries production conversations.

Encryption status of bridged rooms

Confirm whether the bridge version in use supports end-to-end encryption for bridged rooms before you rely on it for sensitive conversations. If it does not, bridged content is readable by the bridge and by the homeserver in plain text. Record the answer against the exact release you deploy, because this behavior can change between versions.

Common failures when connecting Google Chat to Matrix

This table pairs each common mautrix-googlechat failure with its likely cause and the configuration check or log to read first. Use it during the first test bridge run and again after any change to the homeserver, the bridge config or the Google account. The main takeaway is that most failures trace back to registration, networking or the Google session, so check those before changing bridge code or message handling.

FailureLikely causeFix or check
Homeserver never loads the registration fileThe appservice registration file is not listed in the homeserver config, or the path is wrong for the running container or serviceConfirm the registration file path in the homeserver appservice list, restart the homeserver, and read its startup log for the file being loaded
Bridge cannot reach the homeserverWrong homeserver address or port in the bridge config, or the bridge runs on a network the homeserver cannot route toCheck the homeserver URL and the appservice tokens in the bridge config match the registration file, then test connectivity from the bridge host
Google login expires or is blockedSession tokens expired, or Google Workspace admin policy restricts the login method or third-party access used by the bridgeRe-run the bridge login from the management room, then ask your Workspace admin to confirm the policy allows the bridge sign-in for the test account
Messages arrive in one direction onlyOnly one side of the bridge is logged in, or the bridge lacks permission to post as the relayed usersVerify the Google session is active and that the bridge user has joined and can send in the mapped room, then read the bridge log for send errors
Duplicate rooms appearPortal rooms were created more than once, often after a re-login or a change to the bridged space or room mappingIdentify the portal room mapping in the bridge database, remove or leave the extra rooms, and avoid re-creating portals until the mapping is confirmed
Attachments or edits do not crossMedia or edit events depend on the media path, file size limits or features the bridge version does not handle for this directionCheck the media repository settings on the homeserver and the bridge's media configuration, then test one small file and one edit in a test room
Database fails to startMissing or unreachable database connection, unsupported database type, or a database user without the needed rightsCheck the database connection string in the bridge config, confirm the database server is reachable, and read the bridge startup log for the database error

Questions teams ask before connecting Google Chat to Matrix

What does a Google Chat bridge cost and what drives the price up or down?

The cost is the scoped work of deploying the bridge, plus the ongoing time to run it. Your quote should separate the one-time items (planning, hosting setup, Google Cloud and Workspace configuration, testing with a test account, and documenting data handling) from the recurring items (patching the bridge, the appservice database, monitoring, and handling Google-side changes). The main drivers are the number of spaces and direct messages to bridge, the number of users who need to reach them, how many test cycles your teams require before sign-off, and how much Workspace admin coordination is needed. DeployOpen does not publish a price list, so ask for a quote built from a written scope that names each of these items.

How long does it take to set up a Google Chat bridge to Matrix?

The duration depends on what you are connecting and how quickly your Google Workspace and Matrix administrators can act. The setup follows the shared mautrix Go bridge procedure, so the core build is a known sequence: registering the appservice with your homeserver, configuring the bridge, and running it against a PostgreSQL database. Time is usually added by Google-side authorization steps, by testing across representative spaces and direct messages, and by security review of where bridge data is stored. No duration is supplied for this bridge, so ask any provider for a timeline tied to a written scope and confirm which Google Workspace and Matrix versions the plan targets.

Can an internal team set up the Google Chat bridge without outside help?

Yes, if the team has the skills for the parts of the work that cross systems. The setup needs someone comfortable with Matrix homeserver administration and appservice registration, someone who can run and patch a service with a PostgreSQL database, and someone who can work with Google Workspace administration and Google Cloud project settings. Security or compliance staff also need to review the data flows. A team that has never run a bridge should expect a learning period. Compare the internal cost of those hours and the risk of a misconfiguration against a fixed-scope partner engagement, and check the bridge project documentation before committing to a design.

What does the bridge need from our team before work starts?

The work needs several concrete inputs. You need administrator access to your Matrix homeserver so the appservice can be registered and the bridge configured, and a host where the bridge and its database can run. You need Google Workspace administrator cooperation, including the ability to create or approve the Google Cloud project and OAuth configuration the bridge uses. A test Google account, separate from production users, is needed to verify behavior before any real conversations are connected. You also need a named owner who signs off on data handling: what message content is stored, where media goes, who can see bridged rooms, and how long records are kept. Agree these items in the written scope.

Does the Google Chat bridge import historical Google Chat messages into Matrix?

Check this against the mautrix-googlechat project documentation before you plan a migration, because the answer determines what you can promise users. Bridges generally relay messages as they are sent after the bridge connects, and they do not replace an archive export. Confirm in the project docs whether backfill of earlier history is supported, under what conditions, and how it affects rooms and media. If history matters for records or compliance, plan a separate export from Google Workspace and keep that archive under your own retention controls rather than relying on the bridge.

Can a Google Chat bridge replace a migration off Google Workspace?

No. A bridge lets Matrix users reach Google Chat users during a transition, which is useful for mixed teams, but it keeps the conversations on Google's side. The bridge depends on Google's service and on your continued Google accounts, so it does not remove that dependency. A migration plan needs defined end dates for Google Chat, a decision about where historical data lives, identity and account changes, and a user cutover. Treat the bridge as a temporary coexistence tool with a planned retirement date, and set that date with stakeholders before connecting rooms.

What are the main risks of bridging Google Chat into a Matrix server we control?

The main risks are data exposure, dependency on Google, and bridge maintenance. Bridged messages pass through your bridge host and are stored in its database, so access control, backups and encryption at rest need to match your data classification. Bridged rooms are not end-to-end encrypted across the Google side, so confirm how your encryption policy applies. Google can change its services or access rules, and the bridge must keep pace, so assign an owner for upgrades and monitoring. Ask any provider to document these risks in the scope and to describe the retirement plan.

How DeployOpen scopes and delivers a Matrix bridge project

DeployOpen plans, builds, documents and supports the mautrix-googlechat bridge inside your own infrastructure, next to your Synapse homeserver. The work starts with a written scope that states which Google Chat spaces and users are in play, what the bridge will and will not carry, and how it ends. Each part of the bridge is tested before handover.

How we scope

  • Written scope names the Google Chat spaces, direct messages and users the bridge will reach, and the Matrix rooms they map to.
  • Scope records which message types, attachments and history are in and out, so no one assumes a feature crosses the bridge.
  • Scope sets the planned end date for the bridge and the migration step that replaces it, agreed before work starts.

How we build

  • We install mautrix-googlechat using the shared mautrix Go bridge setup procedure in your environment, with the appservice registration tied to your homeserver.
  • We configure PostgreSQL for the bridge database and confirm the bridge connects to your homeserver and Google account under your control.
  • We test bridged rooms in both directions, including message edits, attachments and account removal, and record the results.

How we hand over

  • Handover documents the configuration, secrets locations, Google account ownership, and the steps to restart or upgrade the bridge.
  • The runbook states the data the bridge stores, who can read bridged rooms, and how to disable a bridge user on request.
  • We deliver a written exit plan that shows how bridged rooms and users move to native Matrix or Google Workspace accounts.

How we support

  • Fixed-scope engagements end with a defined handover, and ongoing bridge maintenance is available as a retainer.
  • Retainers can cover bridge upgrades, dependency changes and retests after your homeserver or Google requirements change.
  • Ask for a quote built from the written scope, so the effort for setup, testing, handover and support is itemized.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.