Avoid Asking Redundant Questions with Dynamically Generated Forms using OpenAI
Ready for 3.0What this workflow does
This AI workflow has 11 nodes and runs when someone submits an n8n form (“Get in Touch”). Along the way it connects OpenAI Chat Model.
How it runs
Trigger: When someone submits an n8n form (“Get in Touch”).
- Get Business Overview (n8n Form): shows the next form page
- Analyse Response (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model; output parser: Structured Output Parser
- Split Out: splits a list into separate items
- Remove Already Answered Questions (Filter): keeps only the items that match a condition
- Prepare For Form Generation (Edit Fields (Set)): sets 3 fields: fieldLabel, requiredField, fieldType
- Aggregate: combines items into one
- Clarification Questions (n8n Form): shows the next form page
- End Form (n8n Form): shows the next form page
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (9)
- OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - n8n Form
n8n-nodes-base.form - n8n Form Trigger
n8n-nodes-base.formTrigger - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Filter
n8n-nodes-base.filter - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Split Out
n8n-nodes-base.splitOut - Edit Fields (Set)
n8n-nodes-base.set - Aggregate
n8n-nodes-base.aggregate
From the author
Avoid Asking Redundant Questions with Dynamically Generated Forms using OpenAI Target Audience This workflow has been built for those who require a form to capture as much data as possible as well as the answers to predefined questions, whilst optimising the…