Automation library · Setup and learning

Expose workflows as an MCP server for Claude and OpenAI agents

Started by someone opening a chat with it, and works across n8n data table. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 36 steps, 3 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

36 stepsLarge: read it before trusting it with anything live
3Branches: places the flow splits
0Loops or waits
1Service it connects to

The flow

Starts it 3Model 9Logic 18Service 6

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

  1. 1search_workflowsTool WorkflowModel
  2. 2add_workflowTool WorkflowModel
  3. 3remove_workflowTool WorkflowModel
  4. 4list_workflowsTool WorkflowModel
  5. 5execute_workflowTool WorkflowModel
  6. 6When executed by MCP toolExecute Workflow triggerStarts it
  7. 7When chat message receivedChat triggerStarts it
  8. 8OpenAI Chat ModelLm Chat Open AiModel
  9. 9Conversation memoryMemory Buffer WindowModel
  10. 10n8n workflows MCP clientMcp Client ToolModel
  11. 11n8n workflows MCP serverMcp triggerStarts it
  12. 12ConfigurationSetLogic
  13. 13Workflow runner agentAgentModel
  14. 14Route by operationSwitchLogic
  15. 15Get MCP-tagged workflowsN8nService
  16. 16Get MCP-tagged workflows for addN8nService
  17. 17Split workflow IDsSetLogic
  18. 18Get available workflowsData TableService
  19. 19Check workflow is availableData TableService
  20. 20Format workflow profilesSetLogic
  21. 21Keep only requested workflowsFilterLogic
  22. 22One item per workflow IDSplit OutLogic
  23. 23Return available poolSetLogic
  24. 24Workflow available?IfLogic
  25. 25Return search resultsAggregateLogic
  26. 26Requested workflows found?IfLogic
  27. 27Remove from available poolData TableService
  28. 28Prepare input parametersSetLogic
  29. 29Report execute errorSetLogic
  30. 30Format workflow profiles for addSetLogic
  31. 31Report add errorSetLogic
  32. 32Confirm workflows removedSetLogic
  33. 33Run the selected workflowExecute WorkflowLogic
  34. 34Save to available poolData TableService
  35. 35Return execution resultAggregateLogic
  36. 36Confirm workflows addedSetLogic

How it's built

Starts on
Someone opening a chat with it
Steps
36, with 3 branches
Size
Large: read it before trusting it with anything live
Connects to
n8n data table
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, 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. 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 36 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 36 steps before you point it at anything that matters.