Skip to main content
Bulk Import allows you to import hundreds of resources at once from JSON files. Each item in your JSON becomes a separate resource with automatically assigned metadata and optional translations.

Overview

Bulk Import is ideal for:
  • Migrating content from other systems
  • Loading large document collections
  • Populating a datasource with pre-structured data
  • Batch creation with consistent metadata
  1. JSON File — array of objects
  2. Validation — checked against the metadata schema
  3. Default Values Assignment — fills in missing optional fields
  4. Content Mapping — selects which field becomes resource content
  5. Optional Translation — translates content if enabled
  6. Batch Creation — creates resources in batches
  7. Resource Monitoring — tracks progress in real time

Key Differences: Upload vs Import

For: Individual or bulk file uploads
  • Upload files (PDF, images, etc.)
  • Minimal configuration needed
  • Fast for a few dozen files
  • Example: Upload 10 PDFs at once

Bulk Import Workflow

Step 1: Prepare JSON File

Create a JSON file with an array of objects:
Requirements:
  • Valid JSON format (array at root level)
  • Maximum 1,000 items per file
  • Maximum 10 MB file size

Step 2: Validation Against Metadata Schema

The system compares your JSON fields against the datasource’s metadata_schema:
  • Datasource schema:
    • author (str, required)
    • category (str, required)
    • tags (str, optional)
  • Validation results:
    • Item 1: Has all required fields
    • Item 2: Missing tags field (optional — will use default)
Validation Results:

Step 3: Assign Default Values

Provide default values for missing optional fields:
Configuration Fields:

Step 4: Resource Creation

The system processes your JSON in batches: Processing Details:
  • Batch size: 10 resources simultaneously
  • Retry attempts: 3 with exponential backoff
  • Rate limit: 10 resources/second per project
  • Translation: Optional via core agent
Resource Payload:

Step 5: Monitor & Download Results

Real-time progress tracking:
  • Queued: 500
  • Processing: 47
  • Successful: 453
  • Failed: 0
Export detailed logs in JSON for auditing:
  • Item-by-item status
  • Error messages for failures
  • Success confirmations
  • Retry history

JSON Schema Validation

Example Datasource Schema

Example JSON to Import

Validation Output


Feature: Auto-Translation

Enable optional automatic translation during import:

Configuration

How It Works

  1. For each JSON item, the content field is translated
  2. Translation is done via the core agent translator
  3. Original language metadata is preserved
  4. Marked as translated: true in extra_info

Processing Impact

  • Time: +20-40% per item (includes API latency)
  • Tokens: Uses LLM tokens from your project
  • Cost: Charged to your project’s consumption

Example Workflows

Scenario 1: Blog Articles

JSON structure:
Datasource schema:
Configuration:

Scenario 2: Product Catalog

JSON structure:
Datasource schema:
Configuration:

Scenario 3: Multilingual Content

JSON structure:
Configuration:

Limits & Constraints

File Size

Maximum 10 MB per import file

Item Count

Maximum 1,000 items per file

Batch Size

10 resources processed simultaneously

Rate Limit

10 resources/second per project

Field Limits

  • String fields: Max 10,000 characters
  • Number fields: Standard JSON number limits
  • Array fields: Max 100 items per array

Error Handling

  • Retry attempts: 3 per failed resource
  • Backoff strategy: Exponential (1s, 2s, 4s)
  • Failed items: Retryable separately

Best Practices

Validate JSON First

Use a JSON validator before importing

Test Small Batch

Import 10-20 items first to verify

Meaningful Content Field

Choose the field with main content

Smart Defaults

Provide sensible default values

Preparation Checklist

  • ✅ Valid JSON format (valid array)
  • ✅ All required metadata schema fields present
  • ✅ Correct data types for fields
  • ✅ Content field contains meaningful text
  • ✅ File size under 10 MB
  • ✅ Item count under 1,000
  • ✅ Default values for optional fields
  • ✅ Translation language selected (if enabled)

Troubleshooting

Symptom: Upload fails immediatelySolution:
  • Validate JSON syntax at jsonlint.com
  • Ensure array at root level: [...]
  • Check no trailing commas
  • Verify all quotes are proper JSON quotes
Symptom: Item validation failsSolution:
  • Check datasource metadata schema
  • Provide default value for missing field
  • Or add field to JSON items
  • Verify field names match exactly (case-sensitive)
Symptom: “expectedType: int, actualType: string”Solution:
  • Convert value to correct type in JSON
  • Example: "priority": 5 (not "5")
  • For booleans: true/false (not "true")
Symptom: 950 succeeded, 50 failedSolution:
  • Check error logs for failed items
  • Fix issues in those specific items
  • Re-import failed items separately
  • Verify API connectivity for external lookups
Symptom: Import taking very longSolution:
  • Translation enabled? Disable for speed
  • Network bandwidth available?
  • Consider splitting into smaller batches
  • 10 resources/sec is expected rate

Next Steps