How to Extract Data from Text with AI in n8n (Names, Dates, Amounts)

Customers write in free text: “Please book 3 tickets for Friday”. Workflows need fields. An AI step can bridge them.

The pattern

  1. Receive the text.
  2. Ask the model to return specific fields, such as name, date and quantity, in a fixed JSON format.
  3. Validate the result.
  4. 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

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

Want to learn n8n hands-on?

Join our 15-day live, trainer-led n8n training.

Book Free Counselling
WhatsApp Call Enquiry

Request A Callback

Talk To Our Expert

We use your details only to contact you about this training.