Skip to content

The import wizard

The wizard takes data from a file, a URL or pasted text into a collection in six steps. Nothing is written until you choose Run import after a dry run.

Open it with New import on the Imports page, or from New import in the admin sidebar. If you’re new to it, start with Your first import.

The steps are Source, Target, Map, Options, Preview and Run. Each has Back and a Next button that names the next step, such as Next: Target. When something stops you from going on, Next is disabled and says what, for example “Choose the data to import”.

You can go back to any step you’ve reached, from the step bar or with Back. A change to an earlier step clears what depends on it:

  • New data clears the sample and the suggestions.
  • Another collection clears the mapping.
  • Any change after Preview discards the dry run, so Preview runs again.

The wizard keeps your work in the page. Reloading it or closing it loses the draft, and the browser asks first. Cancel goes back to the Imports page.

the Source step of the New import wizard in the EmDash adminthe Source step of the New import wizard in the EmDash admin
The first step of the wizard: upload a file, fetch a URL, paste text or pick a saved source.

Choose where the data comes from, on one of four tabs.

Choose a file opens your file picker. The wizard accepts CSV, JSON, JSON Lines (.jsonl or .ndjson), XML and XLSX files, and refuses other extensions before anything is uploaded. A file can be up to 50 MiB, or the limit set by maxSourceBytes; an XLSX file up to 10 MiB. See Configuration and settings.

Enter the feed’s Address, a Name and, if the feed needs a key, a Credential, then choose Fetch. The source is saved under its name, so it can be fetched again later and scheduled. The name starts as the address’s host and path; change it if you like.

If a saved source already has that name and fetches the same address, the wizard offers Use the saved source. If it fetches another address, choose another name.

The Credential list holds the credentials already saved on the Sources tab. See URL sources and credentials.

Choose a Format, paste the data into Text and choose Use this text. Pasted text can be up to 1 MiB; the counter under the box shows how much you’ve used. XLSX can’t be pasted.

Lists the sources saved earlier, each with its name and address, marked “Last fetch failed” or “Never fetched” when that applies. A source of another kind shows as “Name (Kind)”. Use fetches it again now.

Once the data is in, the wizard reads a sample of up to 20 records and shows its format, its record count, its key count and the data’s size, for example “3 records · 5 keys · 1.2 kB”. A + after the count, as in “20+ records”, means the sample is full and the source may hold more.

The sample table’s Looks like column says whether each key’s values look like Text, a Number or a Date, from every sampled value, by the same rules that pick a new field’s type.

Under How to read it:

  • Format: detected from the file name or address. When the address names no format, the wizard assumes CSV and says so. Change it if the data is another format.
  • Records path (JSON and XML): where the records are. For JSON, dot-separated keys, such as data.products; leave it empty for a top-level list. For XML, element names from the root, such as feed/item.
  • Sheet and Header row (XLSX): a sheet name or its number from 1, and the row that holds the column names. Leave them empty for the first sheet and row 1.
  • Row filter: optional. A JSONata expression; only the records it’s true for are imported. Records it leaves out are counted as filtered out.

Each change reads the sample again. The Sample table lists each key with its first values: the first 5 records, and the first 200 keys. Every key can still be mapped later.

See Source formats for how each format is read.

Under Start from a template · optional, pick a Saved template and choose Load template. Choose the data first: the template reads it with its own settings. The wizard then fills in Target, Map and Options from the template and goes straight to Preview. See Templates.

For a WordPress export (WXR), use EmDash’s own WordPress importer; the step links to it.

Choose the Collection the records go to. Hidden collections are listed with “(hidden)”. Changing the collection clears the mapping.

Choose the Locale the entries are written in. A site with one locale shows it instead of a list.

When you pick a locale other than the default, you can tick These records translate entries in and choose the Locale of the original entries. On Map, you then map the key that names each record’s original entry to the Translation of row. See Translations.

Map connects the data’s keys to the collection’s fields. It has a summary bar and three panes: Source keys, the collection’s fields, and Details. On a narrow screen the panes stack.

The summary bar counts the fields mapped (“4 of 6 fields mapped.”), the required fields still missing a key, the keys left unused and the mappings to check.

Source keys lists every key in the sample with a sample value. Keys already mapped are marked “used”, the others “unused”; a used key can still be mapped to another field. Filter keys narrows a long list.

