- EmDash
- Start here
Your first import
Import a three-row CSV file into a collection, start to finish. It takes a few minutes and shows every step of the wizard.
Before you start
Section titled “Before you start”- Flux Importer is installed, with both
fluxImporter()andfluxImporterRoutes()registered. - You are signed in as an Administrator. Only Administrators can import. See Permissions.
- Your site has a collection to import into. This page uses a Posts collection with Title, Excerpt and Content fields, where Content is a Portable Text field. Use any collection you have, and rename the CSV columns to match its fields.
The sample file
Section titled “The sample file”Save this as posts.csv:
id,title,slug,excerpt,body1001,Welcome to the new site,welcome,A short hello from the team.,"We moved to **EmDash**. More posts soon."1002,Spring opening hours,spring-hours,Longer hours from April.,"From 1 April we open at *8:00*, Monday to Saturday."1003,Meet the team,meet-the-team,Who answers your emails.,"Three of us run the shop. Say hello at the counter."The id column matters most. It is the import key: a value that identifies each record. The importer remembers which entry each key created, so if you import the file again, it updates those three entries instead of creating copies.
The body column holds Markdown. The importer converts it to Portable Text when you tell it the format.
1. Choose the file
Section titled “1. Choose the file”Open Imports in the admin sidebar and choose New import. The wizard opens on its first step, Source.
On the Upload a file tab, choose Choose a file and pick posts.csv. The wizard uploads it and reads a sample. When it’s done, it shows the file with “3 records · 5 keys”, the format under How to read it (CSV, from the file name), and a Sample table with each column and its first values.
Choose Next: Target.
2. Choose the collection
Section titled “2. Choose the collection”On Target, choose Posts under Collection. If your site has more than one locale, choose the locale the entries are written in under Locale. With one locale, the wizard just shows it.
Choose Next: Map.
3. Map the columns
Section titled “3. Map the columns”Map shows three panes: the file’s Source keys on the left, the collection’s fields in the middle, and Details for the selected row on the right.
The wizard fills in a mapping as soon as the step opens. With no AI provider set up, the status line says “Suggestions by name matching”, and it matches columns to fields by their names:
| Row | Source key |
|---|---|
| Key | id |
| Slug | slug |
| Title | title |
| Excerpt | excerpt |
| Content | body |
Check each row. If one is missing or wrong, drag a key from the left onto the row. Or select the row and pick the key under Source key in the Details panel.
Then tell the importer the body is Markdown. Select the Content row, and in Details, set Source format to Markdown.
The summary bar at the top counts the fields mapped and the ones to check. Next stays disabled while something blocks the import, and says what, for example “Choose the source key that identifies each record”. When nothing does, choose Next: Options.
4. Choose the options
Section titled “4. Choose the options”Options sets how entries are written. The defaults suit a first import:
- Records: Create and update. New keys create entries, known keys update them.
- Status: Publish. Choose Draft if you’d rather check the entries before they go live.
Leave Save as template unticked for now. A template saves this mapping so you can run it again or schedule it; see Templates.
Choose Next: Preview.
5. Preview the dry run
Section titled “5. Preview the dry run”Preview runs the whole import as a dry run: it checks every record and writes nothing. When it finishes, it says “Dry run of 3 records. Nothing is written yet.” and shows what the import would do:
- The counts: here, 3 to create.
- A table with each record’s key, its action and the values it would write.
If a record would fail, the table says why, field by field. Fix the mapping with Back to Map and the dry run starts again.
6. Run the import
Section titled “6. Run the import”Choose Run import. The Run step imports the records batch by batch, with a progress bar, and ends with “Import complete.” and the counts: 3 created.
Choose View the entries to open the collection, or See all imports to go to the Imports page.
Where to see the result
Section titled “Where to see the result”The Jobs tab of the Imports page lists every import, newest first. Your run shows as One-off import, because it wasn’t saved as a template, with when it started, its status (Completed) and its records (3 created). Dry runs are counted apart, under Dry runs, and never appear as imports.
From version 0.9.0, a status menu on the summary line shows only the imports with one status, and the counts and pages are exact (“1–8 of 14”). An import started from the wizard is marked Wizard. While an import runs, its row shows how many records it has read of the total, when the total is known, such as after a dry run of the same data.
Each row’s menu has the actions for that job:
- Open shows the run again.
- Download log saves a CSV with every record and its outcome. Download failed records saves only the ones that failed.
- Roll back undoes the import: it deletes the entries it created and restores the ones it updated, and keeps any entry someone edited since. See Rollback.
Now import posts.csv a second time. The dry run shows 3 unchanged: the key matched each record to the entry it created, and nothing differs. Change a title in the file and import it again, and it shows 1 to update.
Next steps
Section titled “Next steps”- The import wizard: every step and setting in detail.
- Templates: save a mapping to reuse it.
- URL sources and credentials: import from a feed instead of a file.