Automation library · AI assistants

Auto workflow positioning with OpenAI and in-memory vectors

Started by another system calling it, and works across in-memory vectors. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 31 steps, 2 branches, 1 loop or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

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

The flow

Starts it 4Model 10Logic 13Service 4

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

  1. 1When clicking ‘Test workflow’Manual triggerStarts it
  2. 2OpenAI Chat ModelLm Chat Open AiModel
  3. 3Window Buffer MemoryMemory Buffer WindowModel
  4. 4Embeddings OpenAIEmbeddings Open AiModel
  5. 5Dummy ToolTool Http RequestModel
  6. 6Dummy Tool (1)Tool Http RequestModel
  7. 7OpenAI Chat Model (1)Lm Chat Open AiModel
  8. 8POST /workflow/magic/position/idWebhookStarts it
  9. 9Schedule TriggerSchedule triggerStarts it
  10. 10Magic PositioningHttp RequestService
  11. 11IFIfLogic
  12. 12AI AgentAgentModel
  13. 13In-Memory Vector StoreVector Store In MemoryModel
  14. 14Question and Answer ChainChain Retrieval QaModel
  15. 15Get n8n WorkflowN8nService
  16. 16Dummy NodeNo OpLogic
  17. 17Vector Store RetrieverRetriever Vector StoreModel
  18. 18Magic Positioning IA2SHttp RequestService
  19. 19Dummy Node (1)No OpLogic
  20. 20Dummy Node (3)No OpLogic
  21. 21Update n8n WorkflowN8nService
  22. 22Loop Over ItemsSplit In BatchesLogic
  23. 23Dummy Node (4)No OpLogic
  24. 24Simple Webhook ResponseRespond To WebhookStarts it
  25. 25Dummy Node (2)No OpLogic
  26. 26Dummy Node (5)No OpLogic
  27. 27SwitchSwitchLogic
  28. 28Dummy Node (6)No OpLogic
  29. 29Dummy Node (7)No OpLogic
  30. 30Dummy Node (8)No OpLogic
  31. 31Dummy Node (9)No OpLogic

How it's built

Starts on
Another system calling it
Steps
31, with 2 branches, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
in-memory 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 in-memory vectors account, 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 31 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 31 steps before you point it at anything that matters.