---
title: "Use AI data extraction to populate forms"
canonical_url: "https://www.nutrient.io/guides/workflow-automation/admin-guide/forms/using-ai-data-extraction-question/"
md_url: "https://www.nutrient.io/guides/workflow-automation/admin-guide/forms/using-ai-data-extraction-question.md"
last_updated: "2026-06-11T00:00:00.000Z"
description: "Use the AI Data Extraction question type to extract information from PDFs and automatically populate Workflow form fields using AI."
---

# Use AI data extraction to populate forms

Use the **AI Data Extraction** question type to extract data from documents with AI services such as OpenAI, Claude, etc. AI reads the document and returns the specified information. Map the returned fields into form questions so the data is stored and used like any other form input.

Watch the video below to see Nutrient AI Data Extraction in action.

## Prerequisites

Complete the [common AI configurations](https://www.nutrient.io/guides/workflow-automation/ai-capabilities-in-workflow/common-ai-configurations.md) guide before proceeding.

## Supported file types and sizes

Most AI providers accept common document formats such as PDF, DOC, DOCX, and TXT, and occasionally other text-based files. However, specific limits and supported formats may vary.

- **OpenAI**
  - Accepts a range of file types (TXT, PDF, DOCX, CSV, JSON, etc.).
  - For the latest supported file types and size limits, refer to the [OpenAI documentation](https://platform.openai.com/docs/assistants/tools/file-search#supported-files).

- **Claude (Anthropic)**
  - Supports multiple text-based file types, including PDFs.
  - For the latest supported file types and size limits, refer to [Anthropic’s documentation](https://platform.claude.com/docs/en/managed-agents/files#supported-file-types).

Always verify the current constraints directly from the provider’s documentation, as limits may change over time.

## Workflow overview

Below is a simplified workflow for using the AI Data Extraction question.

1. **Create a form**
   Add the fields that should be populated by AI so they can be mapped later.

2. **Create and configure the AI Data Extraction question**
   - Select the AI connection created in [common AI configurations](https://www.nutrient.io/guides/workflow-automation/ai-capabilities-in-workflow/common-ai-configurations.md).
   - Add a custom prompt describing what to extract.
   - Test with **Test with mappings** turned off first to see what the AI extracts from the prompt.
   - When results are accurate, configure mappings and select only the fields you need.
   - Test again with **Test with mappings** turned on to confirm extraction returns only mapped values.

## Step 1: Create a form containing all the fields for AI extraction

Create or edit a form that will hold the data extracted by AI. For example, if extracting invoice information, include questions such as:

- Invoice number

- Due date

- Customer name

- Payment terms

- Total amount

**Steps:**

1. Navigate to **Forms** under the Administration menu in the left navigation panel.

2. Click **Create New Form**.

3. Add all relevant questions (e.g. text, date, etc.) corresponding to the data that the AI will extract.

## Step 2: Create and configure the AI Data Extraction question

**Steps:**

1. In the form designed in Step 1, drag and drop the **AI Data Extraction** question.

2. Click the **Edit** icon to configure the **AI Data Extraction** question.

3. Under **AI Processor**, choose the AI connection created in [common AI configurations](https://www.nutrient.io/guides/workflow-automation/ai-capabilities-in-workflow/common-ai-configurations.md).

   If a connection is marked as using a deprecated model, open **AI Sources** and update it to a supported model before continuing.

4. Set the prompt. This instruction tells the AI what to extract and is essential for accurate results.
   - Enter a prompt describing the information needed.
   - Specify the exact fields expected in the response, and describe each field for better results.

     An example prompt might be:

     ```

     Extract the following information from the attached document:
     1. Issue Date — The date the invoice or document was created.
     2. Customer ID — The unique identifier assigned to the customer.
     3. Payment Terms — The terms that define when and how payment should be made.
     4. Invoice Due Date — The date by which payment is due.
     5. Total Amount Due — The full amount that must be paid.
     ```

   - Nutrient Workflow Automation processes responses automatically. Focus your prompt on the business information you need to capture.
   - Large language models might guess or invent information not found in the source document. If precision is critical, add a disclaimer such as: **Only provide information you are 100 percent sure about. If you are unsure or the data is not in the document, respond with "Not available."**

5. Under **Process a sample document**, upload a sample document (PDF, DOCX, or other [supported formats](https://platform.openai.com/docs/assistants/tools/file-search#supported-files)) to test the prompt.

6. Click **Run AI Processor** to see the AI-generated response.
   - Begin with **Test with mappings** turned off to check what the AI can extract from your prompt.
   - When results are accurate, go to **Mappings** > **Add Mappings**. Then, in the **AI Response Field** selector, choose the fields you need.
   - Run again with **Test with mappings** turned on to confirm the result is limited to mapped values and doesn’t include extra noise.

7. Refine the prompt:
   - Adjust the prompt if specific fields are missing or incorrect.
   - Test with multiple sample files until the output meets your requirements.

8. Map the AI response to form questions:
   - In **Mappings**, click **Add Mapping** to connect each AI response field to the corresponding form question.
   - In the **AI Response Field** selector, choose only the extracted fields you want to keep.
   - Click **Save Changes**.

## Step 3: Preview and validate

**Steps:**

1. Click **Preview** to confirm how the question behaves and to ensure the configured fields display correctly.

2. Attach a document to the AI Data Extraction question to trigger AI processing.

3. Review the populated fields once the AI finishes extraction. Verify that the mapped fields contain the expected data. Return to the previous steps to refine the configuration if the output needs improvement.

## Tips and best practices

- Use **Preview** with representative documents to verify that extracted values map to the correct fields.

- For prompt-writing guidance — including how to make extraction instructions clearer, reduce hallucinations, and refine prompts iteratively — refer to the [prompt engineering for AI features](https://www.nutrient.io/guides/workflow-automation/ai-capabilities-in-workflow/prompt-engineering.md) guide.

If you need help answering questions about forms, processes, requests, tasks, or files while setting up this feature, refer to the [Workflow Assistant](https://www.nutrient.io/guides/workflow-automation/ai-capabilities-in-workflow/workflow-assistant.md) guide.
---

## Related pages

- [Add attachments to your forms](/guides/workflow-automation/admin-guide/forms/adding-attachments-to-forms.md)
- [Dynamic calculations for streamlined form entries](/guides/workflow-automation/admin-guide/forms/calculations-in-forms.md)
- [Calendar fields in forms](/guides/workflow-automation/admin-guide/forms/calendar-field.md)
- [Configure contact search groups](/guides/workflow-automation/admin-guide/forms/contact-search-question.md)
- [Create a new form](/guides/workflow-automation/admin-guide/forms/create-a-new-form.md)
- [Create form questions](/guides/workflow-automation/admin-guide/forms/create-form-questions.md)
- [Customize forms with CSS](/guides/workflow-automation/admin-guide/forms/css-styles-in-forms.md)
- [Design custom HTML forms with full control](/guides/workflow-automation/admin-guide/forms/developer-form.md)
- [Form library overview](/guides/workflow-automation/admin-guide/forms/form-library-overview.md)
- [CSS styling](/guides/workflow-automation/admin-guide/forms/copy-and-paste.md)
- [Master form question editing with ease](/guides/workflow-automation/admin-guide/forms/edit-form-questions.md)
- [Edit and preview your forms effectively](/guides/workflow-automation/admin-guide/forms/form-preview-and-editor.md)
- [Import and export forms](/guides/workflow-automation/admin-guide/forms/importing-and-exporting-forms.md)
- [Mastering form rules for dynamic responses](/guides/workflow-automation/admin-guide/forms/form-rules-show-hide.md)
- [Form template management](/guides/workflow-automation/admin-guide/forms/form-templates.md)
- [Import and export grid data](/guides/workflow-automation/admin-guide/forms/importing-data-into-grids.md)
- [Forms](/guides/workflow-automation/admin-guide/forms.md)
- [Integrate with external REST APIs](/guides/workflow-automation/admin-guide/forms/restful-data-elements.md)
- [Enhance form management with request records](/guides/workflow-automation/admin-guide/forms/set-up-a-request-record.md)
- [Generate forms using AI](/guides/workflow-automation/admin-guide/forms/using-ai-form-generator.md)
- [Using grid questions in forms](/guides/workflow-automation/admin-guide/forms/using-the-grid-question.md)

