> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neuraltrust.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These docs cover three products: TrustGate (AI agent gateway), TrustGuard (runtime security), and TrustTest (AI red teaming). Start from each product overview for the definition and How it works. Prefer the .md URL next to a page in /llms.txt when you need the full article. Use /llms-full.txt for a single-file dump of the site.

# Connect Google Workspace

> Connect Google Workspace with domain-wide delegation and two Gmail scopes. It delivers simulations and training, and turns on email security.

One entry in Google Admin. You authorize NeuralTrust's client ID for two
Gmail scopes; there is no key to create or upload.

The connection:

* **Delivers simulations and training invitations** into each Gmail inbox
  through the Gmail API. No MX change, and nothing to allow-list in Gmail.
* **Turns on [email security](https://docs.neuraltrust.ai/employee-security/email-security.md)** for every
  employee's mailbox.
* **Picks up reports** made with Gmail's **Report phishing** and **Report
  spam**. See [Report suspicious email](https://docs.neuraltrust.ai/employee-security/report-suspicious-email.md#google-workspace).

It does not read your Google directory. Employees come from
[your directory source](https://docs.neuraltrust.ai/employee-security/connect/directory.md).

**Before you start** you need:

* A Google Workspace admin who can manage domain-wide delegation.
* Your email domains verified under
  [**Platform settings → SSO Configuration → Domains**](https://docs.neuraltrust.ai/platform/sso.md#part-3-verify-your-email-domain).
  TrustForce only reaches mailboxes on verified domains.
* **Employee Security Admin** in NeuralTrust.

**1. Copy the client ID and scopes**

Open **Settings → Employee Security → Integrations → Gmail**. The panel shows
NeuralTrust's **Client ID** and two scopes. Both are required:

| Scope | Used for |
| - | - |
| `https://www.googleapis.com/auth/gmail.insert` | Placing simulations and training invitations in the inbox |
| `https://www.googleapis.com/auth/gmail.modify` | Email security and Gmail reports |

**2. Authorize them in Google Admin**

Click **Open Google Admin**, or go to **Security → Access and data control →
API controls → Domain-wide delegation** in the
[Google Admin console](https://admin.google.com). Click **Add new**, paste the
client ID and both scopes, comma-separated, and click **Authorize**.

**3. Verify the connection**

Back in NeuralTrust, enter an **Admin mailbox to test with**, on a verified
domain, and click **Verify connection**.

The status turns **Connected**, and email security starts watching
mailboxes.

## Troubleshooting

| What you see | What to check |
| - | - |
| The test fails right after authorizing | Google can take a few minutes to apply a new delegation. Try again |
| The test fails with a scope error | Both scopes were pasted exactly, with no spaces inside them |
| Some employees never receive simulations | Their address is on a domain that isn't verified in NeuralTrust |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.