> ## Documentation Index
> Fetch the complete documentation index at: https://help.csvbox.io/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Pre-Import Transform

> Restructure uploaded files with a plain-English AI instruction before they reach the column-mapping step.

AI Pre-Import Transform cleans up messy uploads for your users, so they map columns from a well-structured file instead of fixing it by hand.

## What it does

AI Pre-Import Transform lets you write a plain-English instruction that automatically restructures uploaded files before they reach the column-mapping step. Instead of asking your users to clean up their files manually, the AI rewrites the data for them: renaming columns, flattening nested headers, reordering rows, splitting or merging columns, or whatever else the instruction describes.

## How to enable it

<Steps>
  <Step title="Open the sheet settings">
    Open your sheet's **Settings**.
  </Step>

  <Step title="Go to the File Upload tab">
    Click the **File Upload** tab.
  </Step>

  <Step title="Enable the transform">
    Find **AI Pre-Import Transform** and set it to **Enabled**.
  </Step>

  <Step title="Enter your instruction">
    Enter your instruction in the **Prompt** field.
  </Step>

  <Step title="Save the settings">
    Save your settings.
  </Step>
</Steps>

### Writing a prompt

The prompt is a plain-English description of what you want done to the uploaded file. Examples:

* *"Rename column 'Item Description' to 'Product Name' and 'Unit Cost' to 'Price'"*
* *"Flatten the two-row merged header into a single header row"*
* *"Split the 'Full Name' column into 'First Name' and 'Last Name'"*
* *"Remove any rows where the Quantity column is empty"*
* *"Add a column called 'Status' with the value 'Pending' for every row"*

<Tip>
  Be specific about column names and the desired outcome. The AI follows the instruction exactly as written.
</Tip>

## What happens during upload

When a user uploads a file, the AI reads the data and applies your instruction. The transformed result is what the user sees in the column-mapping step. The original file is not stored; only the transformed output is processed.

If the AI can't apply the transformation (for example, the file structure doesn't match the instruction), the original data is shown unchanged.

## Credits

AI Pre-Import Transform uses a separate credit pool from OCR credits.

| Event | Credit cost |
| - | - |
| AI processes a new file | Based on actual token usage (1 credit = 1,000 tokens) |
| Same file re-uploaded with no changes | 1 flat credit |

**Monthly plan credits** are used first each billing cycle. **Purchased credits** are used as overflow once the monthly quota is exhausted.

You receive an email notification when you reach **90%** and **100%** of your credit limit.

## Limitations

* The prompt applies to every upload on that sheet. It can't vary per user or per file.
* Very large files may use more credits due to a higher token count.
* Complex transformations (for example, multi-condition logic) may fall back to a direct AI call, which uses more tokens than a simple recipe.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.