n8n

How to Automate Google Drive QnA for Customer Support?

Turn your PDFs into a smart chat for support. New files in Google Drive are indexed so your team and customers get quick answers. Great for product manuals, policies, and onboarding packs.

When a file appears in a chosen Drive folder, the flow downloads it, extracts text from the PDF, cleans the text, and splits it into readable chunks. The cleaner removes line breaks and special characters so the content is easy to process. Text is split with a chunk size of 3000 characters and a 300 character overlap to keep context. Google Gemini creates vector embeddings, and Pinecone stores them for fast search across large document sets. A chat webhook receives a user question, generates query embeddings, pulls the best matching chunks from Pinecone, and builds a clear prompt with sources. The OpenRouter chat model then writes the answer using the provided context, and the AI agent formats the reply in a clear structure.

Set the Drive folder to watch and enter your Pinecone index name. Add API keys for Google Gemini and OpenRouter, then test by uploading a PDF and sending a sample question to the chat endpoint. Expect faster replies, fewer repeat tickets, and a self service channel that grows as your library grows. This setup works for help centers, internal wikis, and product knowledge for frontline teams.

What are the key features?

  • Watches a specific Google Drive folder and reacts when new files arrive
  • Downloads PDFs and extracts text for indexing
  • Cleans text to remove line breaks and special characters for better parsing
  • Splits content into 3000 character chunks with 300 character overlap to keep context
  • Builds document and query embeddings using Google Gemini
  • Stores and retrieves context from a Pinecone vector index
  • Receives questions through a chat webhook and builds a prompt with sources
  • Generates final answers using an OpenRouter chat model
  • AI agent applies a clear response format for easy reading

What are the benefits?

  • Reduce document search time from 30 minutes to 30 seconds
  • Answer 60 to 80 percent of repeat questions without an agent
  • Improve response accuracy by 30 percent with sourced context
  • Handle 50 plus concurrent chat sessions using vector search
  • Connect Google Drive, Gemini, Pinecone, and OpenRouter in one flow

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, Pinecone, Google Gemini and OpenRouter. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, open the Google Drive nodes and create a new Google Drive OAuth2 credential. Sign in with the account that owns the folder and grant file access permissions.
  4. In the Pinecone node, create a new Pinecone API credential. Copy your API key from the Pinecone console and paste it into n8n. Confirm the index name matches your target index.
  5. For embeddings, open the Google Gemini embeddings nodes and create a new credential. Use your Google AI API key from the official API page and save it in n8n.
  6. In the OpenRouter chat model node, create a new OpenRouter API credential. Copy your OpenRouter API key from your account dashboard and add it to n8n.
  7. Open the Google Drive trigger node and select the folder to watch. Set the event to file created so new uploads start the indexing flow.
  8. Review the text cleaning code step. Keep the default cleaning rules or adjust them if your PDFs have special formatting that should be preserved.
  9. Check the text splitter settings. The default chunk size is 3000 with 300 overlap. Adjust only if you see context being cut off or responses missing detail.
  10. Test ingestion: upload a small PDF to the watched folder. In n8n, view the run to confirm extract, clean, split, embed, and Pinecone insert steps succeed.
  11. Get the Chat Message Trigger webhook URL from the node. Send a POST request with a JSON body containing chatInput to test retrieval and response. You can use Postman or curl for this step.
  12. Troubleshooting: if no results return, verify the Pinecone index name matches in all nodes, confirm API keys are valid, ensure the Google Drive file is a PDF, and check that embeddings model names are set to models/text-embedding-004.

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.

OpenRouter

Sign up

Free models: $0 via API, 20 requests/min; 50/day or 1000/day with ≥10 credits

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.