Skip to main content
Staffify AIHelp Center

Import questions and answers from a JSON file

Add hundreds of questions and answers in one go, for example from an existing FAQ or another system.

How to2 min readUpdated

With a JSON import you create a knowledge base with many questions and answers at once. Use it when you already have a list of questions and answers, for example from a spreadsheet, a helpdesk or another chatbot. For a handful of questions, quick answers are faster.

The file

The file is a list of items. Every item has a question and an answer. A category is optional and helps you find entries back later.

[
  {
    "question": "What are your opening hours?",
    "answer": "We are open Monday to Friday from 9:00 to 18:00.",
    "category": "Hours"
  },
  {
    "question": "Do you offer refunds?",
    "answer": "Yes, within 30 days of purchase with a receipt.",
    "category": "Policy"
  }
]

Items without a question or without an answer are skipped. So are items with other field names, such as title and content.

Import the file

Go to AI AgentsToolsKnowledge Base and open the tab JSON.

  1. Enter a Name for the new knowledge base, for example "Support answers".
  2. Drag your .json file into the upload area, or click it to choose the file.
  3. Check the message below the upload area. It shows how many items were skipped because a question or answer is missing.
  4. Click Import. The button shows how many entries will be imported.

The knowledge base appears in the list straight away. It becomes fully searchable within a few minutes. Then link it to your agents, see Link a knowledge base to your agents.

Fix skipped items in your file and import it again, or add them later with Add Entry on the tab Entries of the knowledge base. A new import creates a new knowledge base; delete the old one if you replace it.

Make a JSON file from a spreadsheet or document

  • From a spreadsheet: make the columns Question, Answer and optionally Category. Save the sheet as CSV and convert it to JSON with a CSV to JSON converter. Note: in the file the field names must be question, answer and category.
  • From a Word or text document: put your questions and answers in a clear order, then convert them to the format above. An AI assistant can do this for you if you ask it to make a JSON list with a question, an answer and an optional category per item.

Save the result as a text file with the extension .json.

Frequently asked questions

Does an import with many entries count as many knowledge bases?
No. The whole import counts as one knowledge base within the limits of your package, see Sizes and limits.
Can I link the knowledge base before it is fully searchable?
Yes. The agent starts using the entries as soon as they are ready.

Related articles

Was this page helpful?