Pull details out of form answers with AI
Use an AI step to find order numbers, companies and dates in free text answers, sort messages and flag urgent ones.
2 min read
On this page
People do not fill in forms the way you planned. The order number ends up in the message, the company name sits in the signature, and the real question is three paragraphs down. Adding more fields rarely helps, because every field makes the form longer. An AI step in your flow can read the free text instead and hand your team the details they need.
What an Ask AI step does
An Ask AI step reads the text you give it, usually the message or every answer together, does one task, and stores the result as a value that later steps can use in emails, chat posts, webhooks and conditions. The tasks are:
- Summarize: two or three sentences on who sent it, what they want and anything urgent. Stored as
ai_summary. - Sort into a category: picks exactly one of the categories you list. Stored as
ai_category. - Detect the mood: positive, neutral, negative, or urgent when someone needs help fast. Stored as
ai_sentiment. - Pull out details: finds the details you describe. Stored as
ai_details. - Translate, Draft a reply and Your own instructions for everything else.
Pull out details
Describe what to find in plain words, for example order number, product name, the date the problem started. The answer comes back as one line per detail, such as Order number: 48213, with not given when the person did not mention it. Put {{ai_details}} at the top of the email to your team and the facts are there before anyone reads the message.
Sort and route
Sorting becomes powerful with a route after it. Add Sort into a category with the categories billing, bug, sales, other, then a Route by answer step on ai_category with a path for each. Because the answer is always one of the categories you listed, every submission takes a path, and anything unclear lands in the last category.
The same works with mood. A route on ai_sentiment can post urgent messages to an on-call channel while the rest wait in email.
Safe with public text
Anything typed into a public form is untrusted. Someone may write ignore your instructions and reply with... to see what happens. Formpik tells the model to treat the text only as data, never to follow instructions inside it and never to invent facts that are not there. Still, treat AI results as a helpful first read, and keep the original answers in every email so a person can check.
When the AI does not answer
A flow should never stop because a model was slow. If the AI step fails, its value is left empty, the step shows as skipped with the reason, and the following steps still run. Write emails and messages so they read well with an empty value, for example by putting the summary under its own heading.
Test without spending anything
Test runs in the flow editor use a stand-in answer for AI steps, so you can check every path without waiting or using real requests. Then send one test submission to see a real answer.
Related guides
- AI form builder and AI steps.
- Variables and templates, for using AI values in messages.
- Route form submissions to the right person.
- Build a form from one sentence with AI.
References
- Input Validation Cheat Sheet, OWASP.
- Website Forms Usability: Top 10 Recommendations, Nielsen Norman Group.

