{"product_id":"n8n-document-q-a-webhook-pinecone-openai-cohere-drive","title":"n8n Document Q\u0026A Webhook: Pinecone + OpenAI + Cohere + Drive","description":"\u003ch3\u003eTurn your documents into a Pinecone-powered Q\u0026amp;A chatbot—complete with page-quoted answers and Google Drive links\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow exposes a webhook that answers questions over your own document knowledge base. It searches \u003cstrong\u003ePinecone\u003c\/strong\u003e using \u003cstrong\u003eOpenAI embeddings\u003c\/strong\u003e, reranks results with \u003cstrong\u003eCohere\u003c\/strong\u003e, generates an answer with \u003cstrong\u003eexact quoted sources\u003c\/strong\u003e, then pulls the referenced files from \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e with both view and direct download URLs.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives a POST webhook\u003c\/strong\u003e request with the user’s question in the \u003ccode\u003emessage\u003c\/code\u003e field.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSearches your Pinecone knowledge base\u003c\/strong\u003e using OpenAI embeddings.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReranks top matches\u003c\/strong\u003e with Cohere to improve relevance.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGenerates an answer\u003c\/strong\u003e using an OpenAI chat model, including the \u003cstrong\u003edocument name\u003c\/strong\u003e, \u003cstrong\u003epage number\u003c\/strong\u003e, and an \u003cstrong\u003eexact supporting quote\u003c\/strong\u003e (with \u003cstrong\u003eGoogle Gemini as fallback\u003c\/strong\u003e).\u003c\/li\u003e\n  \u003cli\u003eRuns a second OpenAI-based agent to \u003cstrong\u003eextract only referenced source file names\u003c\/strong\u003e into structured JSON.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSplits the file-name list\u003c\/strong\u003e and searches \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e to retrieve each file’s ID.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eBuilds Drive view + download links\u003c\/strong\u003e for the matched files and responds to the webhook with the AI answer plus the assembled source links.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eProvide support teams with a \u003cstrong\u003edocument Q\u0026amp;A webhook\u003c\/strong\u003e for internal policies, SOPs, or manuals.\u003c\/li\u003e\n  \u003cli\u003eGive SaaS operators instant answers with \u003cstrong\u003equoted evidence\u003c\/strong\u003e and clickable \u003cstrong\u003eGoogle Drive sources\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eBuild a custom “ask our docs” interface that leverages \u003cstrong\u003en8n + Pinecone + OpenAI\u003c\/strong\u003e without manual citations.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations \/ nodes:\u003c\/strong\u003e webhook, code, split out, sticky note, Google Drive, and \u003ccode\u003en8n-nodes-langchainagent\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAI components:\u003c\/strong\u003e OpenAI embeddings + OpenAI chat (Gemini fallback) and Cohere reranking.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eConfiguration:\u003c\/strong\u003e add credentials for OpenAI, Pinecone, Cohere, Google Gemini, and Google Drive; set your Pinecone index name (replace \u003ccode\u003eYOUR_PINECONE_INDEX_NAME\u003c\/code\u003e).\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45872821567667,"sku":"N8N-18470","price":49.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/20isfORkhQQc2G6ryzFwH_QRRSioJp.png?v=1787217156","url":"https:\/\/buyflowscripts.com\/products\/n8n-document-q-a-webhook-pinecone-openai-cohere-drive","provider":"N8N Commerce","version":"1.0","type":"link"}