Skip to main content
Import documents from JSON files into AGO. Use this connector for custom data sources, migrations, or bulk imports from any system that can export JSON.

Overview

Prerequisites

  • JSON file with your documents
  • Understanding of your data structure

Configuration

Required Fields

Optional Fields

Setup Steps

  1. Navigate to KnowledgeSources
  2. Click Create Source
  3. Select JSON as the source type
  4. Configure field mappings:
    • Set the title field
    • Set content field(s)
    • Set ID field (optional)
  5. Click Save
  6. Upload your JSON file via the sync interface

JSON Format

Basic Format

Array of objects with consistent structure:

Multiple Content Fields

Combine multiple fields into document content:
Configuration:

Custom Field Names

Map any field structure:
Configuration:

Uploading Files

Via Admin Interface

  1. Go to the JSON source in Admin > Knowledge > Sources
  2. Click Import > Upload File
  3. Select your JSON file
  4. Monitor import progress

Via API

Automation tools (n8n, Zapier, your own scripts) send the records directly to the Public API v1 instead of uploading a file. Give each document a page_id — your own identifier for that record. Sending the same page_id again updates the document rather than creating a duplicate, so you can re-run the same sync as often as you like.
The response tells you what was created, what was updated, and which items failed:
To remove records that no longer exist upstream, delete them with the same identifiers:
not_found comes back as page_id values, so you can match it against your own records.
Both endpoints accept up to 100 items per request, and need an API key with the knowledge:write scope. When you send records this way, you choose the title and content yourself, so the field mapping configured on the source does not apply.

Content Field Combination

When multiple content fields are specified, they are combined in order: Configuration:
Result:

Best Practices

Data Preparation

  • Ensure all objects have the same structure
  • Use consistent field names
  • Clean HTML or convert to Markdown before import
  • Validate JSON syntax before upload

Field Mapping

  • Choose descriptive titles (not IDs or codes)
  • Include all relevant content fields
  • Use a unique ID field for updates

Large Files

  • For large datasets, consider splitting into smaller files
  • Upload sequentially to avoid timeouts
  • Monitor sync history for errors

Migration Use Cases

From Other Knowledge Bases

  1. Export data from source system as JSON
  2. Map fields to AGO’s expected structure
  3. Upload and verify import

From Spreadsheets

  1. Export spreadsheet to CSV
  2. Convert CSV to JSON (many tools available)
  3. Upload JSON to AGO

From Databases

  1. Export database query results as JSON
  2. Transform field names if needed
  3. Upload to AGO

Troubleshooting

  • Validate JSON syntax (use online validators)
  • Check for trailing commas
  • Ensure proper quoting of strings
  • Verify content_fields includes all needed fields
  • Check field names match exactly (case-sensitive)
  • Review for null or empty values
  • Use unique values in id_field
  • Re-importing updates existing documents by ID
  • Clear source before re-importing for fresh start
  • Use UTF-8 encoding
  • Handle special characters properly
  • Convert from other encodings if needed