Automation library · Customer support

Run an AI student helpdesk with OpenAI and Google Sheets

Started by someone opening a chat with it, and works across Gmail, Google Sheets and Slack. It hands the judgement calls to OpenAI. 20 steps, 2 branches: a working afternoon to understand properly.

MediumCalls a model: OpenAI

20 stepsMedium: a working afternoon
2Branches: places the flow splits
0Loops or waits
3Services it connects to

The flow

Starts it 3Model 1Logic 9Service 7

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

  1. 1On Workflow ErrorError triggerStarts it
  2. 2Chat Message ReceivedChat triggerStarts it
  3. 3Weekly Report Cron, Every Monday 9 AMSchedule triggerStarts it
  4. 4Slack, Send Workflow Error AlertSlackService
  5. 5Extract Session & MessageCodeLogic
  6. 6Read All Conversation LogsGoogle SheetsService
  7. 7Build Conversation ContextCodeLogic
  8. 8Calculate Weekly MetricsCodeLogic
  9. 9Fetch Knowledge BaseGoogle SheetsService
  10. 10Merge Context and KBMergeLogic
  11. 11Email Weekly Report to AdminGmailService
  12. 12Format Knowledge Base for PromptCodeLogic
  13. 13Generate AI Reply via GPT-4o-miniOpen AiModel
  14. 14Parse Reply and Check Escalation FlagsCodeLogic
  15. 15Should Escalate to Human?IfLogic
  16. 16Alert Counsellor on SlackSlackService
  17. 17Prepare Session State for SaveCodeLogic
  18. 18Was Query Unresolved?IfLogic
  19. 19Log Unresolved Query to FAQ Gaps SheetGoogle SheetsService
  20. 20Append Conversation to Log SheetGoogle SheetsService

How it's built

Starts on
Someone opening a chat with it
Steps
20, with 2 branches
Size
Medium: a working afternoon
Connects to
Gmail, Google Sheets, Slack
Model
OpenAI

Questions

What does it need to run?

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

What starts it?

It starts on someone opening a chat with it.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 20 steps is enough that you should read each one before running it.

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 20 steps before you point it at anything that matters.