• Log in
  • Contact Us

Get in touch  

Developer Guides • Webhooks | Products | Integrations

Sync catalog to Algolia using Moltin webhooks

Last updated: 05 Jul 2019

In this example we will clone and configure the repository containing the code necessary to sync data between Moltin and Algolia using Moltin webhooks.

Running locally

When using this example locally, it's recommended you use a service ngrok to tunnel your dev environment to the outside world.

Once you have the repo running locally, you'll want to add the integration via the Moltin Dashboard. The URL will be the one provided by ngrok.

1. Download the example

Clone the repository:

git clone git@github.com:moltin/integration-examples.git

Install the dependencies with Yarn

cd integration-examples/sync-catalog-to-algolia

2. Configure Algolia

In this example we will sync data to Algolia. Once you've signed up to Algolia, you'll need to create a new app and give it a name.

Next head to the API keys section and make a note of your Application ID and Admin API Key, we will need these next.

3. Configure your ENV variables

You will want to create an .env inside the directory /short-order-id containing all the keys for the below:


MOLTIN_WEBHOOK_SECRET can be anything you want.

4. Start the server and ngrok

Start the development server

yarn dev

The server will typically start on PORT 3000. If not, make a note for the next step.

Start ngrok

ngrok http 3000

This will expose PORT 3000 to the outside world. Make a note of the URL ngrok provides.

5. Create a new Moltin integration

You must now tell Moltin the ngrok URL above. From within the Moltin Dashboard, head to Settings > Integrations and click Create.

Enter a name and description for your integration. It might be useful to prefix the name with DEVELOPMENT for easier referencing.

Next, enter the ngrok URL and Secret Key that matches that inside .env


Now you'll want to configure this webhook to invoke your serverless function when any of the catalog resources are created, updated or deleted.


That's it! Click Save 🎉

Further reading


Explore More Developer Guides

26 Jun 2019

Manage abandoned carts with Flows

Quick intro on how carts work There are three aspects of how Moltin carts operate:

Read More
Matt Foyle
in Flows | Carts
14 Jun 2019

Extend the order and cart resource with Flows

Extend the order resource to add shipping provider and a consignment number.

Read More
Joanna Suau
in Flows | Orders | Carts
14 Jun 2019

Store data form third party integration with Flows

Store nexus locations from a tax calculation service using Flows.

Read More
Joanna Suau
in Flows | Integrations