Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Pre-map CSV columns for a recurring import

Map the headers of a file that comes back every month once, in the flow, so users drop the export and press Next while required fields stay enforced.

Every month the events team exports the booth scans from the same badge scanner, with the same headers. Picking First Name to FirstName by hand each time is wasted effort and a chance to get it wrong. With Default Mappings and Required Fields To Map on the CSV Parser, the flow matches every column itself and refuses a file that lacks a field you cannot do without. The same setup works for any file with stable headers, such as a monthly price list from a supplier.

The CSV Parser after an upload: Found 5 rows, and all seven column headers already matched to Lead fields without any user action.
With default mappings in place, every column is matched before the user does anything.

Before you start

  • A screen flow with the CSV Parser on its first screen and a Create Records after it. Import a CSV file in a screen flow builds it with the same booth leads file used here.

  • One real export from the system that produces the file. You need its header line exactly as written.

How the parser matches a column on its own

For each header in the file, the parser tries these rules in order and stops at the first that works.

Order
Rule
Example

1

A Default Mappings entry whose Column Header is the header, character for character

Booth notes mapped to Description

2

The header is the API name of a field (spaces at the start or end are ignored)

Company, Email, Phone

3

The header becomes a custom field API name when its spaces turn into underscores and __c is added

Booth Notes matches Booth_Notes__c, if that field exists

4

Nothing matches: the picker stays empty and the user picks a field

Surname

Every comparison is case sensitive. email and EMAIL do not match the Email field.

Steps

1

Copy the header line from a real export

Open one export in a text editor rather than a spreadsheet app, so you see the headers exactly as the file stores them. The badge scanner export used in this tutorial starts with:

Watch for capital letters and spaces at the end of a header. A Default Mappings entry only applies when its Column Header is identical.

2

Add a default mapping for each header that does not match

Select the CSV Parser on the screen and find Default Mappings in the panel on the right. Click Add Item once per header that the rules above do not cover, and fill in its two fields:

  • Column Header: the header as written in the file.

  • Object Field: the API name of the field, not its label.

Each saved item shows as a card, with the header above the field name. Click the pencil on a card to change it, or the X to remove it.

For the booth scanner export:

Column Header
Object Field

First Name

FirstName

Last Name

LastName

Job title

Title

Booth notes

Description

Company, Email and Phone need no entry. If some files call the last name Surname, add a second item Surname to LastName: several headers can point to the same field.

The CSV Parser panel with Required Fields To Map set to Last Name and Company, and four Default Mappings: First Name to FirstName, Last Name to LastName, Job title to Title, Booth notes to Description.
Four default mappings cover the headers that do not match on their own.
3

Or build the list from a sample file

Instead of typing the pairs, click Open Component Builder at the top of the panel. The preview starts with example data and lets you upload your own file.

  1. Upload your export in the preview.

  2. Pick a field in every empty picker, including First Name and Last Name.

  3. Click Use as Default Mappings.

Then check the Default Mappings list: every Object Field must be an API name such as FirstName. A header that was left with an empty picker can be saved with its own text as the field, and that entry will not work.

4

Make the fields you cannot do without required

In Required Fields To Map, select the fields every file must provide. For Leads, Last Name and Company, because a Lead cannot be saved without them. Add Email if your follow-up campaign depends on it.

The check runs on the final mapping, whatever produced it: a default mapping, an automatic match, or a field the user picked.

5

Choose how much of the mapping the user sees

These four settings are in the panel on the right, below Default Mappings.

Setting
Effect on the screen
Turn it on when

Hide Mapping

No mapping section. Columns are mapped automatically and the user only sees the drop zone.

Your default mappings cover every header, and users should never change them.

Hide Sample Data

The three sample values under each header are not shown.

The file holds values users should not read on screen, or the samples add noise.

Hide Clear All

Removes the Clear All button, which empties every picker at once.

Users keep the mapping visible but should not wipe your defaults by accident.

Show Row Count

Shows "Found N rows." under the drop zone.

Almost always. With the mapping hidden, it is the only sign the file was read.

With Hide Mapping on, only the required fields are checked. A column that matches nothing is not reported, so add default mappings for every header before you hide the section.

6

Save and test

  1. Run the flow and upload the regular export. Every picker is filled: First Name shows First Name, Booth notes shows Description, and so on. The screen reads "Found 5 rows."

  2. Now test the failure case. Rename Last Name to Last name in a copy of the file (a different case is enough) and upload it. Press Next.

  3. The screen stops with "Required Headers Not Found: LastName. Please add them and try again." With Hide Mapping on, the message appears right after the upload, without waiting for Next.

The CSV Parser showing the error Required Headers Not Found: LastName. Please add them and try again.
A required field with no column mapped to it stops the screen.

After the message the mapping section is not shown, so the user fixes the file and uploads it again. If a new spelling is legitimate, add it to Default Mappings.

Troubleshooting

A default mapping is ignored

The Column Header differs from the file's header: a capital letter, a space at the end, or a different word. Copy the header from the file in a text editor and paste it into Column Header.

The picker is empty although a default mapping exists for that header

Object Field holds something other than an exact API name, for example First Name or firstname instead of FirstName. Find the API name in Object Manager, under the object's Fields & Relationships, and type it exactly.

"Required Headers Not Found" although the column is in the file

The column is there but not mapped to the required field. Either its header has spaces and relies on automatic matching (see the warning above), or it is mapped to another field. Add a Default Mappings entry from that header to the required field.

Was this helpful?