Automation library · Data collection

Automated email responses with OpenAI and Supabase

Started by an event in a connected app, and works across Outlook, Postgres, Supabase and Supabase vectors. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 27 steps, 2 branches, 1 loop or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

27 stepsLarge: read it before trusting it with anything live
2Branches: places the flow splits
1Loop or waits
4Services it connects to

The flow

Starts it 2Model 12Logic 7Service 6

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

  1. 1Embeddings OpenAI1Embeddings Open AiModel
  2. 2Embeddings OpenAI2Embeddings Open AiModel
  3. 3Microsoft Outlook TriggerMicrosoft Outlook triggerStarts it
  4. 4JSONOutput Parser StructuredModel
  5. 54oLm Chat Open AiModel
  6. 6When Executed by Another WorkflowExecute Workflow triggerStarts it
  7. 7Embeddings OpenAI6Embeddings Open AiModel
  8. 8Recursive Character Text Splitter3Text Splitter Recursive Character Text SplitterModel
  9. 9Email Template DBVector Store SupabaseModel
  10. 10FAQ DBVector Store SupabaseModel
  11. 11Loop Over Items1Split In BatchesLogic
  12. 12Email ManagerAgentModel
  13. 13Supabase Vector Store4Vector Store SupabaseModel
  14. 14Default Data Loader3Document Default Data LoaderModel
  15. 15Clean HTMLCodeLogic
  16. 16Forward?IfLogic
  17. 17Update a row2SupabaseService
  18. 18Retrieve CategoriesPostgresService
  19. 19Reply1Microsoft OutlookService
  20. 20ReplyMicrosoft OutlookService
  21. 21Aggregate1AggregateLogic
  22. 22Outlook ForwardHttp RequestService
  23. 23Execute WorkflowExecute WorkflowLogic
  24. 24CategorizeOpen AiModel
  25. 25Spam FilterIfLogic
  26. 26Conversation RetrievalPostgresService
  27. 27FormatCodeLogic

How it's built

Starts on
An event in a connected app
Steps
27, with 2 branches, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
Outlook, Postgres, Supabase, Supabase vectors
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 Outlook, Postgres, Supabase and Supabase vectors accounts, 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 27 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 27 steps before you point it at anything that matters.