How to import a JSON dataset into a Kintone App?

Hi friends, this is my first post in this forum. I am an IT Linux/infrastructure guy who is totally new to JavaScript, so please go easy on me :slight_smile:

Question / Problem

How do I import a JSON dataset into a Kintone App using the REST API?

I will add the appropriate fields in the Kintone App to store that JSON data.

Context

The JSON dataset was extracted from another platform called Workable using python.

Hello @rsaenz ,

Welcome to the Kintone Developer Forum & thank you for posting your first question!

So it sounds like you want to migrate data from Workable to Kintone.

Data Migration Options

On the topic of “data migration”, there are three ways to do this:

  1. Convert the JSON dataset into a CSV file and import it into Kintone

  2. Convert the JSON dataset into a Excel file and import it into Kintone

  3. Execute a script to run Add Records API calls based on the JSON dataset.

By far, the easiest way to do this is to convert the JSON dataset into a CSV file and import it into Kintone. You can use a tool like JSON to CSV to do this.

For more information on Option 3 (API method)

We would need more information to help you out. Please provide more information regarding:

  • Your current situation
  • How is the JSON structured?
  • Have you built out the Kintone App? (Field types and names are important)
  • If you got an error message, please let us know.

Hi Genji, thank you very much for the warm welcome and for your valuable help on this matter!

So it sounds like you want to migrate data from Workable to Kintone.

Correct, I am migrating data from Workable to Kintone.

  • I already generated a CSV file from the JSON - result.csv.
  • I am currently working on importing the CSV file into Kintone.

Have you built out the Kintone App? (Field types and names are important)

Yes, I have a Kintone App (with the required fields) on the developer subdomain for testing.


Using cli-kintone tool to import CSV file into Kintone

I am using a tool called cli-kintone.

  • I have installed it and set the execution permissions so I can execute it in my Ubuntu virtual machine.

  • I have been experimenting with the CLI tool to extract some info without success.

Code / Attempts

I am trying to run the following command:

  • :zap: Example subdomain = MY_SUBDOMAIN
  • :zap: Example User's log in name = MY_USERNAME

./cli-kintone --import -a 63 -d MY_SUBDOMAIN.kintone.com/k/ -u MY_USERNAME ~/result.csv

After I entered the password, the tool just stays there without giving any output or error.

It seems to be processing without giving an error, but it does not give any output even after an hour.

The same thing happens when I use the -t parameter with the API key.

JSON Structure

workable > /candidates response

Once again, thank you very much for your valuable help.

Kind regards,

Rod

Hello @rsaenz , Thank you for the additional information, but I am still a bit lost regarding your situation. Please answer the following questions:

1. If you already have a CSV file, please verify that you can import it into Kintone with the CSV file to Kintone App method?

  • This way, we can be 100% confident that your CSV file/ JSON data is not the problem.

2. Since this is a Kintone Developer community, please post an example JSON dataset that mimics the JSON dataset in question.

3. Did you review the following two tutorials regarding the cli-kintone command line tool?

Thank you for your time ~
The more information you provide, the easier it is for the community to help you out ~