Is it possible to create n8n flow dinamically

I am planning to start using n8n as my main tool to create workflows.
Currently I am programing in Python with CrewAI.
I have a solution which needs to create a flow where the qty of agents are variable and the LLMs to be accessed as well. I want to have way I could pass these two parameters and the flow is built automatically.

  • **n8n version: 1.56.2
  • **Database (default: SQLite):I don´t know this answer
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):own
  • **Running n8n via (Docker, npm, n8n cloud, desktop app) npm
  • Operating system: windows 10

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Technically you can do that through n8n’s own API:

I do wonder thought if it wouldn’t be a lot (and I mean a LOT!) easier to just create a workflow with a number of LLMs/agents set up that are controlled through If or Switch statements?