Skip to content
Tutorials Center
My learning

Topics

Lesson 18 of 37 ยท CMS and Dynamic Content

CMS Data Modeling and Import

Model content relationships (one-to-many, many-to-many), prepare a clean CSV, import items into Webflow or Wix collections, map references, fix slugs and dates, and validate data before you import.

Once you understand collections, you will often face a bigger job: moving existing content into the CMS. A bakery has 80 products in a spreadsheet. A magazine has 300 articles on an old site. Typing them one by one is slow and error-prone, so both Webflow and Wix let you import items from a CSV file (comma-separated values, a plain-text table that any spreadsheet program can save). The import itself takes seconds. The work that decides success is data modeling and data cleaning before you import.

This lesson covers modeling relationships, preparing a CSV, mapping columns to fields, and checking the data with stand-in scripts. The scripts parse and validate CSV text on this page. They do not talk to Wix or Webflow, so they are practice tools, not product features. The import screens themselves differ by tool and version, so we describe them in general terms.

Modeling relationships

Content items relate to each other in three ways.

Relationship Example How to model it
One-to-many One author, many posts Reference field on the many side (Post to Author)
Many-to-many Posts and tags, recipes and ingredients Multi-reference field (Post to Tags)
One-to-one A product and its detailed spec sheet Keep as fields on one collection unless the data is large
erDiagram
  AUTHORS ||--o{ POSTS : writes
  POSTS }o--o{ TAGS : "tagged with"
  CATEGORIES ||--o{ POSTS : groups
  AUTHORS {
    text name
    image photo
    richtext bio
  }
  POSTS {
    text title
    slug slug
    date published
    richtext body
  }
  TAGS {
    text name
    slug slug
  }

A blog model: authors and categories reference posts, and posts connect to many tags.

A rule that prevents most modeling mistakes: if a value is shared by several items and you may change it, make it its own collection. Authors, categories, locations and brands qualify. Short, fixed labels that never need their own page can be an option field instead.

Order of import

Because references point to other items, import in dependency order:

  1. Authors, categories, tags (the things referenced).
  2. Posts (which reference them).

When you import posts, reference columns must contain a value that matches an existing item, usually its name or slug. A typo (Ana Reyes with a trailing space) makes the match fail. Both tools tell you which rows failed, but it is better to catch them first.

Preparing the CSV

  1. First row = field names, matching your collection's fields or easy to map.
  2. One item per row, one value per cell.
  3. Quote cells that contain commas or line breaks with double quotes, and double any quote inside ("He said ""hi""").
  4. Use consistent date formats (ISO 2026-03-01 is safest) and plain numbers without currency symbols or thousands separators.
  5. Boolean columns should use true/false (or whatever the tool accepts, check its guide).
  6. Slugs: lowercase, hyphenated and unique.
  7. Images: provide public URLs the platform can download, or upload images separately and match them by name.
  8. Rich text: HTML is typically accepted in a rich text column, but test a few rows first.
  9. Save as UTF-8 so accents and symbols survive.
  10. Import a small batch first. Ten rows teach you what will go wrong with ten thousand.

A CSV parser stand-in

CSV looks simple until quotes appear. This parser handles quoted cells with commas and doubled quotes. It is a teaching tool: use a proven library for production data.

JS Stand-in: parse CSV with quoted cells

Press Run (or Ctrl + Enter) to see the console output here.

No output.

The first description contains a comma, and the second contains quote characters. A naive split(",") would break both rows.

A validation stand-in

Before importing, check every row against your collection's rules. This validator reports row numbers, so you can fix the spreadsheet and try again. It looks for missing required values, duplicate slugs, invalid slugs, bad numbers and unknown references.

JS Stand-in: validate rows before an import

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Every message in that list corresponds to something a CMS import would reject or silently mis-handle. Fixing them in the spreadsheet is far easier than repairing items one at a time afterwards.

Importing into Webflow (general steps)

  1. In the CMS panel, open the collection and choose the import option.
  2. Upload the CSV file.
  3. Map columns to fields: Webflow matches names when it can, and you fix the rest. Mark columns to ignore.
  4. Review the preview and any warnings about unmatched references or invalid values.
  5. Confirm. New items arrive as drafts or published depending on the options in that screen, so check before you publish.
  6. Open several items to verify rich text, images and references.

Webflow can also export a collection to CSV, which is a convenient backup and the best way to learn the expected format: export a collection with a couple of sample items, then edit the file.

Importing into Wix (general steps)

  1. Open the collection in the Content Manager.
  2. Choose the option to import items from a CSV file.
  3. Map CSV columns to the collection's fields and choose how to handle conflicts with existing items (add as new, or update matching items where supported).
  4. Run the import and review the results.
  5. Spot-check items and the dynamic pages that use them.

Wix collections also support export to CSV and, for developers, bulk insert operations in Velo code. As with Webflow, do a small trial import first.

After the import: spot checks

  • Open three to five random items on the live-looking template page.
  • Look for broken images (bad URLs), missing references and weird characters.
  • Check the slugs and the list pages: counts, sort order and filters.
  • Confirm item status: draft, published or archived.
  • Export the collection and store the file as a dated backup.

Common mistakes

  • Importing before the referenced collections exist.
  • Letting the spreadsheet program reformat dates or turn long numbers into scientific notation.
  • Saving the CSV in a non-UTF-8 encoding, producing broken accented characters.
  • Duplicate slugs, which cause conflicts or automatic renames you did not expect.
  • Importing the whole file first instead of a test batch.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which relationship needs a multi-reference field?

    Many-to-many relationships are modeled with multi-reference fields.
  2. 2. In which order should you import collections that reference each other?

    References must point to items that already exist.
  3. 3. How should a CSV cell containing a comma be written?

    Quoting tells the parser that the comma is part of the cell.
  4. 4. Why import a small batch first?

    A trial import exposes surprises cheaply.

Summary

  • Model relationships deliberately: references for one-to-many, multi-references for many-to-many, options for small fixed lists.
  • Import referenced collections before the ones that reference them.
  • Prepare clean UTF-8 CSV files with correct quoting, ISO dates, unique slugs and exact reference values.
  • Validate rows before the import, import a small batch first, then spot-check items, lists and slugs.
  • Use exports as backups and as examples of the expected file format.

Next: Interaction Principles: Scroll, Hover and Click