Automation library · Chat assistants

Multi-agent healthcare assistant with WhatsApp and OpenAI

Started by an incoming WhatsApp message, and works across Google Sheets and WhatsApp. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 49 steps, 4 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

49 stepsLarge: read it before trusting it with anything live
4Branches: places the flow splits
0Loops or waits
2Services it connects to

The flow

Starts it 1Model 20Logic 10Service 18

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

  1. 1MemoryMemory Postgres ChatModel
  2. 2OpenAILm Chat Open AiModel
  3. 3WATriggerWhats App triggerStarts it
  4. 4create_patientGoogle Sheets ToolService
  5. 5CalculatorTool CalculatorModel
  6. 6get_last_patient_idGoogle Sheets ToolService
  7. 7Memory1Memory Postgres ChatModel
  8. 8OpenAI1Lm Chat Open AiModel
  9. 9get_clinicsGoogle Sheets ToolService
  10. 10get_doctorsGoogle Sheets ToolService
  11. 11find_patientGoogle Sheets ToolService
  12. 12create_appointmentGoogle Sheets ToolService
  13. 13get_availabilityGoogle Sheets ToolService
  14. 14find_last_entry_idGoogle Sheets ToolService
  15. 15Calculator1Tool CalculatorModel
  16. 16Memory2Memory Postgres ChatModel
  17. 17OpenAI2Lm Chat Open AiModel
  18. 18OpenAI3Lm Chat Open AiModel
  19. 19Memory3Memory Postgres ChatModel
  20. 20OpenAI4Lm Chat Open AiModel
  21. 21Memory4Memory Postgres ChatModel
  22. 22Appointment SystemAgentModel
  23. 23SwitchSwitchLogic
  24. 24Register Patient ToolAgent ToolModel
  25. 25Appointment Scheduler ToolAgent ToolModel
  26. 26Report Analyzer ToolAgent ToolModel
  27. 27Prescription Medicine Analyzer ToolAgent ToolModel
  28. 28responseIfLogic
  29. 29Analyzing Image TextWhats AppService
  30. 30Get DocumentWhats AppService
  31. 31Get Audio URLWhats AppService
  32. 32PrepareInputCodeLogic
  33. 33Generate AudioOpen AiModel
  34. 34Text MessageWhats AppService
  35. 35Get Image URLWhats AppService
  36. 36Download DocumentHttp RequestService
  37. 37Download AudioHttp RequestService
  38. 38Text PromptSetLogic
  39. 39CodeCodeLogic
  40. 40Download ImageHttp RequestService
  41. 41If PDF FileIfLogic
  42. 42Transcribe AudioOpen AiModel
  43. 43IfIfLogic
  44. 44Audio ResponseWhats AppService
  45. 45Analyze ImageOpen AiModel
  46. 46Extract from PDF FileExtract From FileService
  47. 47Audio PromptSetLogic
  48. 48Image PromptSetLogic
  49. 49Document PromptSetLogic

How it's built

Starts on
An incoming WhatsApp message
Steps
49, with 4 branches
Size
Large: read it before trusting it with anything live
Connects to
Google Sheets, WhatsApp
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 and WhatsApp accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an incoming WhatsApp message.

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