How to build an Agentforce knowledge agent with Data Cloud and Google Drive
July 23, 2026
Salesforce
How to build an Agentforce knowledge agent with Data Cloud and Google Drive
A step-by-step guide to building an Agentforce agent that searches documents stored in Google Drive and returns grounded answers with source links.
Company knowledge often sits across process guides, policies, product manuals, and shared folders. Finding one answer may require opening several files, searching through long documents, or asking a colleague who knows where the information is stored.
An Agentforce agent gives employees a faster way to use that knowledge. With Agentforce Data Cloud, the agent can search approved documents, find passages related to a question, and provide an answer with links to the original sources.
This guide explains how to connect Agentforce and Data Cloud for that purpose. Google Drive holds the documents, Data Cloud imports and indexes their content, and Agentforce turns the retrieved information into clear answers.
You will set up the Salesforce data integration, create a search index and retriever, build a grounded prompt template, and configure the agent in Agentforce Studio. The final agent will answer questions based on company documents, cite its sources, and receive updated knowledge when files change.
What are Agentforce and Data Cloud?
Salesforce Agentforce is a platform for building AI agents that can answer questions, use company data, and carry out approved actions. An Agentforce agent can support employees or customers while following defined instructions and access rules. Teams use Agentforce Studio to build, test, deploy, and monitor these agents.
Salesforce Data Cloud, now called Data 360, connects and prepares structured and unstructured information for use across Salesforce. In this guide, the Salesforce data integration imports documents from Google Drive, divides them into searchable passages, creates an index, and retrieves relevant content when an employee asks a question.
Why connect Agentforce and Data Cloud?
Employees often need answers hidden in long process documents, internal websites, product manuals, or shared folders. Finding one detail may require opening several pages, searching through a large document, or asking a colleague who already knows where the information is stored.
Connecting Agentforce and Data Cloud gives employees a simpler way to use that knowledge. Data Cloud imports and indexes approved files from a shared drive, while the Agentforce agent searches the indexed content and answers questions related to those documents. Employees can ask a direct question instead of reading an entire manual or searching an internal site.
A Salesforce Agentforce Data Cloud setup can also return the file name and source URL with each answer. Users can open the original document, check the context, and confirm that the response is based on an approved source rather than general model knowledge.
The connection between Data Cloud and Agentforce also helps keep answers current. Teams can add new files or update existing documents in the shared drive. Data Cloud imports and indexes those changes according to the configured refresh schedule, making the updated knowledge available to the agent without rebuilding it each time.
Common business use cases of Agentforce and Data Cloud
Companies can use Agentforce and Data Cloud to make approved knowledge easier to access across departments.
Employee support
An employee-facing agent can answer common questions about leave policies, expenses, payroll dates, IT access, equipment requests, and workplace procedures. Employees receive a direct answer with a link to the relevant policy, while HR, finance, and IT teams spend less time responding to repeated requests.
Customer service
Service representatives can ask the agent for troubleshooting steps, return policies, warranty conditions, escalation rules, or case-handling instructions. The agent retrieves information from approved service documents, helping representatives give more consistent answers without searching through several folders. Learn more about related capabilities in our guide to Salesforce Service Cloud features.
Sales
Sales teams can use the agent to find product details, pricing rules, qualification criteria, proposal guidance, and answers to common buyer questions. New information becomes available after the source files are updated and processed by Data Cloud, reducing reliance on old presentations or saved copies.
Operations
Operations teams can ask how to complete a process, which approval is required, who owns the next step, or when an issue should be escalated. The agent can turn long operating manuals into clear instructions while linking employees to the full procedure when more context is needed.
Employee onboarding
New hires can use the agent to learn how internal tools, policies, and processes work. Instead of asking a manager where each document is stored, they can request role-specific guidance and open the cited source when they need further details. The agent should support formal onboarding rather than replace training, manager guidance, or required policy reviews.
Partner knowledge
Partners can receive answers based on approved program rules, product documents, support instructions, and sales materials. Access controls help ensure that each user sees only the information available to their role. For companies managing partners through Salesforce portals, our Salesforce Experience Cloud guide explains how portal access, content, and self-service can work together.
Does Agentforce require Data Cloud?
No, Agentforce does not require Data Cloud for every use case. An agent can work with Salesforce records, flows, Apex, APIs, prompt templates, and other approved actions without Data Cloud. The right setup depends on what the agent needs to know and do. Our Agentforce implementation guide explains the main planning and technical choices.
Data Cloud becomes useful when an agent needs to search connected company information and ground its answers in specific sources. In the setup covered here, Data Cloud:
Imports unstructured documents from Google Drive
Divides and indexes their content for search
Retrieves passages related to the user’s question
Passes file names and source URLs to the prompt
Refreshes indexed knowledge when source documents change.
Agentforce then uses the retrieved content to prepare a clear answer.
Before you begin
Company knowledge often sits in long process guides, product manuals, internal websites, and shared folders. Employees may know that an answer exists but still spend time searching for it. The setup in this guide connects a Google Shared Drive to Data Cloud and uses that content to ground an Agentforce employee agent.
Naming note: Salesforce now uses the name Data 360 for the product previously called Data Cloud. The screenshots and many setup labels in this guide still use Data Cloud, so both names appear where needed.
What the architecture does
Google Drive stores approved source documents.
The Google Drive Unstructured connector imports those documents into Data Cloud.
A search index divides and prepares the content for semantic search.
A retriever returns the passages most relevant to the employee’s question.
Prompt Builder combines the question with retrieved knowledge and returns structured JSON.
Agentforce formats the answer and shows source links when they are available.
Requirements
A Salesforce org with Data Cloud and Agentforce features available.
Data Cloud Architect or equivalent access for connections, objects, streams, indexes, and retrievers.
Einstein enabled and the Prompt Template Manager permission set.
Access to Agentforce Studio and permission to create or edit an agent.
A Google Workspace Shared Drive and a Google Cloud project.
Google Workspace admin help if your organization limits service accounts or Shared Drive membership.
One or more approved test documents that do not contain secrets or data the test users should not see.
Release check: Connector availability, permissions, labels, and limits can change between Salesforce releases. Confirm the options shown in your org before using the guide in production.
Prepare the knowledge source
Start with the documents, not the agent. Retrieval quality depends on the way the source material is written, split, named, and maintained.
Use a Shared Drive rather than a personal My Drive folder.
Keep one focused topic or common question per file where practical.
Prefer short files when a large manual can be divided without losing meaning.
Give files clear names that employees will understand in a source list.
Remove duplicate, outdated, or conflicting instructions before ingestion.
Assign an owner and review date to every source document.
Check that each intended user is allowed to see the information the agent may return.
Step 1. Create the Google service account
Data Cloud uses a Google service account to read the files available to the connector. Create the account in the same Google Cloud project where you will enable the Google Drive API.
1.1 Open the Service Accounts page
Open Google Cloud Console.
Select the correct Google Cloud project.
Go to IAM & Admin, then Service Accounts.
Select Create service account.
Open IAM & Admin and select Create service account
1.2 Name the account
Use a name that states the account’s purpose, such as data-cloud-google-drive. Add a short description so another administrator can identify the integration later.
Enter a clear service account name and description
1.3 Assign the token creator role
Assign the Service Account Token Creator role as shown in the author’s working setup and the current Salesforce preparation instructions. Follow your organization’s access review process before saving the role assignment.
Assign the Service Account Token Creator role
1.4 Create a JSON key
Open the new service account.
Go to the Keys tab.
Select Add key, then Create new key.
Choose JSON and download the file.
Open the Keys tab for the service account
Create and download a JSON private key
Security: Treat the JSON file as a credential. Do not email it, add it to source control, place it in the Shared Drive, or include its private key in screenshots. Store it only for the connection setup and follow your key rotation policy.
Step 2. Create and prepare the Google Shared Drive
2.1 Create the Shared Drive
Open Google Drive with an account that can create Shared Drives.
Open Shared drives in the left navigation.
Select New and enter a clear name for the knowledge source.
Start creating a Shared Drive from Google Drive
Enter a Shared Drive name
2.2 Give the service account access
Add the service account email from the JSON file as a member of the Shared Drive. Use the lowest access level that still lets the connector read the intended files. If your Workspace settings block the account, ask a Google Workspace administrator to review the domain policy.
2.3 Copy the Shared Drive ID
Open the Shared Drive and copy its ID from the browser address. Store the ID in your implementation notes. Do not copy the sample ID from the screenshot into your own configuration.
Find the Shared Drive ID in the Google Drive address
2.4 Add a small test document
Create one short file that contains a clear answer to a test question. A focused document makes it easier to confirm that ingestion, retrieval, answer grounding, and source links all work before you add the wider knowledge base.
Add a focused document with a known answer for testing
Step 3. Enable the Google Drive API
Return to Google Cloud Console.
Open APIs & Services, then Library.
Search for Google Drive API.
Open the result and select Enable.
Find Google Drive API in the API Library
Enable Google Drive API for the project
Step 4. Connect Google Drive to Data Cloud
The connection authorizes Data Cloud to read the files that the service account can access. Salesforce currently documents the Google Drive Unstructured connector for unstructured files such as documents and PDFs.
4.1 Create the connection
In Salesforce Setup, open Data Cloud Setup.
Under External Integrations, select Other Connectors.
Select New.
Choose Google Drive Unstructured Data and continue.
Select the Google Drive Unstructured Data connector
4.2 Map the JSON credentials
Open the JSON key locally and map its values to the connection form. Copy only the value inside each property. Do not include quotation marks or the JSON property name.
Connection field
Value from the JSON key
Client ID
client_id
Service Account Email Address
client_email
Private Key
private_key
Scopes
Content Only, as shown in the author’s setup
Check before saving: Confirm that the service account email matches the account added to the Shared Drive. A valid key cannot compensate for missing Drive access.
The Data Lake Object setup selects the Google Drive source and the Shared Drive to ingest. Salesforce then uses a linked data stream and unstructured data mapping so the content can be indexed.
5.1 Start from Data Lake Objects
Open the Data Cloud app from the App Launcher.
Go to Data Lake Objects.
Select New.
Choose From External Files.
Start a new Data Lake Object from the Data Cloud app
Select the external file source option
5.2 Select the Google Drive source
Choose Google Drive Unstructured Data, then select the connection created in Step 4. Enter the Shared Drive ID when the setup asks for a specific drive.
Select the Google Drive unstructured source
Configure the connection, Shared Drive, and object details
Validation: After saving, confirm that the object and linked stream are created and that ingestion completes without an access error. Do not continue to search setup until the test document is available in Data Cloud.
Step 6. Build the search index
A search index prepares document content for semantic retrieval. Salesforce can create a default index, but the author recommends advanced setup when you need control over file types, chunk settings, metadata, or filters.
6.1 Choose advanced setup
Create a search index for the unstructured data model object produced by the ingestion flow. Select Advanced Setup instead of accepting every default.
Start the search index with Advanced Setup
Select the unstructured data source for the index
Continue through the search index configuration
6.2 Select searchable fields and file types
Choose the fields that contain document content and source metadata. Limit ingestion to the file formats your knowledge owners will maintain. The author’s example keeps DOCX because the test knowledge base contains Word files.
Choose the content and metadata fields used by the index
6.3 Configure chunking
Chunking splits a document into passages that can be ranked against a question. Larger chunks preserve more context but may return extra text. Smaller chunks can be more precise but may separate related instructions. Start with a reasoned value, test real questions, and adjust it based on answer quality.
Include the file name and source URL in the indexed metadata when you want Agentforce to cite the original document. Add filter fields only when the agent must restrict results by a property such as file name, department, region, or audience.
Configure file selection, chunking, and fields available for filtering
6.4 Review and activate the index
Review the source, chunk settings, searchable fields, return fields, and filters. Save the index and wait until its status shows that it is ready before creating the retriever.
Review the completed search index configuration
Share:
Talk to us about Salesforce Field Service
Optimize scheduling, empower your team, and elevate customer experiences with Noltic’s Salesforce Field Service.
Explore Agentforce for Financial Services, including AI agents for banking, wealth management, and insurance, real-world use cases, key benefits, compliance capabilities, and implementation considerations.
Learn what Data 360 Salesforce is, how it works, and explore real use cases across industries. Discover benefits, implementation insights, and practical examples.
Our website uses cookies to enhance your browsing experience, provide personalized content, and analyze our traffic. You can choose to accept all cookies, customize your preferences, or decline non-essential cookies.
By clicking "Accept all" or “Save my preferences”, You expressly consent to the collection and processing of Your data as described in the Privacy Policy. At the same time, by clicking "Accept all" or “Save my preferences”, You agree to the Terms of Use of Our Services.
Our website uses cookies to enhance your browsing experience, provide personalized content, and analyze our traffic. You can choose to accept all cookies, customize your preferences, or decline non-essential cookies.
By clicking "Accept all" or “Save my preferences”, You expressly consent to the collection and processing of Your data as described in the Privacy Policy. At the same time, by clicking "Accept all" or “Save my preferences”, You agree to the Terms of Use of Our Services.
Oleksandra Petrenko is engaging and data-driven content creator focused on Salesforce solutions.
Vladyslav Petrovych
CRO/Co-founder
https://www.linkedin.com/in/vpetrovych/
Vladyslav Petrovych is Noltic's top tech guru, 18x certified Salesforce architect. Leader in driving innovation for high-load cloud solutions development.