Skip to main content
Docs/CSV Import
DocsCSV Import
Free

CSV Import

Bring your existing data in. Upload a spreadsheet and GenMB checks it, then loads the rows straight into your app - so you start with real records instead of an empty screen.

How It Works

If you already keep customers, products, or contacts in a spreadsheet, you do not have to retype them. CSV Import adds an "Import" button to the relevant list in your app. Your users (or you) pick a CSV or Excel file, and the wizard walks through the rest.

1

Ask in chat to add it

Say something like "let people import contacts from a CSV" and GenMB wires the import button into the right screen for you.
2

Upload the spreadsheet

The wizard reads the file, sorts out the encoding, and lines up the columns in your spreadsheet against the fields in your app, auto-matching obvious pairs like "First name".
3

Review and fix

It shows a preview with any bad rows highlighted, so problems surface before anything is saved.
4

Import

Confirm, and the clean rows load into your app. Larger files are handled in batches with a progress bar.
Always look at the preview before confirming. Messy data in a spreadsheet is the rule, not the exception, and the preview is where you catch it.

Preview Before You Commit

Nothing is saved until you confirm. The preview checks each row against your app's fields and points out exactly what needs fixing: a required field left blank, a date in an odd format, a number that is actually text. Fix the spreadsheet, re-upload, and only good rows go in. If a row still fails when you import, it is reported back to you instead of silently dropped.

Partial imports are allowed: the rows that pass go in, and you get a clear list of the ones that did not so you can deal with them.

Update Instead of Duplicate

Re-uploading an updated spreadsheet should not create duplicates. Choose a column that uniquely identifies a record, like email, and matching rows are updated in place while genuinely new rows are added. This makes CSV Import safe to run again whenever your spreadsheet changes.

Limits

  • Large files are imported in batches of up to 500 rows at a time, with a progress bar.
  • Your spreadsheet's columns need to line up with the fields your app already has.
  • Imports respect the standard write rate limit (30 writes per minute per app).
  • Available on all plans, including Free.

Starting from scratch with a file and want GenMB to build the whole app around it? See Business Data Ingest. CSV Import is for loading more rows into an app you already have.

For Developers

CSV Import is exposed to generated app code as window.genmb.import. The usual entry point is open(), which launches the self-contained wizard modal (file parse, column mapping, dry-run, and batched commit are all handled inside it):

window.genmb.import.open({
  tableName: 'contacts',
  schema: [
    { name: 'firstName', type: 'String', required: true, label: 'First name' },
    { name: 'lastName', type: 'String' },
    { name: 'email', type: 'String', required: true },
  ],
  uniqueKey: 'email',  // matching rows are updated instead of duplicated
  onComplete: ({ inserted, updated, errors }) => {
    // refresh your list view
  },
})

For a custom UI you can drive the two steps directly. Dry-run validates without writing; commit writes up to 500 rows per call (chunk client-side for larger files):

const { valid, errors } = await window.genmb.import.dryRun(
  'contacts', rows, schema, 'email',
)

const { inserted, updated, errors: commitErrors } =
  await window.genmb.import.commit('contacts', rows, schema, 'email')

Data safety

  • Table names are coerced through a safe-identifier guard before any SQL runs.
  • Inserts use parameterized SQL (asyncpg $1, $2, ...). No string interpolation of user data.
  • The signed-in end-user is resolved from the session cookie; if the target table has a userId column, it is stamped on every row.
  • Imports go through DataConnect against your app's own tables, subject to the standard 30 writes / minute / app rate limit.

FAQs

What is CSV Import?
A built-in import wizard that takes a spreadsheet you already have and loads its rows into one of your app's tables. It checks every row first and flags problems before anything is saved.
How does "update instead of duplicate" work?
Pick a column that uniquely identifies a record, like email. Rows that match an existing record by that column are updated; rows with no match are added as new. This keeps you from creating duplicates when you re-upload an updated spreadsheet.
What if my spreadsheet does not match my app?
The wizard previews your file against the target table and highlights the exact rows and fields that need fixing before you commit. You fix the source file, re-upload, and only clean data gets saved. Rows that still fail at save time are reported back to you.
Does it remember who uploaded each row?
If your table tracks an owner, the signed-in person who runs the import is recorded on each row automatically, so you can tell later who added what.

Ready to build?

Create your first app for free, no credit card required.