The middle pane lists the rows you can map, top to bottom:

  • Key, the unique import key. It identifies each record, so a later import updates the entry an earlier one created instead of adding a copy. It’s required, and its values should be unique.
  • Slug, optional.
  • The collection’s fields, with required ones marked. A field the importer can’t write is shown with the reason.
  • One row per taxonomy the collection uses. See Taxonomies.
  • Bylines, to credit existing bylines.
  • Translation of, when the records translate other entries.

To map a key, drag it from the left onto a row. Each mapped row shows its key as a chip; Remove clears it. You can also drag with the keyboard: press Space on a key to pick it up, move it with the arrow keys, and press Space to drop it or Escape to cancel.

Select a row to open it in Details.

Value from switches between Source key and Expression. A source key reads one key as it is. An expression is a JSONata expression over the whole record, for values you need to build, such as two keys joined; some JSONata features, such as regular expressions, are turned off. A row takes one or the other. See Template format.

The key picker lists the keys to choose from. Type in Find a key to search; a source with more than 200 keys lists the first 200 until you type.

Mapping type says how the value is read. Only the types that can write the field are offered. Each type has its own settings:

Mapping type Settings
Text, Slug None
Number Decimal separator and Thousands separator
Date Source date format (a Luxon format such as dd/MM/yyyy, or unix; empty reads ISO 8601), Timezone, and for text fields, Output format
Yes or no Values read as yes and Values read as no, comma-separated. Empty keeps the usual ones: true, yes, y, 1, on and false, no, n, 0, off
Option, Options Source values: which of the field’s options each value becomes, or As it is. Ignore case, and for Options, the Separator between values
JSON Parse text as JSON
Reference Match by Entry ID, Slug or Import key, and the Separator between several references
Image Alt text, from a key or an expression, and Download the file again on every run
File Download the file again on every run
Portable Text Source format (HTML, Markdown or Plain text, required), Base URL for relative links, Images, When an image cannot be imported and Markup it cannot convert

Taxonomy rows take Match terms by (Slug or Label), a Term separator, a Path separator for hierarchical taxonomies (as in Kitchen/Mugs), and Create missing terms. The Bylines row takes Match bylines by (Slug or Name) and a Separator.

Under the settings, Sample values lists the chosen key’s raw values. Converted values show in Preview.

A row marked to check says what doesn’t fit, such as “Check: a number into a string field. AI was not sure.” Its details show the reason and the key’s first values, with two choices: Keep it keeps the mapping and clears the mark, without discarding a dry run, and Remove the key clears the mapping. See Media for image and file fields.

When Map opens with nothing mapped, the wizard fills in a mapping for you. The status line says how:

  • Suggestions by name matching: columns matched to fields by their names. This is always available.
  • Suggestions by AI (Anthropic) or (OpenAI-compatible): when an AI provider is set up in the plugin’s settings.
  • Suggestions by name matching · AI unavailable: a provider is set up but couldn’t be used this time.

Each suggested row has a badge with where it came from and how sure it is, such as “AI · high” or “Name · medium”. Rows filled from a template say “Template”. A row marked check needs a look: the key isn’t in the sample, the suggestion wasn’t sure, or the format of its values is unclear. Select it to see why in Details.

Warnings about the suggestion as a whole show under About these suggestions; Dismiss hides them.

Ask again asks for new suggestions. If you’ve mapped rows yourself, it asks first: Keep my choices or Replace them. Suggestions never fill the taxonomy, Bylines or Translation of rows.

See AI mapping to set up a provider and see what it sends.

When the collection has no field for a key, drop the key on + Drop a key here to propose a new field, or select that row and pick the key in Details. The wizard proposes a field named after the key, with a type guessed from the sample.

Proposed fields are listed under New fields, where you can change each one’s Label, Type, Translatable and Searchable, or Remove it. Nothing changes in the collection yet.

When you choose Next, the wizard shows the schema change in Add these fields to the collection?: each field it would add, and any that can’t be added and why. Remove or change those to go on. At most 100 fields can be added at once. Add the fields creates them in the collection, maps each key to its new field and moves on to Options. Existing fields are never changed.

