Google sheet is an go to tool to storing data into row and column for free with thousands of in-built funstions and addons. Access google sheet data with API and using into the projects.
Let’s take an example, you are building an marketplace website with google sheet API and wants to add advanced search option there. So, it’s now possible without any coding.
In this blog post, we are going to show you how you can sync your google sheet data into algolia and use the Algolia endpoint into your project for the Advanced search feature.
If you want to skip this blog then watch the YouTube video in action ↳ Sync Google Sheet Data to Algolia
There are three steps:
- Setup Google Sheet API
- Setup Algolia API
- Use Integromat to automate
Setup Google Sheet API
Login to NoCodeAPI, find the Google Sheet into the Marketplace and activate this. You will see a page to set up Google Sheet API endpoints. Click on Make Google Sheets API
To set up Google Sheet API you have to Authenticate with your google account and have to input your spreadsheet ID. You can watch the video below ↓
Setup Algolia API
Go to NoCodeAPI Marketplace, find Algolia API, and activate this. Click on the Make Algolia API.
To set up Algolia API you need Admin API Key and Application Id. You can watch the video below ↓
Integromat is an automation tool to connect multiple apps. It’s easy to set up. Let’s start and login on Integromat
After login in there, you can see a button Create a new scenario to set up one.
In my Google Spreadsheet, the tabId is papi.
Now put your endpoint into the URL field, Choose GET method, check on Parse response, and click on OK button.
Now run this module, right-click on the module, and click on Run this module only. You will see the result.
Now, we need a second module, called Iterator. Click on the green color tools icon in Tools to select Iterator and connect with the first HTTP module.
Click on the Iterator to iterate our Google rows to filter the data we want to push into Algolia. You will see a module with an Array label. Click on the input box and select array data by click on that.
Now, we need our third module Aggregate to JSON to make JSON Array from the Iterator module. To add JSON Aggregator, click on Plus Icon on the button to search for JSON and select Aggregate to JSON option.
You will see two input fields ↓
- Source module– Select Iterator option
- Data structure– Your data schema that you want to push into Algolia
In the Data structure field, click on Add button and give a name to your data structure and add items you want to push.
You can see above in the picture, we add two items name and description and bind these values from iterator module.
Now, we need our last module HTTP to Make a request. This module will push your formatted JSON data to the Algolia endpoint.
So, your Algolia endpoint should look like this ↓
Now put your endpoint into URL field, Choose POST method, select Body type Raw, Content type JSON (application/json), Request content JSON string from Aggregate to JSON, and click on OK
Now it’s time to test this automation. So, click on the button Run once to test this and on end, you will see the data into your Algolia dashboard.