strapi-plugin-import-export-data
v1.1.0
Published
Strapi plugin for importing and exporting collection data
Downloads
178
Maintainers
Readme
strapi-plugin-import-export-data
CSV import and export for Strapi 5 collection types, with column selection, CSV preview, import column mapping, batched import progress, and safer handling for Strapi object fields such as blocks.
Compatibility
- Strapi:
>=5.0.0 - Tested with Strapi:
5.46.1 - Node: follows your Strapi 5 project requirements
- Supported file format: CSV
- Not supported: Strapi 4
Features
- Export collection entries to CSV.
- Select exactly which columns to export.
- Include drafts or export only published records for Draft & Publish collections.
- Preview collection data before export.
- Preserve Strapi object fields by exporting object values as JSON.
- Import CSV files into collection types.
- Preview CSV rows before import.
- Map CSV columns to Strapi fields before importing.
- Automatically map CSV columns when names match Strapi fields.
- Import records in batches with progress feedback.
- Row-aware import errors for easier troubleshooting.
- Filters out private/password fields from export and import.
- Guards exported CSV values against spreadsheet formula injection.
- Rejects non-CSV spreadsheet packages such as Apple Numbers files.
Installation
npm install strapi-plugin-import-export-dataor:
yarn add strapi-plugin-import-export-dataRestart Strapi after installation.
Configuration
Enable the plugin in your Strapi app config:
// config/plugins.ts
export default {
'strapi-plugin-import-export-data': {
enabled: true,
},
};Then restart your Strapi server and open the plugin from the Strapi admin sidebar.
Usage
Export CSV
- Open Import-Export Data in the Strapi admin panel.
- Choose Export.
- Select a collection.
- For Draft & Publish collections, choose whether draft records should be included.
- Review the KPIs and preview.
- Select the columns you want to export.
- Click Export CSV.
Object values, including Strapi blocks content, are exported as JSON strings so they can be imported back into Strapi.
By default, draft records are included to preserve the plugin's earlier export behavior. Choose Exclude to export only published records.
Import CSV
- Open Import-Export Data in the Strapi admin panel.
- Choose Import.
- Select a collection.
- Choose a
.csvfile. - Review the CSV preview.
- Map CSV columns to Strapi fields.
- Click Import CSV.
The plugin imports records in batches and shows progress while importing.
CSV Notes
- Upload real
.csvfiles only. - Spreadsheet files from Apple Numbers, Excel, or Google Sheets must be exported as CSV first.
- For
blocks,json, components, dynamic zones, media, and relations, values should be valid JSON. - Empty cells are skipped during import.
- System fields such as
id,documentId,createdAt,updatedAt, andpublishedAtare ignored during import.
Limits And Safety
The plugin includes defensive limits and checks:
- Legacy uploaded CSV file size limit: 10 MB.
- Legacy uploaded CSV row limit: 10,000 rows.
- Batched import endpoint limit: 500 records per batch.
- Maximum CSV columns per row: 200.
- Maximum cell length: 1,000,000 characters.
- Private fields and password fields are excluded from export/import.
- Admin and plugin content types are not available for import/export.
- Spreadsheet formula-like values are escaped when exporting CSV.
Troubleshooting
I see [object Object] in old exports
That CSV was exported before object fields were serialized as JSON. Re-export the collection with the latest plugin version.
Import says the file is a spreadsheet package
The selected file is not CSV. Export it from Numbers, Excel, or Google Sheets as comma-separated values (.csv) and import that file.
Import fails for a blocks field
Strapi blocks fields must be valid JSON arrays. Exporting from this plugin produces the expected format.
Current Version
Recommended release version:
1.1.0This is a minor release because it keeps Strapi 5 compatibility while adding a redesigned admin workflow, export column selection, import column mapping, batched progress, object-field handling, and security hardening.
Development
Build the plugin:
npm run buildVerify in a linked Strapi app:
cd ../strapi-plugin-test-app
npm run buildLicense
MIT
