Add a Chat-GPT, GPT-3, GPT-4 model / LLM to generate JSON flows & integrate directly into n8n

The idea is:

N8N has the distinction of being the only workflow builder I know of that can represent flows in JSON

JSON as we know, is just text.

Large language models like GPT-4 do very well at understanding the patterns in text to be able to handle all kinds of requests that can be expressed and answered in text

Therefore, I believe that n8n has a unique opportunity to be the first workflow builder than can have first-class support for large language models to help design workflows for you just by describing what you want.

That would open this tool up immediately to all kinds of non-technical folks to build workflows and probably garner tons of attention for n8n in the press which usually means more funding and contributions to the community.

This is something I’m personally VERY interested in and would like to actively contribute to (I’ve been experimenting with prompting ChatGPT and had some initial success in having it generate workflow JSONs for n8n so I know that the concept works)

My use case:

I would like something like the following prompt to produce a perfect workflow represented in JSON when I ask a model:

Please make a workflow that has a typeform form as a trigger, with fields that take a name, phone, and email then store this information into a postgres database while validating the email and phone number either with regex or external services / nodes that can achieve satisfactory validation

I think it would be beneficial to add this because:

  1. LLMs are the future
  2. It would bring a lot of attention to n8n ecosystem and potentially be a great paid feature
  3. It would make n8n more accessible to a general audience
  4. It would likely explode the usage of the tool and produce a huge variety of template flows
  5. Other workflow builders are doing this already:

Any resources to support this?

Ask ChatGPT using GPT-4 to generate a JSON workflow for n8n, observe the results

Are you willing to work on this?


Hey @chrisgereina,

This has been something I have been interested in for a while, We actually had a community member who made something last year that would make workflows from a prompt. I am not sure how accurate it is now but it was a great concept.

1 Like

@Jon love to hear it :slight_smile: - do you want to upvote this post to get more eyes on it? I think if we bring the community together we can likely achieve it and it would be a very beautiful thing

Hey @chrisgereina,

I voted on the internal request for this same thing :slight_smile:

Train? Nah, I don’t think it’s necessary to train a whole LLM (which is pretty expensive and time consuming btw) but rather we could use something like langchain to digest documentation and create a chain that produces valid n8n flows. LLM would be OpenAI or whatever you choose, probably cloud based

I think you mean this N8n AI workflow maker

@Jon i couldn’t find it in feature request. how can i upvote to get this added?

Hey @pooria,

Which request are you looking for? We are already working on adding some new stuff which I think you may have noticed :slight_smile:

1 Like

Two things @Jon

  1. Text to N8N: Using an LLM of your choice (e.g. your own api key) to create N8N workflows from text prompts and maybe having an AutoGPT agent of sorts to recheck the workflow for you and ask you questions to update it

  2. Having LLM capabilities particularly like Langchain in N8N.

Haven’t seen the updates. I’m on 1.4.1 self hosted

1 was an internal request which isn’t public and the other is here: 🦜⛓️ LangChain - Memory + Chat - #19 by pooria which you have already commented on :slight_smile:

Ok gotcha.

Yup in the other thread.

Thx :slight_smile: