Scrub PII Before Sending Prompts to Gemini
A single prompt to Gemini can carry more sensitive data than you realize. Internal IP addresses in debugging queries, customer emails in support drafts, API keys in config examples: every value in your prompt travels to Google's servers the moment you hit send.
Workspace accounts benefit from Google's data processing controls, but consumer and standard API accounts operate under broader terms.1 Regardless of your account tier, the scrubber ensures sensitive values never reach Google's infrastructure. Tokenizing before submission closes the transmission window at the point of input.
How Gemini handles submitted data
Gemini processes your full prompt on Google infrastructure. For Google One AI Premium and Workspace plans, retention settings reduce how long conversations are stored, but the transmission still occurs. Consequently, a prompt containing your production database URL or a customer's Social Security Number reaches Google's servers under their current data terms, and the sender, not Google, bears responsibility for that transmission under GDPR and CCPA.2 Removing the sensitive values before the prompt eliminates this responsibility exposure regardless of your account tier.
Google's data processing terms for Workspace include specific provisions around AI data handling: Workspace data is not used to train Google's general-purpose AI models.1 However, this protection applies at the account configuration level and requires the organization's admin to have enabled the relevant data protection settings. For consumer Google accounts and standard API access, the data handling terms are broader. Scrubbing before submission provides protection that does not depend on which Google account type you use or which admin settings are active.
Network and security data in Gemini prompts
IT and security teams frequently use Gemini to analyze network configurations, security policies, and infrastructure architecture. These queries often include internal IP addresses, internal domain names (.corp, .internal, .staging), and API credentials embedded in config examples. Building on this, developers paste stack traces and error logs that contain connection strings and authentication tokens. The scrubber detects all of these formats and tokenizes the values that identify your specific infrastructure before they reach Google.
Security teams face a particular challenge: the queries most useful for AI-assisted analysis are the ones most likely to contain sensitive infrastructure details. A prompt asking Gemini to review a firewall rule set for misconfigurations needs the actual rule text to be useful, and that rule text contains internal IP ranges and service hostnames. Scrubbing lets you submit the full structural content for analysis while replacing only the identifying values. Gemini receives the rule logic, port numbers, and protocol details it needs for a thorough review, and your internal addressing scheme stays private.
Using the variables file with Gemini responses
After Gemini responds with [IP_1] or [DOMAIN_1] in its output, switch to the Restore tab, paste the response, and upload the variables file downloaded after the initial scrub. The restoration replaces every token with its original value in your browser. Your team reads a natural-language response referencing real infrastructure. Yet the variables file itself should be treated as sensitive because it is the key that reconstructs the original data, so access to it should be restricted to the same people who could access the original prompt.
For teams running multiple Gemini sessions in a day, establish a routine of downloading the variables file immediately after each scrub and storing it in a location with the same access controls as the original data. The variables file is small, typically a few kilobytes, and can be attached to the same ticket or document where you track the AI-assisted analysis. When the analysis is complete and the response has been restored, delete the variables file if your data retention policy requires it. Treating the variables file as a transient key rather than a permanent record keeps your data lifecycle clean.
Gemini for Google Workspace versus consumer gemini.google.com
Gemini's data handling differs significantly between personal Google accounts and Google Workspace accounts. Consumer accounts at gemini.google.com operate under Google's standard privacy policy, which includes conversation review for safety and quality improvement.3 Workspace accounts on Business, Enterprise, or Frontline plans use Gemini for Google Workspace, which operates under the Google Workspace Data Processing Amendment: Google does not use your organization's data to train foundational AI models, and interactions are covered by the Workspace DPA.
For teams on Google Workspace, the relevant admin controls live under Admin console → Apps → Additional Google Services → Gemini. Workspace admins can restrict which organizational units access Gemini, limit which AI features are enabled, and control conversation export settings. Regardless of these admin choices, prompts are still transmitted to Google's servers for processing. Scrubbing before submission remains the correct approach for sensitive data, because the transmission event occurs regardless of which admin policies are active.
Confirming your Gemini account context before sharing internal data
Before relying on Workspace data protections, confirm you are accessing Gemini through your Workspace account rather than a personal Gmail account that shares an email domain with your organization. Signing into gemini.google.com with a personal Google account does not apply Workspace DPA protections even if the email domain matches. Check the account icon in the Gemini interface to confirm the active account is your Workspace identity, and when uncertain, scrub all sensitive fields before submission regardless of account context.
File and document upload exposure in Gemini
Gemini accepts file uploads alongside text prompts: PDFs, spreadsheets, images, and audio files.4 When you upload a document for summarization or analysis, the full document content is transmitted to Google's servers as part of the request context. A PDF containing patient records, a spreadsheet with employee salary data, or a network diagram with labeled internal IP addresses all travel to Google's infrastructure when uploaded.
For document-level submissions, extract PDF text before scrubbing, not the file. PDF text can be copied with your system clipboard or exported using a local PDF reader. After scrubbing the extracted text, paste the cleaned version directly into the Gemini prompt field rather than uploading the original file. This approach gives Gemini the structural content it needs for analysis without sending the original document with all its embedded identifiers.
Redacting visual content in screenshots and diagrams
Screenshots and infrastructure diagrams often contain visible IP addresses, hostname labels, and credentials as plain text within the image. Before uploading any image to Gemini that shows internal infrastructure, review the visual content for text labels. Use an image editor to blur or cover sensitive labels before upload, or export a version of the diagram with placeholder names replacing real hostnames and IPs rather than uploading the original.
Gemini integrations in Google Docs, Gmail, and Workspace apps
Gemini features embedded in Google Docs, Sheets, and Gmail send the surrounding document or email content as context alongside your explicit instruction. When you invoke "Help me write" or "Summarize" in a Docs document that contains meeting notes with attendee names and internal server references, that full page context travels to Gemini for processing. The AI feature sees more than your typed instruction; it sees the surrounding content in the document or email thread.
Limiting context when invoking Gemini on sensitive documents
For documents that contain PII, use a targeted prompt approach rather than full-context Gemini features. Instead of invoking Gemini directly on a sensitive document, copy only the structural elements (headings, section outlines, non-sensitive context) into a fresh document or paste them into gemini.google.com after scrubbing. This limits the context Gemini receives to what is structurally necessary for your task without exposing the PII-heavy content from the original document.
Because the scrubber processes text locally in your browser, this targeted approach works the same way for any Google account, from a personal Gmail login to a Workspace Enterprise plan. The structural copy you paste into gemini.google.com keeps the document useful for Gemini while the variables file holds the real names and identifiers for later restoration.
When to use this
Use this before pasting any prompt into Gemini that contains data your organization classifies as internal, confidential, or personally identifiable.
Examples
Network debugging prompt
Explain why traffic from 192.168.10.5 to api.internal-corp.com port 443 returns a 503.
Explain why traffic from [IP_1] to [DOMAIN_1] port 443 returns a 503.
Code review prompt with credentials
Review this config: host=db.prod.internal user=admin password=s3cr3t!
Review this config: host=[DOMAIN_1] user=admin password=[API_1]
- 1.
Google Cloud, "Service Specific Terms," Section 18, cloud.google.com, accessed June 2026. https://cloud.google.com/terms/service-terms
- 2.
Regulation (EU) 2016/679, Article 46, legislation.gov.uk, 2016. https://www.legislation.gov.uk/eur/2016/679/article/46/adopted?view=plain
- 3.
Kyle Wiggers, "Google saves your conversations with Gemini for years by default," TechCrunch, February 2024. https://techcrunch.com/2024/02/08/google-saves-your-conversations-with-gemini-for-years-by-default/
- 4.
Google, "Upload & analyze files in Gemini Apps," support.google.com, accessed June 2026. https://support.google.com/gemini/answer/14903178