Next stays disabled, with the reason, until:

  • the Key row has a source key;
  • every required field without a default has a key, and none is a field the importer can’t write;
  • every Portable Text field has a source format;
  • at least one field is mapped;
  • the Translation of row has a key, when the records translate other entries;
  • the suggestions and the fields have finished loading.

Options sets how entries are written and published. Each setting has a line of help in the admin.

  • Create and update (default): a new key creates an entry, a key an earlier import created updates it.
  • Create only: entries that exist are skipped.
  • Update only: records with no entry yet are skipped.

With updates on, Update only these fields limits an update to the fields you tick, up to 200; tick none to update every mapped field. Never overwrite fields edited in the admin keeps any field someone changed in the admin since the last import. See Record rules.

  • Publish (default): entries go live at once.
  • Draft: entries are saved as drafts.
  • Schedule: entries are published at a Publish date. Choose The same date for every record (a Date and Time in the site’s timezone), or A date from the feed (a Source key, its Date format and its Timezone). A date already past publishes the entry at once. A template that sets a date the wizard can’t show offers As the saved template sets it.

What happens to entries an earlier run of this import created when the source no longer lists them: Leave them (default), Unpublish them or Move them to the trash. This needs a saved template: a one-off run has nothing to compare with, so the choice is disabled until you tick Save as template.

With Unpublish or Trash, Stop the run if more than this share is missing (%) guards against a feed that comes back short. The default is 25. See Missing entries.

Tick Save as template and give a Template name to save these settings when you choose Run import, so the import can be run again or scheduled. Names are unique; the wizard tells you if one is taken.

When you started from a template and changed something, Changes to the template offers instead:

  • Run with these changes without saving them (default);
  • Save the changes to the template, when you choose Next;
  • Save as a new template.

See Templates.

  • Owner: a label stamped on the entries this import creates, so a later run can tell which of its entries are missing. The wizard derives it from the template name, or from the collection and locale for a one-off run. It’s 1 to 100 letters, digits, dots, underscores, colons or hyphens. If another template uses the same owner for this collection and locale, the wizard warns you: the two imports would behave as one.
  • Batch size: records per batch, from 1 to 500. Empty uses the default, 50.

Preview runs the import as a dry run: it checks every record and writes nothing. When it finishes, it says how many records it read, then What the import would do: how many records it would create, update or leave unchanged, and how many would fail, conflict, be locked or be filtered out. With a missing-entries action, it also counts the entries that would be unpublished or trashed.

The records table lists each record’s key, its Action and its Changes: each field’s value before and after, or why the record would fail. Show records filters it: All, Will change, Warnings, Failed, Conflicts, Locked and Filtered out, each with its exact count. Will change lists the records that would create, update, trash or unpublish an entry; Warnings lists the records with a warning.

  • Conflict: the entry changed since it was read, has a draft or a schedule this import didn’t write, or was trashed by an earlier run.
  • Locked: someone is editing the entry.
  • Filtered out: the row filter left the record out.

If the missing-entries step wouldn’t run, its count says Not applied, with the reason, for example when more entries are missing than the limit allows.

A line also says how the entries will go live, such as “Entries will be published.” or “Entries will be saved as drafts.”, and how many records have warnings. Change in Options takes you back to change it.

Back to Map keeps your mapping. Run import starts the real import, once the dry run has finished with at least one record. See Job states and record outcomes.

Run imports exactly what Preview checked: it reads the same copy of the data, even for a URL source. If you ticked Save as template, the template is saved first.

The page shows a progress bar (“120 of 400 records”), the time left, the records per second and the counts so far. A Log panel lists the latest 20 events as they happen: batches and what they did, failures, conflicts, locked entries, warnings, pauses and the finish. Pause and Resume stop and continue the import. Cancel import asks first: records already imported stay, and a cancelled import can’t be resumed. If the connection drops, the page retries before it shows an error.

The page drives the import batch by batch while it’s open. Leaving it pauses nothing and cancels nothing: the import stays open, and you can come back to it at the same address, or open it from the Jobs tab.

When the import completes:

  • View the entries opens the collection.
  • Download log saves every record and its outcome as CSV; Download failed records saves only the failures.
  • Retry failed records runs the failed records again, after you fix what stopped them.
  • New import starts again, and See all imports goes to the Imports page, where you can roll the import back.