## Thinking Path
> - Paperclip is the open source app people use to manage AI agents for
work
> - Connectors let agents use Google Workspace through a Google sign-in
that Paperclip Cloud manages for the user
> - When a user removes a Paperclip-managed Google connection, Paperclip
deletes the tokens locally, but the grant stays live at Google
> - Google's OAuth review expects that a disconnect ends the app's
access, and users expect it too
> - Google's revoke ends the user's whole grant to the shared client, so
only the Paperclip Cloud broker can decide when it is safe to revoke
> - This pull request asks the broker to revoke each removed grant,
keeps local removal unconditional, and tells the user the outcome in
plain language
> - The benefit is that removal ends Google access when no other
Paperclip connection needs it, and the user knows what to do when it did
not
## Linked Issues or Issue Description
**Subsystem affected**
Connectors: Paperclip-managed Google Workspace and the legacy
per-service Google connections (server removal, shared contracts,
connection UI).
**Problem or motivation**
Removing a Paperclip-managed Google connection or grant was local only.
The refresh token was deleted in Paperclip, but Google still listed
Paperclip as having access to the account. The docs said so ("Removal is
local for managed grants").
**Proposed solution**
On removal, send each removed grant's refresh token to the broker's
signed `POST /v1/connector/revoke`. The broker revokes at Google only
when no other live binding could share the grant. Paperclip records the
broker's outcome code and shows one of three plain messages. Local
removal never waits on, or fails because of, that call.
**Alternatives considered**
Call Google's revoke endpoint from the app. This ends the user's whole
grant to the shared client and can break their other Google connections,
so the broker owns the decision.
**Additional context**
Older brokers answer 409 `REVOCATION_NOT_AVAILABLE`. The app treats
that, a timeout, and a network error as "could not end access at Google"
and still removes the connection.
## What Changed
- `paperclip-cloud-connector.ts`: `revoke()` takes an optional
`timeoutMs`, returns the broker's `outcome` from an allowlist, and keeps
`REVOCATION_NOT_AVAILABLE` as an allowed rejection reason.
- New `tool-access/connections/google-access-removal.ts`. For a managed
Google connection, `prepare()` reads each removed grant's refresh token
and returns a `send()` step. `send()` calls the broker for each distinct
token, one after another, under one 5-second deadline. Every result and
every error (including a Paperclip Cloud client that cannot be created)
becomes an outcome code. It never rejects and never logs a token. An
unexpected error is logged with the error name only and reported as
`unexpected_error`.
- Order for removing a whole connection: read the tokens, run the whole
local teardown (grants, installs, app profile, gateway tokens, runtime
slots, catalog, OAuth state, archive the connection), call the broker,
delete the sent refresh-token secrets whatever the outcome, then delete
the remaining secrets. A failure anywhere in the teardown makes no
broker call. Order for removing one grant: read the token, commit the
revocation, call the broker, delete the grant's refresh-token secret.
`send()` owns the call and the deletion through an injected
secret-removal function.
- Owed revocations: a revoked managed Google grant whose refresh-token
secret still exists (and that nothing live uses) is sent by every later
removal, then the secret is deleted. This covers a process stop after
the teardown and before the call, with no new column. Once the secret is
deleted, nothing is sent again.
- Shared tokens: the shared (organization) sign-in writes the same
secret refs to the organization grant and the connection. So revoking an
organization grant alone neither calls the broker nor deletes the
secret, because the connection still uses that token; removing the
connection does both. The same rule applies to any refresh token still
used by another live grant or connection.
- Audit history: once the broker call settles, a
`connection.google_access_removal` audit event records `reasonCode` =
result and `providerAccess` (plus `grantId` for a single grant). If that
write fails, the removal still succeeds and the failure is logged.
- Revoke signs with the subject that consented to the grant
(`providerTenant.externalId`, saved by the managed callback from the
claim). Grants saved without it fall back to the refresh rule. Refresh
is unchanged; see Risks.
- `removal.ts` and `grants.ts`: `providerAccess: { provider, result,
outcomes }` goes to the responses and to the `tool_connection.archived`
and `tool_connection.grant_revoked` activity entries. The tool access
audit field `providerRevocation` keeps its Vercel meaning only.
- `packages/shared`: `ManagedGoogleAccessRemoval`,
`ManagedGoogleRevocationOutcome`, `ConnectionGrantRevocationResult`.
- UI: one helper, `connectionRemovalToast`, builds the removal toast
(base sentence plus the Google notice, tone and action) for Connectors,
Connections and the app page. No codes are shown.
- API: `docs/api/tool-connections.md` documents both DELETE responses
and `providerAccess`. The OpenAPI registration describes the optional
field and its four results.
- Docs: `GOOGLE-WORKSPACE.md` (order, owed revocations, decision table),
`GMAIL.md`, the Google connector memory note, and the help page on
deleting connection data.
Decision table, judged over the distinct tokens sent in this removal:
| Outcomes | `result` | User message |
| --- | --- | --- |
| Every token `revoked` | `ended` | "Paperclip's access to this Google
account was also ended at Google." |
| Any failure-type code: `provider_revocation_failed`,
`binding_not_known` (the broker had no record, so Google was not
called), `provider_revocation_disabled`, `revocation_in_progress`,
`revocation_not_available`, `broker_unavailable`, `broker_error`,
`credential_unavailable`, `unexpected_error` | `not_ended` | "Paperclip
removed the connection but couldn't end its access at Google. You can
remove Paperclip from your Google account's third-party connections." +
"Open Google account connections" |
| Only `other_connections_remain` | `other_connections_remain` | "Other
Paperclip connections still use this Google account, so Google keeps
Paperclip's access until you remove those too." |
| At least one `revoked`, the rest `other_connections_remain` |
`ended_unconfirmed` | "Paperclip's access was ended at Google. If more
than one Google account was connected here, check your Google account's
third-party connections to be sure." + "Open Google account connections"
|
Grants record no Google account identity: the managed callback saves
`externalId` (the Paperclip subject), `name` (the provider name), and
OAuth timing and scopes, and none of the 14 scopes returns an account
identifier. So the last row is always `ended_unconfirmed`. This includes
two tokens of one user and several agent grants on one Google account.
## Verification
- `pnpm --filter @paperclipai/server exec vitest run
src/__tests__/google-managed-connection-removal.test.ts
src/services/tool-access
src/services/paperclip-cloud-connector-revoke.test.ts
src/services/paperclip-cloud-connector.test.ts
src/__tests__/tool-connection-removal.test.ts
src/__tests__/tool-access-service.test.ts
src/__tests__/openapi-routes.test.ts` (714 passed)
- `pnpm --filter @paperclipai/ui exec vitest run
src/features/connections/googleAccessRemoval.test.ts src/pages/apps`
(passed)
- Server test typecheck (`node server/scripts/typecheck-layers.mjs`)
passes.
- Red then green: the server tests failed on `master` sources (21), then
each review round's new tests failed on the previous head and pass now.
They cover: the order on both paths, local failure before the grant
commit making no call and the retry sending, cleanup failure after the
call making no second call, a process stop between commit and call being
sent on retry with the secret deleted after, a Paperclip Cloud client
that cannot be created, the consenting subject for an organization
grant, sequential sends under one deadline, each row of the decision
table (per-agent and same-user cases give `ended_unconfirmed`, a mixed
failure gives `not_ended`), the unexpected-error log without a token, no
token in any log call, the delete-stored-data option, and a toast test
per surface.
- Added time, measured locally with a stubbed broker that answers at
once: median 22.1 ms against 20.3 ms without the broker step (12 runs
each), about 2 ms. With a real broker, one round trip per removed token,
capped at 5 seconds in total.
- `pnpm verify` exits 2 (a global CI input changed), so required CI
supplies the broad coverage.
- Not verified against a live broker or a real Google account.
## Risks
- A removal of a managed Google connection or grant can take up to 5
seconds longer when the broker is slow.
- Refresh subject is not changed in this PR. In the broker
(`recordProviderGrant`), a ledger row's subject is fixed when the row is
first written, and a refresh under another subject leaves that row
untouched. So moving refresh to a new subject could stop updating the
row's last-seen time. After 200 days the row would then count as not
live, and a later removal elsewhere could revoke at Google while this
connection still works. That risk cannot be ruled out from code for rows
written before this release, so both refresh paths keep their old rules.
The two refresh paths already use different subject orders today: the
gateway prefers `connectorSubjectAgentId` and then
`connectorSubjectUserId`, while background refresh prefers the grant's
own subject. That is pre-existing, and this PR leaves it unchanged.
Revoke uses the consenting subject, which matches the claim-time ledger
row. When the row was first written by a refresh under a different
subject, the broker answers `binding_not_known` and the user gets the
warning.
- Repeated removals can send an already-removed token again; the broker
returns its recorded outcome and changes nothing at Google.
- Against an older broker, users see the "could not end access at
Google" message, which is accurate.
## Model Used
- Claude Opus 5.5 (`claude-opus-5-5`) in Claude Code, with tool use and
code execution.
## Checklist
- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [ ] All Paperclip CI gates are green
- [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
23 KiB
Google connector working memory
Temporary. Holds the decisions and details we keep needing while the built-in Google Workspace connector goes through Google approval and into production. Delete this file once the connector is approved and released.
This repository is public. Keep passwords, client IDs and secrets, project numbers, review login codes and review correspondence out of this file; they live in the private operator handoff.
Related: production checklist, code-fix plan, connector doc.
Last updated: November 17, 2026 (night).
Decisions
| Date | Decision | Detail |
|---|---|---|
| Nov 17 | Owner for everything is Dotta | Submission, security, privacy and release. |
| Nov 17 | Launch on our own tools over Google's REST APIs | Google's hosted Workspace MCP servers are still Developer Preview and cannot be offered to the public. We build our own tool set for agents that have this connector. |
| Nov 17 | The REST tool set must be swappable for Google's MCP later | Same tool names, inputs and results as Google's MCP tools, so switching back is a change of endpoint, not a rewrite. |
| Nov 17 | The REST tool set lives in its own folder | Nothing Google-REST-specific leaks into shared code; removing it later means deleting the folder and flipping one registration. Follow the boundary-discipline principle and rules/module-boundaries.mdc. |
| Nov 17 | No new npm packages | The REST tool set is a folder inside the server, server/src/google-workspace-rest-tools/, not a new package. The server is published, so a new package in its dependencies would also have to be published. |
| Nov 17 | Engineering test instance moves to staging | Create googletester.staging.paperclip.app; staging is far easier to deploy to. |
| Nov 17 | Scopes must line up everywhere | What the picker asks for, what the code accepts, what the Cloud broker allows, and what the Google Console declares are the same 14 scopes. |
| Nov 17 | Scope handling contract | What we request is strict: a request with a scope outside the 14 is rejected. What Google reports on a saved grant is capped to the 14 and to the saved selection, and the grant keeps working. Only a grant with nothing inside the 14 (or no scope evidence at all) needs reconnecting. |
| Nov 17 | Assessment prep starts before Google asks | Run the scans and fix findings now; the formal assessment starts on Google's notice. |
| Nov 17 | Agents that prepare PRs merge them | On the coordinator's approval, once required checks pass and Greptile is 5/5. |
| Nov 17 | Merges are gated on green CI and Greptile 5/5 only | Not on the ponytail review bot. |
| Nov 17 | delete_event never deletes a whole recurring series in this release |
A series ID is refused; the agent must pass one occurrence's ID. |
| Nov 17 | A health probe may only use a request the granted scopes permit | Each service lists cheap reads with the scopes that allow each; the probe uses the first one the grant allows. |
| Nov 17 | Read & write Calendar also requests free/busy | See "Scopes". |
| Nov 17 | Tool labels must be truthful, even where Google's differ | Every update tool is marked destructive: Calendar update_event, Docs update_doc, Slides update_presentation, Sheets update_spreadsheet. Google marks them non-destructive. Approval and confirmation follow our label. |
| Nov 17 | Docs and Slides edits go through a closed list of request types | Each request type is allowed or refused by name. A type not on the list, including one Google adds later, is refused and nothing is sent. |
| Nov 17 | No tool may reach a file other than the one named | Request types that read another file (smart-chip links, linked Sheets charts, imported slides, Drive audio and video) are refused. Image links on drive.google.com or docs.google.com are refused. Drive tools use only the file ID the caller passed. |
| Nov 17 | Docs and Slides edits require the revision that was read | requiredRevisionId is mandatory. If the file changed since the read, nothing is changed and the agent is told to read it again. |
| Nov 17 | Sheet tabs and ranges may be deleted inside a spreadsheet | Through update_spreadsheet, because the approver sees each request type (deleteSheet, deleteDimension, and so on). No tool deletes, creates or shares a whole spreadsheet. |
| Nov 17 | Deleting a whole recurring series is refused | Same rule as the delete_event decision above. |
| Nov 17 | A service is switched to REST only after a live test on the staging tester | One service at a time. |
| Nov 17 | The gateway sets the REST result size limit | The REST tools enforce the number the gateway passes: the gateway's MCP response limit less framing, 999,885 bytes. A result Google's MCP server could deliver is also delivered over REST. See the folder README's "Result size". |
What has shipped
| PR | What it does | Merged commit |
|---|---|---|
| #21996 | Plan docs: this file, the production checklist and the code-fix plan. | 12cb18e17d |
| #21998 | Data-use disclosure in the service picker, shown just before Google consent. Every Google Workspace sign-in start goes through the picker, including four sign-in paths on the app page (Reconnect, Connect as me, Connect organization identity, dedicated-agent connect). The Gmail read & write line says Google's screen also mentions sending and that Paperclip does not send. | b124ad0674 |
| #21999 | Prompt-injection screening now also covers resource reads through a named gateway, the one path that was not screened. Applies to every connector, not only Google. | 65eac24876 |
| #22001 | Scope lock. GOOGLE_WORKSPACE_SUBMITTED_SCOPES is the hand-written list of 14, and workspace.all uses it. Paperclip-managed Google methods outside the 14 (Gmail archive, Chat, People, Workspace Search) are no longer offered for new setup or reconnect through Paperclip's Google app; saved ones keep refreshing and running. |
66ac5d7aa0 |
| #22000 | REST tool set part 1: the folder server/src/google-workspace-rest-tools/ with Gmail get_message, search_threads and create_draft. Nothing calls it yet; the switch comes in a later PR. |
a29658b5b7 |
| #22010 | Users can delete the data Paperclip stored from a connection's tool calls: "Delete data" on the connection's page, or a checkbox when removing it. Live for every connector, not only Google. Help page: docs/guides/board-operator/deleting-connection-data.md. |
d1b5cfe038 |
| #22017 | Nine Calendar tools in the REST tool set (Calendar 9 of 9). | c41ca4a992 |
| #22016 | Per-service transport switch (GOOGLE_WORKSPACE_TOOL_TRANSPORT) and in-process dispatch to the REST tools. Every service is still on Google's MCP. Discovery and health run a scope-aware probe for a service on REST. |
c652c813bc |
| #22014 | The remaining six Gmail read tools in the REST tool set (Gmail 9 of 9). | 1d3b4201e3 |
| #22026 | Read & write Calendar also requests calendar.events.freebusy, and the planning docs were brought up to date. |
7f1f0eef67 |
| #22027 | Six Sheets tools in the REST tool set (Sheets 6 of 6). | c366a606b1 |
| #22029 | Docs and Slides tools in the REST tool set (Docs 2 of 2, Slides 2 of 2). Also marks Calendar update_event destructive. |
f61b919701 |
| #22028 | Eight Drive tools in the REST tool set (Drive 8 of 8). Also limits the Gmail host to its API path prefix (before, any path was accepted there) and requires a path prefix for every allowed host. | ceaf574421 |
The REST tool set now covers all 36 actions. No service is switched to it.
REST tools status
| Service | Implemented | Switched on |
|---|---|---|
| Gmail | 9 of 9 | No |
| Calendar | 9 of 9 | No |
| Drive | 8 of 8 | No |
| Docs | 2 of 2 | No |
| Sheets | 6 of 6 | No |
| Slides | 2 of 2 | No |
"Switched on" means the service is paperclip_rest in
GOOGLE_WORKSPACE_TOOL_TRANSPORT. Today every service is google_mcp.
Known differences from Google's tools
From the folder README (server/src/google-workspace-rest-tools/README.md).
| Service | Difference |
|---|---|
| Gmail | A reply draft is threaded but does not quote the original message. |
| Gmail | get_draft, list_threads and search_messages are not in Google's reference; their inputs and results are inferred from sibling tools. |
| Docs | The format of read_doc's content has not been compared with an answer from Google's server. |
| Sheets | Whether Google's get_values returns formatted values and its update_values writes raw values is inferred, not verified. |
| Sheets | get_spreadsheet refuses commentsIncluded: true, and update_spreadsheet refuses comment requests: comments are not in the Sheets API. |
| Drive | read_file_content cannot extract text from PDF, Office or image files; they return textFormattingNotSupported. |
| Drive | Whether copy_file under drive.file can copy a file the app never created or opened is not verified. |
Still open
- Images by public web address in Docs and Slides. An edit may insert an image from any public link, and Google then fetches that address. The address is chosen by the agent, so it can carry data out (a leak path). Allowed today. Recommendation: refuse it before Docs or Slides is switched to REST.
- What we send to the reviewers. Not decided: the new staging tester or something else. Whatever it is must use the separate Google app (below).
- How the staging tester reaches the separate Google app. The broker cannot point one workspace at a different Google client (see "Environments"). Recommendation: add a per-workspace client override to the broker so reviewers see the real flow.
- Reviewer login on staging. The scoped reviewer password login is hard-coded to the production tester. The client override above does not fix this; how to enable the login on staging is still undecided.
- AI-agent client and REST. Whether an OAuth client marked for AI agents may call the REST APIs rather than MCP. To check before the staging tester is wired.
- Three Gmail tools are inferred. Google's MCP reference does not list
get_draft,list_threadsandsearch_messages; their schemas copy the sibling tools (#22014). - Privacy policy. paperclipai/paperclip-website PR 197 merged on November 17 and the page shows "Last updated: November 17, 2026". Its no-training promise is narrower than before: it now covers only the model providers Paperclip selects and configures. That needs legal review; it is not required for Google approval. Whether it covers the OpenRouter model used by the optional injection-screening check is not confirmed (see "Privacy policy").
- Lockfile on master.
pnpm-lock.yamlis behindserver/package.json(posthog-nodeis missing), so a frozen install fails. Checked November 17 atceaf574421. - The "no review correspondence" rule. Narrow it or keep it (see "Google review history").
- Which security lab to use, and the budget.
Next steps
- Cloud broker changes: limit the unified profile to the 14; cap extra reported scopes instead of failing; stop offering Chat, People and Search on the verified client; turn on revoke support; add a per-workspace Google client override.
- Create the staging tester (
googletester.staging.paperclip.app). - Live acceptance on the staging tester.
- Switch services to REST one at a time, each after its live test.
- Revoke at Google when the last connection is removed.
- Security scans.
- Run the same data cleanup when a task or a company is deleted.
Environments
| Name | Address | Notes |
|---|---|---|
| Earlier tester | googletester.paperclip.app (company prefix GOO) |
On production. Used for earlier tests. Hard to deploy to; do not build on it further. |
| New tester | googletester.staging.paperclip.app |
To be created on staging. Engineering qualification happens here. |
| Test 02 | In the private handoff | Staging stack used for the October proof. Holds Dotta's own Gmail grant, so not for reviewers. |
| Reviewer destination | Undecided | See "Still open". |
Creating the staging tester (as reported by the Nov 17 read-only audit; not yet done):
- On the staging account site, create an organization with the slug
googletester. That givesgoogletester.staging.paperclip.app. - Pin its app version with the Cloud repository's deploy-stack command.
- Turn on
enableGoogleWorkspaceConnector.
Two obstacles (reported):
- The broker cannot point one workspace at the separate Google app. Every workspace in an environment uses that environment's one Google client.
- The scoped reviewer password login is hard-coded to the production tester.
Reviewer login: Google's reviewers could not use our normal sign-in, so we gave them a custom password for the Paperclip login. Any reviewer environment needs that again. The password itself goes only through the review channel.
Google apps (Cloud projects)
| App | Purpose | State |
|---|---|---|
| Original production app | The one under Google verification | It was released to more than 100 users while unverified and hit Google's 100-user cap. Nobody new can sign in or sign up with it until it is verified. |
| New app for us and the tester | Created so we and Google's reviewers can sign in at all | Separate Cloud project, set to In Production. Google asked for exactly this in its October 7 message. The reviewer environment must use this app's client. |
- The client labelled "managed staging" belongs to the original production app, despite the name. A flow that used it does not satisfy Google's separate-project request.
- Verification is of the original production app; the new app only gives reviewers a way in.
- With the REST transport, each project needs the Gmail, Drive, Docs, Sheets, Slides and Calendar APIs enabled, not the MCP APIs.
Scopes
This is the one copy of the scope table. Other docs link here.
One connection, three groups, 14 scopes across all modes (10 for the
default all-read-and-write selection, 8 for all read-only). Prefix:
https://www.googleapis.com/auth/. In code the list is
GOOGLE_WORKSPACE_SUBMITTED_SCOPES in
packages/shared/src/google-workspace-connectors.ts.
| Group | Read only | Read & write |
|---|---|---|
| Gmail | gmail.readonly |
gmail.readonly, gmail.compose |
| Drive, Docs, Sheets, Slides | drive.readonly, documents.readonly, spreadsheets.readonly, presentations.readonly |
drive.readonly, drive.file, documents, spreadsheets, presentations |
| Calendar | calendar.calendarlist.readonly, calendar.events.readonly, calendar.events.freebusy |
calendar.calendarlist.readonly, calendar.events, calendar.events.freebusy |
- Restricted (trigger the security assessment):
gmail.readonly,gmail.compose,drive.readonly. - Gmail write means drafts only.
gmail.composewould let an app send; our tool list has no send action. Never say the scope itself prevents sending. - Out of scope: Chat, Contacts, Directory, cross-service Search. Not in the picker, the request, the tools, the docs or the submission.
- Read & write Calendar asks for free/busy (Nov 17, #22026). Google's
REST
freeBusy.queryaccepts onlycalendar.readonly,calendar,calendar.events.freebusyandcalendar.freebusy, notcalendar.events(https://developers.google.com/workspace/calendar/api/v3/reference/freebusy/query). Google's MCPsuggest_timedoes acceptcalendar.events. So read & write Calendar now also requestscalendar.events.freebusy, already one of the 14. The per-servicecalendar.writeprofile keeps its two scopes, because the broker matches legacy profiles by exact scope set. Grants made before this change still count as read & write and keepsuggest_time; on REST it falls back to reading attendees' events and names anyone it cannot read. Nothing prompts them to reconnect; choosing read & write Calendar again in the picker asks for the new scope. - Target: nothing outside this table is requested, declared in the Console, or shown in the demo. The app side is done; the broker and Console are not (below).
Known mismatches to clean up (after #22001 the app side matches the 14):
- The Cloud broker still accepts the 21-scope legacy union for
workspace.all. - Production still enables the legacy Chat, People and Workspace Search profiles on our Google client. The app no longer offers them for new setup.
- The Google Console declaration has not been compared with the 14.
Cloud broker (paperclip-cloud)
As reported by a read-only audit on November 17. Not re-verified here.
- The profile registry is at
src/connections/providers.ts. - One Google client per environment, shared by all profile groups. Staging's client differs from production's.
workspace.allis enabled on staging only.- There is no
gmail.archiveprofile. - A revoke endpoint exists, but every Google profile has revocation turned off.
- There is no per-workspace client override.
Changes needed in the broker:
| Change | Why |
|---|---|
Limit workspace.all to the 14 |
It still accepts the 21-scope union. |
| On refresh and claim, cap reported scopes to the 14 instead of failing | Matches the app's scope handling contract; saved grants keep working. |
| Keep accepting the old 21-scope refresh binding until older app versions are gone | Older apps still sign 21 scopes on refresh. |
| Stop offering Chat, People and Search for new sessions on the verified client | They are outside the 14. Keep refresh for saved grants. |
| Do not merge the branch that adds a Gmail archive profile | gmail.modify is restricted and not in the submission. |
Deploy order: app first, then broker. If the broker narrows first, refresh from app versions that still sign 21 scopes fails.
Where Google content is kept
From #22010's store inventory. The earlier audit understated it: it missed the second audit table, approval cards, results passed to later runs, app views, nested run answers and migrated log originals.
| Place | What is kept | Removed by "Delete data" |
|---|---|---|
Tool-call records (tool_invocations, tool_call_events) |
About 4,000 characters of each request and result | Yes. Size and fingerprint kept. |
Connection audit history (tool_access_audit_events) |
Argument preview | Yes. Decision, IDs, size and fingerprint kept. |
| Approval requests and their approval cards in the task | Preview, arguments and the executed result | Yes, for settled requests. |
| Results passed to a later run (run context and wake payload) | Approved action results | Yes, for settled runs and wakes. |
| App views | Tool input, result and shared context | Yes, rows deleted. |
| Run transcripts: the run log in every copy (object journal, archive, original local file and its S3 mirror), run events, output excerpts and answer text at any depth of the run result | Full content | Yes, the whole transcript of every settled run that called the connection or received an approved result. |
| Comments, documents, files and chat messages agents wrote into tasks | Whatever the agent copied | No, by design. The user edits or deletes them, or the task. |
| Transcripts of later runs that read an app view's shared context | Shared context | No. Nothing records which runs read it. |
| Questions a provider asked a person; provider tool and skill definitions | Not tool results | No. |
| Raw provider traces | Full traffic | No. Admin opt-in, encrypted, expire within 24 hours. |
| Feedback exports already sent | Run logs the user chose to share | No. Already outside Paperclip. |
| Optional model check for injection screening | If a company turns it on, the full tool result is sent to an OpenRouter model | Not stored by Paperclip. |
| Connection removal | Deletes tokens locally | Asks Paperclip Cloud to revoke at Google; it does so only when no other connection could share the grant. Customer-owned clients stay local. |
What "Delete data" keeps: the record that each call happened (time, tool, agent, outcome, size, fingerprint), and activity entries with counts only.
Limits:
- Runs still in progress are skipped and counted; delete again after they finish.
- Deleting a task or a company does not yet run the same cleanup.
- A local log file on another server's disk stays until that server is replaced; its S3 mirror is deleted.
- On versioned buckets, earlier object versions stay until the bucket's lifecycle rule removes them.
The deletion is a durable request. It resumes after a restart and retries a failed step until every step succeeds.
Google review history
- September 30: we sent a revised submission.
- October 7: Google replied. Reviewers could not sign in because of the
100-user cap, and the video did not show
gmail.readonlyworking end to end. They asked for a separate test project set to In Production, working reviewer login, and a new video showing a full email in Paperclip and then the same email in Gmail. - No newer message from Google as of November 15.
- Branding was verified at the last Console check; data access was still under review. Not rechecked since.
- The older videos and replies describe separate per-service connectors and removed services. Do not reuse them.
Note: on #21996 the ponytail reviewer flagged the October 7 summary above as review correspondence in a public repository. We kept the summary.
Privacy policy
- Lives in the
paperclip-websiterepository atweb/app/privacy/page.tsx, published at https://paperclip.ing/privacy. Last updated July 23, 2026. - It already has what Google looks for first: a Google user data section (4.1) with the Limited Use statement and links to Google's policy.
- The edits are in paperclipai/paperclip-website PR 197, merged November 17. The published page now says that Google content is sent to the AI model provider configured for an agent, that agents create Gmail drafts and do not send, that content read by agents stays in tasks and runs until deleted, and how to delete data (full deletion within 30 days of a request).
- Still to check:
- The no-training promise now covers only providers Paperclip selects and configures. Legal review needed.
- Whether it covers the OpenRouter model used by the optional injection-screening check.
- It names
my.paperclip.appas the Google connection service on Paperclip Cloud; check that this matches the current flow.
Other things to remember
- Security assessment: Google assigns the tier, we choose and pay the lab, and it repeats every 12 months.
- The connector is behind the default-off
enableGoogleWorkspaceConnectorexperimental setting until Google approves. - The synthetic test email has the marker
PAPERCLIP-QA-BODY-20261028. - The October 31 live evidence predates many changes to the sign-in code and must be redone.