Problem
A team keeps its policies in a Drive folder nobody reads, and the same questions get asked in Slack every week. The answer has to be right, cite where it came from, and say “the documents don’t cover that” when they don’t. And the team wants it in the tools they already run, maintained by people who aren’t Python developers.
System
Three n8n workflows: ingestion (Drive → text → chunks → embeddings → Pinecone, 38 nodes, keeps the index in sync as files change), query (Slack /ask → retrieve → cited answer, 25 nodes), and a shared error handler (8 nodes). Answers come back as the answer plus a Sources list with document name, page and department.
Worth knowing
The JavaScript that runs inside the n8n Code nodes is kept as real, testable modules in src/lib/, and a build step assembles one file per Code node from them. That’s how an n8n project gets 131 tests: the chunking, citation formatting and provider logic are tested with plain node --test, and the workflow JSON is generated rather than hand-edited. It’s the answer to the usual objection that n8n automations can’t be engineered properly.