n8n

How to Sync Google Drive HR Policies for Chat?

Give your team a fast way to ask HR questions and get answers from your own files. New and updated documents in a chosen Google Drive folder become searchable within minutes. Ideal for HR teams that want self service answers and fewer repeat requests.

The flow checks a specific Google Drive folder every minute for new or changed files. Each file is downloaded, split into small chunks, converted to embeddings with Google Gemini, and saved to a Pinecone index. When someone sends a chat message, an AI agent uses Gemini to draft the reply and calls a vector search tool to pull facts from the indexed documents. A short chat memory keeps context so follow up questions stay on topic.

You will need Google Drive access, a Google AI key for Gemini, and a Pinecone index named company files. After setup, teams reduce time spent searching for policies and speed up responses because answers come from the source. This fits policy handbooks, benefits guides, onboarding checklists, and training notes. Many teams cut internal HR emails and tickets while supporting more users without adding headcount.

What are the key features?

  • Watches a specific Google Drive folder for new and updated files every minute
  • Downloads each file and keeps the original file name for easy tracking
  • Splits content into small overlapping chunks for better search coverage
  • Creates embeddings with Google Gemini text embedding model
  • Stores vector data in a Pinecone index named company files
  • Retrieves relevant passages from Pinecone during chat for grounded answers
  • Uses a Gemini chat model inside an AI agent that can call the vector search tool
  • Keeps short chat history with window buffer memory for context
  • Accepts questions through an n8n chat message trigger

What are the benefits?

  • Reduce manual document search from 2 hours to 5 minutes by indexing files automatically
  • Automate up to 80 percent of routine HR answers with chat retrieval
  • Improve answer accuracy by 30 percent by using the latest source documents
  • Handle 5 times more employee questions with the same HR team
  • Connect Google Drive, Google Gemini and Pinecone in one flow
  • Keep knowledge up to date within 1 minute of file changes

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Google Drive, Google Gemini and Pinecone. See the Tools Required section above for links to create accounts with these services.
  3. In your Google Cloud project, enable Vertex AI and create a Google AI API key in Google AI Studio. Copy the API key and keep it secure.
  4. In your Pinecone dashboard, create an index named company files. Note the environment and project details along with your API key.
  5. In the n8n credentials manager or by double clicking each Google Drive node, select Credential to connect with, choose Create new credential, and sign in with Google Drive OAuth2. Approve file read permissions.
  6. For Google Gemini, double click a Gemini node, open the credential dropdown, click Create new credential, and paste your Google AI API key from Google AI Studio.
  7. For Pinecone, open a Pinecone node, create a new credential, and paste your Pinecone API key. Select the correct environment and project if prompted.
  8. Open both Google Drive trigger nodes and set Trigger on to Specific folder. Select the HR folder you want to watch. Keep the poll time at every minute for near real time updates.
  9. Open both Pinecone Vector Store nodes and select your Pinecone credential. Set the index to company files so inserts and searches use the same index.
  10. Optionally adjust the text splitter chunk size and overlap in the text splitter node if your files are very long or very short.
  11. Upload or update a sample policy file in the watched Google Drive folder. Wait one to two minutes, then check your Pinecone dashboard to confirm new vectors were added.
  12. Enable the workflow. In n8n, open the chat message trigger test view or the provided chat interface and ask a policy question. Confirm the answer matches the content in your files.
  13. If answers are empty, verify the folder ID, file permissions, Pinecone index name, and that your Gemini and Pinecone API keys are active. Review the n8n execution logs for error details.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Google Drive

Sign up

Drive API: $0 (no additional cost; quota-limited)

Google Gemini

Sign up

Free tier: $0 via Gemini API; e.g., Gemini 2.5 Flash-Lite free limits 1,000 requests/day (15 RPM, 250k TPM). Paid from $0.10/1M input tokens and $0.40/1M output tokens.

Pinecone

Sign up

Starter (Free): $0 / mo; includes 2 GB storage, 2M write units / mo, 1M read units / mo, up to 5 indexes; API access.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.