Automation library · Setup and learning

Agentic email triage & inbox manager n8n template with OpenAI

Started by another system calling it, and works across Gmail and Pinecone. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 27 steps: 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
0Branches: places the flow splits
0Loops or waits
2Services it connects to

The flow

Starts it 1Model 12Logic 6Service 8

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

  1. 1Recursive Character Text SplitterText Splitter Recursive Character Text SplitterModel
  2. 2VECTOR_EMBED TRIAGE REPORT DATAEmbeddings Open AiModel
  3. 3POST WEBHOOK - Request From FrontendWebhookStarts it
  4. 4VECTOR_EMBED TRIAGE REPORT DATA1Embeddings Open AiModel
  5. 5Recursive Character Text Splitter1Text Splitter Recursive Character Text SplitterModel
  6. 6Default Data LoaderDocument Default Data LoaderModel
  7. 7PUSH TO VECTOR DATA LAKE - EMAIL DATA SPACEVector Store PineconeModel
  8. 8GET Many - User Gmail Messages - Extended Supplemental DataGmailService
  9. 9PUSH TO VECTOR - RAW RESPONSE - EMAIL DATA SPACEVector Store PineconeModel
  10. 10LOAD CONTEXT RESPONSE FOR MEMORY - 2Document Default Data LoaderModel
  11. 11FUNC - AGGREGATE - TRIAGEAggregateLogic
  12. 12GET EMAILS - REWIND - 96 HOURSGmailService
  13. 13FUNC - AGGREGATE - REWINDAggregateLogic
  14. 14POST - MICRO_AGENT - INPUT COMPREHENSION ASSISTANTOpen AiModel
  15. 15POST Request to MICRO_AGENT - EMAIL TRIAGE ASSISTANTOpen AiModel
  16. 16POST to EMAIL WRITING ASSISTANTOpen AiModel
  17. 17COMPREHEND + EXTRACT - DETECTED ENTITIESAws ComprehendService
  18. 18DISPLAY_CONVERT - Markdown to HTMLMarkdownLogic
  19. 19AGGREGATE ENTITIES SEMANTIC VALUESAggregateLogic
  20. 20GET MANY - LATEST EMAILS - from Gmail - FOR DAILY SUMMARYGmailService
  21. 21AGGREGATE TO SINGLE - DAILY SUMMARYAggregateLogic
  22. 22M_AGENT - SUMMARIZE LAST 50 - DAILY SUMMARYOpen AiModel
  23. 23MarkdownMarkdownLogic
  24. 24GMAIL DRAFT - CREATE REVIEW DRAFTGmailService
  25. 25PLATFORM_CRUD - MAKE NEW USER - AI INBOXBubbleService
  26. 26POST CRUD - Core Response - BubbleBubbleService
  27. 27CRUD on Feed - LOADING ACTION STOPBubbleService

How it's built

Starts on
Another system calling it
Steps
27
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Pinecone
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 Gmail and Pinecone accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

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.