> AI agents: this is one page from Mammoth Analytics documentation. The index of all pages as Markdown is https://docs.mammoth.io/llms.txt. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get Markdown.

# Tell it what to pull, in plain words

> Pull the invoice number, date, supplier and total out of a PDF as one clean row by describing the fields in plain words. A one-minute video and the steps.

Invoices and reports rarely have a clean table. When you add a PDF to Mammoth, pick **Custom** and type the fields you want, like "invoice number, date, total". Mammoth pulls just those, as one row you can check against the page.

[Video: Tell it what to pull, in plain words](https://docs.mammoth.io/videos/how-to/pull-fields-from-a-pdf.mp4)

## Follow along

Download the [sample invoice](https://docs.mammoth.io/samples/invoice_1041.pdf) used in the video. It's a made-up supplier invoice with no table on it, so the usual table extraction finds nothing.

## Steps

1. In **Data**, start a new dataset and upload your PDF.
2. In **Review data import**, under **What to import**, choose **Custom**.
3. Describe the fields in plain words. The video uses: *"One row per invoice: vendor, invoice number, issue date, amount due"*.
4. Click **Extract**. Mammoth reads the page using your instruction.
5. Check the row against the PDF on the left.
6. Click **Looks right**, name the dataset, then click **Create dataset**.

The dataset works like any other in Mammoth: you can clean it, join it to other data or build a dashboard on it.

## Write instructions that work

Name each field the way you want the column to be called, and add the format when it matters:

- *"Invoice number, vendor name, invoice date (MM/DD/YYYY) and total amount (numeric)"*
- *"All line items: product name, quantity, unit price and line total"*
- *"Only the summary table on page 1"*

A vague instruction such as *"get the data"* leaves Mammoth guessing which fields matter.

## If it doesn't look right

- **A field is empty or wrong.** Click the pencil icon next to your instruction, make it more specific, and extract again. You don't need to upload the file again.
- **It's a scan or a phone photo.** Mammoth reads scans and images too, but text-based PDFs give the most reliable results. Use a clear, straight image.
- **You get more than you asked for.** Narrow the instruction to a page or a section, as in the third example above.

## Next month's invoice

When you save the dataset you choose how it refreshes. With **Manual**, upload next month's file and the same instruction runs over it. If the new file looks different, Mammoth pauses and asks you before changing your data. Refreshing **When a new file arrives** in a folder depends on your plan.

## Related

- [PDF extraction](https://docs.mammoth.io/learn/connectors/pdf-extraction): every option in the import dialog, supported file types and more example instructions.

---
Source: https://docs.mammoth.io/guides/how-to/pull-fields-from-a-pdf.md · Updated: 2026-11-02