Google normally asks you for a credit card to build an api on their platform. Google Sheets is one of the most used data management tool. It is excel in browser that you do not have to download that looks good on Mac and can be collaborated.

You can use Google Sheets to make easy to use web apis that lists your research on your website. We have built a simple tool, that takes you out of above hustle, skip credit card requirements and get you into actually building your app.

Let’s get into building a demo Sheets API.

Step 1 : Create your Google Sheet

  • Click here to open google sheets
  • Create a new google sheet or use the one you want to pull data from.

Step 2 : Get your Sheet Id & Tab Id

  • Open your Sheet.
  • Go to URL and copy your Google Sheet Id.

Step 2a : Sheet Id

  • Your sheet Id is inside your URL.
  • https://docs.google.com/spreadsheets/d/1mkabaGFBmlXENl5b-HLVRRCNU8Tx_y3Pe_gnyIREX1I/edit
  • In above link, your Sheet Id is 1mkabaGFBmlXENl5b-HLVRRCNU8Tx_y3Pe_gnyIREX1I

Step 2b : Tab Id

  • It is the Sheet Name located at the bottom left corner of your sheet.

image

Step 3 : Create your API endpoints

  • Click here to Sign in to your nocodeapi dashboard.
  • Find Google Sheet in the Marketplace.
  • Click Activate.
  • In your dashboard, click on Make Google Sheets API
  • Click Choose Account to Allow NoCodeAPI to access your sheets data.
  • Enter your choice of name.
  • Paste the Sheet Id you got in Step 2.
  • Click Create

image

Step 4 : Test if it is working

  • Click on Use this API just above your created API endpoint.
  • It should open API’s documentation in the side bar.
  • You can see 5 x methods to manage your google sheet.
  • Click on Get rows to pick your formatted URL.

image

Postman Examples

( Note : You can paste this URL in your browser to get your sheet data. But we are using Postman to demonstrate all 5 x methods )

  • Open Postman. Click here to download if you don't have it yet.
  • Click on New button to create an app.
  • Enter the endpoint you copied in previous step.
  • Press Send & you should see your sheet data in the response.

Example 1 : GET Rows 👉 ( Get Request )

image

Example 2 : Add New Rows 👉 ( POST Request )

  • While adding new rows we are using POST request.
  • In below picture you can see 3 x coloured boxes.
  • Red Box — Update tabId with Sheet1 (in our case it is Sheet1, your can be different).
  • Yellow Box — Attach your data in 2D array this POST request.
  • Green Box — Our data is updated in our sheet.

image

Example 3 : Update Row 👉 ( PUT Request )

  • In the picture below, we have performed a PUT request to place data in our sheet.
  • Red Box — Change toggle in Postman to PUT.
  • Yellow Box — Paste the URL in the Request bar.
  • Pink Box — Format data according to the sheet.
  • Green Box — Our data is updated at Ser 2 with the new data.

image

Example 4 : Delete Row 👉 ( DELETE Request )

  • In the picture below, we have performed a DELETE request to delete a single row from our sheet.
  • Red Box — Change toggle in Postman to DELETE.
  • Pink Box — Format URL with your tabId and row_id.
  • Green Box — We got back a Deleted successfully message.

image

Example 5 : Create new Spreadsheet 👉 ( POST Request )

  • In the picture below, we have sent a POST request to create a spreadsheet
  • Red Box — we have updated the URL with query parameter title
  • Green Boxes — Our sheet is created with given title and success message is received.

image

This is all

It is really so easy to handle spreadsheets through nocodeapi. Google is mega industry today, and to get the right data in small amount of time has gotten complex. Lengthy documentations and un-necessary options, which are not needed for a basic user, makes it harder to implement our specific use case.

Feel free to use nocodeapi for 900 requests. If you go beyond that, we are offering a very cheap pricing plan for your ease.

Thanks for reading. Give us a like / follow on twitter.