API Connector for data importing
Published: 2021-03-28 13:06:55


If you have a lot of interesting data in your JSON format. Maybe in Airtable, or Webflow, or an API that you want to bring to Google Sheets. You can use NoCodeAPI to do just that. Crazy Awesome !! 😃

### Video Tutorial

If you love video tutorial then we also have video tutorial for you.
{% youtube eR_ZW4gUUn8 %}

### Step 1 : Fetch JSON from a fake API

⁃ For this tutorial we are going to fetch our fake JSON data from [JSON placeholder API](https://jsonplaceholder.typicode.com/)
⁃ As you scroll down, fake JSON placeholder offers different options to fetch this data. We are going to use [/todos](https://jsonplaceholder.typicode.com/todos) to fetch 200 todos in JSON and create 200 rows in our google sheet.

![fakeJSON-todos](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tem7ykyidwls97dbavxb.png)

⁃ Test if the endpoint is working by pasting this URL in your browser > `https://jsonplaceholder.typicode.com/todos`. It should give you JSON data inside the browser (like below — I am using [JSON formatter](https://chrome.google.com/webstore/detail/json-formatter/bcjindcccaagfpapjjmafapmmgkkhgoa?hl=en) chrome extension to beautify JSON).

![fakeJSON-test](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vv1hryyonoqd28mw8c3e.png)

### Step 2 : Connect Google Sheet with NoCodeAPI

⁃ Sign In to NoCodeAPI dashboard by clicking [here](https://app.nocodeapi.com/login).
⁃ Go to Marketplace and `Activate` google sheet API

![Sheet Activate](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qsq7jp1z7txhyau2fnn2.png)

⁃ Click on `Make Google Sheet` API

![Sheet Make API](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tkb31nowyab1vsddgei9.png)

⁃ A sidebar appears. In the side bar, “Choose” your Google Account through which you are managing your Google Sheets.
⁃ `Allow` nocodeapi to manage your Google Sheets data

![Sheet API](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lwyiq2nwm7izoppaqdgi.png)

⁃ You will be redirected to NoCodeAPI dashboard.
⁃ Give your API a name and paste your Sheet ID in the Sheet ID input field.

![Sheet filled form](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h64taavxpbqupxkilhmi.png)

⁃ You can find you Google Sheet ID in your URL. It is located between `/d` and `/edit` text, like below.

![Sheet ID](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cjzof8a3as8zoix8e6wr.png)

⁃ Click `Create` button and it will generate your NoCodeAPI endpoint.

![Sheet new endpoint](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sucuw1s2n3vfgxz8hqm5.png)

⁃ Using this endpoint we are going to import our JSON data to the Google Sheet.

### Step 3 : Import your JSON data to Google Sheets

⁃ Click on 3 dots button to find `Import Data` button in drop down. Click on it to start importing your JSON data to your Google Sheet.

![Sheet Import Data](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nrtynnzm8k7g4nnklh9w.png)

⁃ An overlay opens where we are going to convert our JSON data to Google Sheet.
⁃ Paste your data in the `GET` input → https://jsonplaceholder.typicode.com/todos
⁃ Click on `Fetch Data` button.
⁃ Add `Id`, `title`, `completed` to our selective table headings.
⁃ Click on `Next Step` button

![Sheet fetch Data](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q3nk4dudwtw84q16n2k6.png)

⁃ The drop down `Input Table Name & push data` header opens on itself.
⁃ Change the name of heading from `completed` to `status` like below.
⁃ Select your Sheet API, you created in Step 2.
⁃ Select the empty sheet `Sheet2` that gives you a success message.
⁃ Click `Push Data` to send your JSON data to Google Sheet.

![Sheet Push Data](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0dlu2sz2jennnue7h9yb.png)

⁃ Next to Push data you should find your status bar turning green.

![Sheet Success](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rns4dqgeynr6qmsp7e03.png)

### This is it

We have successfully converted our JSON data to Google Sheet. You can fetch your required JSON data to Google Sheet in a similar fashion.

I hope you liked this article. Help us write better by giving your feedback on our twitter channel at [@nocodeapi](https://twitter.com/nocodeapi). Thank you for reading. Happy Coding !! ✌️