Airtable is a web-based popular database tool alternative to Google sheet. You can use Airtable to manage blog contents, Marketplace data, project tasks, teams managements, finance spreadsheets, & more.
In this blog post, we are going to show you how you can sync your airtable 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 Airtable Data to Algolia
There are three steps:
- Setup Airtable API
- Setup Algolia API
- Use Integromat to automate
Setup Airtable API
Login to NoCodeAPI, find the Airtable into the Marketplace and activate this. You will see a page to set up Airtable API endpoints. Click on Make Airtable API
To set up Airtable API you need an API key and Base 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.
Then select an Action call Make a request and you will see a form to input your Airtable Get All records endpoint API from NoCodeAPI dashboard.
So, your Airtable endpoint should look like this ↓
In my Airtable bases, the table name is movies.
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 Airtable records 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 records 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.
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.
So, you can run this scenario at a regular interval. Like you can do every 1 hour, every day, day of the week, or custom date.
Click on the timer icon on the starting module.
This is it
I hope you liked this article. Help us write better by giving your feedback on our twitter channel at @nocodeapi.
Thank you for reading. Happy Coding !! ✌️