Skip to main content

Import and export workflows

Comindwork provides several ways to import data into and export data from your workspaces - from UI-based uploads to programmatic bulk operations.

Importing records

From the UI

Use the built-in data import feature to upload records from spreadsheet files:

  1. Navigate to the target app in your workspace
  2. Open the list menu and select Import data
  3. Upload a CSV or XLSX file
  4. Map file columns to app fields
  5. Choose how to handle duplicates
  6. Preview the results and confirm the import

From the CLI

Two CLI commands are available for importing records:

createRecords - create new records from a file:

npx comind createRecords <app> <workspace> <file>

importRecords - import with full control over duplicate handling:

npx comind importRecords <app> <workspace> <file>

Duplicate handling modes:

ModeBehavior
BlockFail the entire import if any duplicates are found
SkipSilently ignore duplicate records
ImportUpdate existing records (upsert)

Action modes:

ModeBehavior
CreateAndUpdateCreate new records and update existing matches
CreateOnlyOnly create, skip existing
UpdateOnlyOnly update, skip new
PreviewDry run - show what would happen without changes

From code (server-side)

Use Cmw.importData() in action code for programmatic imports:

await Cmw.importData({
data: records,
keyFields: ["external_id"],
duplicateHandling: "Import",
actionMode: "CreateAndUpdate",
fieldMapping: [
{ source: "ext_name", target: "title" },
{ source: "ext_date", target: "creation_date" }
]
});

Importing list views

Import saved list view configurations (filters, columns, sort order) using the CLI:

npx comind importCustomViews

Exporting data

From the UI

Export the current list view to Excel:

  1. Open any list view
  2. Click the Export button in the toolbar
  3. The export respects your current filters, sorting, and visible columns

The export produces an XLSX file.

From the CLI

dump - export a running app schema back to TypeScript source files:

npx comind dump <app-id> <target-directory>

Converts compiled JavaScript back into editable TypeScript components (fields, actions, views, settings). Useful for migrating apps from the web editor to code-based development.

dumpLint - same as dump, with ESLint auto-formatting:

npx comind dumpLint <app-id> <target-directory>

Managing app source code

push - upload local source files to METAMETA storage:

npx comind push <app-name>

Diffs local files against remote and uploads only changes. Files are formatted with Prettier before upload.

pull - download app source to a local directory:

npx comind pull <app-name> <target-directory>

Use this to start coding an app that was originally created in the web editor.

Zero-code to code workflow

Move an app from the web editor to code-based development:

  1. Create the app using the web UI editor
  2. Pull the source: npx comind pull my-app ./apps/my-app
  3. Customize in your IDE - add fields, actions, views
  4. Install back to the workspace: npx comind install my-app WORKSPACE

Changes flow bidirectionally. Web editor changes can be pulled back to code, and code changes deploy via the install command.