Import Data
Bulk-import records from CSV files into Sporeline using the guided import wizard
adminImport Data
The Import Data page lets you load bulk records from CSV files into Sporeline without entering each record manually. It lives at Settings > Import.
Role requirements
You must have at least the Manager role to access this page. Viewers and Workers will see an access-denied message.
Supported entity types
| Entity | What is imported |
|---|---|
| Recipes | Mushroom cultivation recipes |
| Customers | Customer records |
| Harvests | Harvest weight records |
| Batches | Batches with automatically created blocks |
| Blocks | Blocks into existing batches |
| Bag Types | Substrate bag type definitions |
| Locations | Grow rooms and storage areas |
The import wizard
The wizard walks you through four steps. A step indicator at the top shows your progress.
Step 1 — Upload
- Select the entity type you want to import using the radio buttons.
- If you have a saved profile for this entity type, select it from the Saved profile dropdown to pre-fill column mappings (see Saved profiles).
- Paste your CSV data into the text area, or click Upload file to load a
.csvfile from your device.- The first row must be a header row.
- Files must be UTF-8 encoded and comma-separated.
- Click Analyze & Map Columns to let the system detect your column types and advance to the mapping step.
Step 2 — Map
The mapping workbench shows your source columns alongside the expected columns for the target entity. Drag or use the dropdowns to map each source column to the correct target field.
For Batches imports, an additional Granularity selector appears:
| Mode | Behavior |
|---|---|
| Explode | Each CSV row creates one block within a new batch |
| Group By | Rows that share a value in a chosen column are grouped into the same batch |
In Group By mode a batch has one recipe, so every row in a group has to name the same recipe (capital letters don’t matter). If two rows share a batch name but name different recipes, that batch isn’t imported at all, and the error lists the spreadsheet rows involved so you can give them separate batch names and import them again. The other batches in the file still import.
Click Validate & Preview when mappings are complete.
Step 3 — Preview
The preview step shows a validation summary:
- Total rows — total rows in the file
- Valid rows — rows that passed validation and will be imported
- Error rows — rows that failed validation and will be skipped
If any rows have errors, a Validation Errors table lists each problem: the row number, the column that failed, and a description of the issue.
A Preview table shows the first 10 valid rows to help you confirm the mapping looks correct before committing.
Click Import N records to execute the import, or Back to return to the mapping step. The import button is disabled if there are zero valid rows.
Step 4 — Done
The results screen shows the count of successfully imported records and any runtime errors that occurred during import. Click Import More to start a new import.
Saved profiles
After a successful import you can save the column mappings as a profile for reuse. The Saved Profiles card appears below the wizard at all times.
Saving a profile
After completing step 4, the Save Current Mapping button appears in the Saved Profiles card header. Click it to open the save form, enter a Profile name and an optional description, then click Save Profile.
Using a profile
On step 1, if saved profiles exist for the selected entity type, they appear in the Saved profile dropdown. Select a profile to automatically apply its column mappings and skip straight to validation.
Deleting a profile
Click the trash icon on a profile row to delete it. Existing import history is not affected.
CSV format tips
- Header row required. The first row is always treated as column names.
- UTF-8 encoding. Avoid exporting CSVs with Windows-1252 or Latin-1 encoding.
- Comma-separated. Tab-delimited files are not currently supported.
- Up to 250 rows per file. A larger file is refused with a message asking you to split it. Split it into files of 250 rows or fewer, each with the header row, and import them one after another. A file with very long text in each row can hit the size limit before 250 rows; split it the same way.
- Batches and blocks: up to 2,000 blocks and 100 batches per import. A batches file may create at most 2,000 blocks in total (the sum of
planned_block_count, or one per row when grouping) and at most 100 batches. A blocks file takes at most 100 rows. Harvests take at most 100 rows. Larger files are refused before anything is written; split them. - Active-block limit. Blocks imported at a stage that isn’t finished count toward your plan’s active-block limit, and the room for them is taken before anything is written. If two imports run at the same time and only one fits, the other is refused with the plan’s limit message and nothing is written for those rows. A blocks file bigger than the room you have left imports the rows that fit and refuses the rest.
- When rows don’t import, their room is given back. If some rows fail, Sporeline gives their room back on your active-block count. If that doesn’t go through, the import still finishes, your imported records are fine and you don’t need to import the file again, but your count can stay a few blocks high until the usage recount Sporeline runs (
scripts/reconcile-tenant-usage-counters.py) corrects it. The import keeps a note that says “The farm’s active-block count may be ahead by N blocks”, and the assistant’s imports put the same note on the row that failed. If a plan-limit message looks wrong after an import like that, contact support. - If an import stops partway. An import that was cut off shows as Stopped under Recent imports, with how many rows are in. Click Resume import to bring in the rest; the rows already saved are not brought in again. See Import from spreadsheets for what a resume does with batches and blocks.
- Date fields should use
YYYY-MM-DDformat when possible for reliable parsing. - Weight fields are expected in grams unless your tenant is configured for pounds, in which case the importer applies the appropriate conversion.