Customers write in free text: “Please book 3 tickets for Friday”. Workflows need fields. An AI step can bridge them.
The pattern
- Receive the text.
- Ask the model to return specific fields, such as name, date and quantity, in a fixed JSON format.
- Validate the result.
- Continue the workflow.
Write a strict prompt
List the fields, say what to return when a field is missing and give one or two examples.
Use structured output
n8n supports structured output parsing so the response follows a schema, which makes later nodes dependable.
Validate
Check that dates make sense and amounts are numbers. Send unclear cases to a person.
Limits
Models can misread. Test on real examples, including messy ones, and keep a log to review mistakes.
Related
Setting up a model and working with JSON.
Quick answers
Can AI turn messages into fields?
Yes, with a strict prompt and structured output.
How do I trust the result?
Validate it and send unclear cases to a person.
What if a field is missing?
Tell the model to return empty or null.
Related reading
- How to Build a WhatsApp AI Chatbot with n8n: What to Know First
- How to Use OpenAI, Gemini or Claude Models in n8n
- How to Control AI Costs in n8n Workflows
Not sure where to start?
Tell us your goal, whether it is your own business, freelancing, studies or a job, and we will say honestly if our 15-day live n8n course is the right fit.
See the 15-day n8n training | Find your city | Book free counselling