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.

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.
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
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.
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:
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.

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.
Upload your export in the preview.
Pick a field in every empty picker, including
First NameandLast Name.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.
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.
Choose how much of the mapping the user sees
These four settings are in the panel on the right, below Default Mappings.
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.
Save and test
Run the flow and upload the regular export. Every picker is filled:
First Nameshows First Name,Booth notesshows Description, and so on. The screen reads "Found 5 rows."Now test the failure case. Rename
Last NametoLast namein a copy of the file (a different case is enough) and upload it. Press Next.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.

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
Related tutorials
Import a CSV file in a screen flow: the base flow this tutorial starts from.
Review rows before saving: with the mapping automatic, give users a table of every row to check before the Create Records runs.
Import a file stored in Salesforce: the same default mappings work when the CSV comes from a file attached to a record.
CSV Parser: every setting of the component, in one place.
Was this helpful?
