Skip to main content
Import records from JSON files into AGO. Use this source for content exported from another system, such as a knowledge base, a spreadsheet or a product catalog. Each JSON object becomes one knowledge document. To keep records in sync from an automation tool or your own scripts, you can also send them through the API.

Setup

  1. Go to Knowledge > Sources and click Create New Source.
  2. Enter a name and select json as the Source Type.
  3. Map the fields (see below) and click Save.
  4. Open the source. In the Content tab, click Import Content, select up to 10 .json files (20 MB each), and upload them.

Configuration

Use dot notation for nested fields, for example author.name.

File format

The file can contain:
  • An array of objects
  • An object with a data, records or items array
  • A single object, imported as one record
Files must be UTF-8 encoded.

Example

With Title Field question, Content Fields answer and category, and ID Field id, this creates a document titled “How do I reset my password?” with this content:
Fields appear in the order you list them, each prefixed by its name. The record’s fields are also stored as document metadata. If a record has no ID, AGO matches it by the file name and the record’s position. Renaming the file or reordering records can create new documents or update the wrong ones, so give each record a stable ID.

Send records through the API

Automation tools such as n8n or Zapier, or your own scripts, can send records to the source through the Public API v1 instead of uploading files. Give each document a page_id: your own identifier for the record. Sending the same page_id again updates the document instead of creating a duplicate, so you can rerun the same sync as often as you like.
The response lists what was created, what was updated, and which items failed:
To remove records that no longer exist in your system, delete them with the same identifiers:
The not_found list in the response contains 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. Records sent through the API use the title and content you send: the field mapping configured on the source does not apply.

Tips

  • Use the same fields in every object.
  • Pick a readable title field, not an ID or code.
  • Convert HTML to plain text or Markdown before export when you can.
  • Split very large exports into several files.

Troubleshooting

  • Check the file is valid JSON (no trailing commas, quoted strings).
  • Check the file is UTF-8 encoded.
  • Check the records are in an array, or in a data, records or items array.
  • Check the field names in Content Fields match exactly, including case.
  • Check the exclude prefixes don’t match the fields you need.
  • Give every record a unique value in the ID field.
  • To start over, empty the source, then upload again.