Automation library · Data collection

Route chatbot requests to humans with OpenAI and Google Sheets

Started by an event in a connected app, and works across Google Sheets. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 21 steps, 3 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

21 stepsLarge: read it before trusting it with anything live
3Branches: places the flow splits
0Loops or waits
1Service it connects to

The flow

Starts it 1Model 3Logic 13Service 4

The steps in the order they run, from what starts it.

  1. 1When clicking ‘Execute workflow’Manual triggerStarts it
  2. 2OpenAI Chat ModelLm Chat Open AiModel
  3. 3Simple MemoryMemory Buffer WindowModel
  4. 4Set, Workflow ConfigSetLogic
  5. 5AI AgentAgentModel
  6. 6Set, Input MappingSetLogic
  7. 7Set, Extract AI ResponseSetLogic
  8. 8Sheets, Lookup Processed MessageGoogle SheetsService
  9. 9If, Needs Escalation?IfLogic
  10. 10Set, Normalize Lookup ResultSetLogic
  11. 11Sheets, Upsert EscalationGoogle SheetsService
  12. 12Set, Normal ResponseSetLogic
  13. 13If, Already Processed?IfLogic
  14. 14Set, Escalation MessageSetLogic
  15. 15NoOp, Duplicate IgnoredNo OpLogic
  16. 16Sheets, Append Processed MessageGoogle SheetsService
  17. 17Set, Notify HumanSetLogic
  18. 18Sheets, Lookup Escalation StatusGoogle SheetsService
  19. 19Set, Normalize Escalation StatusSetLogic
  20. 20If, Is Bot Muted?IfLogic
  21. 21NoOp, Human is HandlingNo OpLogic

How it's built

Starts on
An event in a connected app
Steps
21, with 3 branches
Size
Large: read it before trusting it with anything live
Connects to
Google Sheets
Model
OpenAI
Retrieval
Answers are drawn from documents you supply, not from the model alone

Questions

What does it need to run?

An n8n account, plus your own Google Sheets account, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

Does it use AI?

Yes. It calls OpenAI. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 21 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

Before you run it

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 21 steps before you point it at anything that matters.