Hana Google Drive Memory Ingestion
Overview
Hana can ingest files stored in Google Drive and convert their contents into searchable memories. This allows Hana to draw from existing documents when responding to questions, drafting messages, or performing automated actions. The ingestion pipeline is designed to handle large files, track updates, and respect organizational security controls.
Prerequisites
Account and Role Requirements
- You must be an Admin (or Super Admin) in the Hana workspace.
- Your Google account must already be connected to Hana.
OAuth Scopes
- During the first ingestion, Hana prompts you to grant Google Drive permissions.
- If scopes are missing or revoked, Hana will request reauthorization before processing the file.
File Sharing
- Hana’s service account needs access to the file in order to ingest and resync it.
- When ingestion starts, Hana adds its service account to the file with write access using your token.
- You can remove the service account from the file at any time; Hana will automatically re-add it if you reactivate the memory.
Supported File Types
File Type | Notes |
---|---|
Google Docs | Body text is extracted. |
Google Slides | Slide text is extracted. |
Google Sheets | Each row becomes an individual memory chunk. |
Text is extracted from the PDF. | |
Plain Text / Markdown | Ingests the entire text file. |
JSON | Treated as plain text for ingestion. |
Unsupported formats result in an error during ingestion.
Ingestion Workflow
- Submit a Google Drive link through the dashboard or API.
- Scope validation: Hana verifies you granted Google Drive access.
- Service account permission: Hana adds its service account to the file.
- Metadata retrieval: Hana captures file name, type, and last modified timestamp.
- Content extraction:
- Docs and Slides: Text is collected directly.
- Sheets: Rows are grouped by sheet; metadata includes sheet title and row number.
- PDFs, text, and JSON: File is downloaded and parsed.
- Chunking and hashing:
- Rows or sections are hashed to detect future changes.
- Tagging and ingestion:
- Hana enriches each chunk with metadata (e.g., sheet summary, file name).
- Chunks are stored as memories.
Progress is updated throughout the process so you can monitor retrieval and ingestion status in the dashboard.
Spreadsheet Summaries
- Hana samples the first 100 rows from each sheet to generate a concise summary.
- The summary is stored as metadata for improved retrieval and contextual responses.
Keeping Content Up to Date
Manual Resync
- You can manually trigger a resync from the dashboard to update the memory after a file changes.
Auto-Resync
- Auto-resync can be enabled for Google Drive memories.
- You choose the refresh frequency (e.g., daily). Hana checks the file for changes and re-ingests only the updated sections.
- Content hashes ensure unchanged rows or sections are skipped for efficient processing.
Revoking or Reactivating Access
Revoking
- Mark the memory as revoked in the dashboard to remove the service account’s permission.
- The memory remains in Hana but is no longer accessible for new ingestion.
Reactivating
- Change the status back to active to restore access.
- Hana re-adds the service account to the file and can resume resyncs.
Error Handling & Troubleshooting
Issue | Resolution |
---|---|
Missing OAuth scopes | Reauthorize Hana when prompted. |
Invalid or inaccessible URL | Verify the link and your own access to the file. |
Unsupported file type | Convert the file to a supported format. |
Permission errors after reactivation | Ensure the file isn’t restricted or deleted. |
Security Considerations
- Hana only accesses files explicitly shared by an admin.
- Access tokens are encrypted and never stored in plain text.
- Permissions are limited to the service account; removing the account immediately revokes Hana’s access.
Best Practices
- Ingest only relevant documents to keep the memory index clean.
- Use meaningful file names and maintain consistent folder organization for easier tracking.
- Enable auto-resync for living documents that change frequently.
- Revoke access when documents are outdated or no longer needed.
Hana’s Google Drive ingestion allows teams to harness existing documents without manual copy‑pasting. Once ingested, Drive files become part of Hana’s knowledge base, helping your team access insights and context whenever needed.
From Chat — Quick Invocations
Examples below show only @Hana …
invocations. Outputs are intentionally omitted.
@Hana what does the OKRs spreadsheet say about Marketing this quarter?
@Hana search drive memories for "webhook" and summarize the findings
@Hana compare the two Drive docs shared above; list key differences
Troubleshooting
- Missing access: Ensure you can open the file in Drive and that the Hana service account is added; re‑ingest if removed.
- Revoked scopes: If prompted, reauthorize Google Drive permissions from the ingestion flow.
- Large sheets: Summaries consider the sampled rows per sheet; refine your question for specific tabs/keywords.