Contentstack LogoContentstack Logo

Algolia

The Algolia Connector helps you to create search index entries in your Algolia account.

Prerequisites

To use the Algolia connector, you first need to add your Algolia account. To do so, follow the steps given below:

Connect your Algolia Account to Automate

  1. Click Configure Action Step from the left navigation panel.
  2. Click Action Step to configure third-party services.
  3. Within the Configure Action Step, click the Algolia connector.
    Select_Connector.png
  4. Under Choose an Action tab, select any one action from the list. Here, we are selecting the Index Entries action.
    Select_Index_Entries_Action.png
  5. On the Configure Action page, click the + Add New Account to add your Contentstack account.
    Add_Account_Index_Entries.png
  6. In the Authorize modal, enter a Title, an Application ID, and an API Key.

    To find your Application ID and API Key, log in to the Algolia dashboard and perform the following steps:

    Algolia_API_Key

    Additional Resource: For more details, refer to the Importing with API’s document.

    Then, click Authorize. Algolia_Authorize.png

This sets up your Algolia account for the Algolia connector.

Set up the Algolia Connector

Perform the following steps to set up the Algolia action connector:

  1. From the left navigation panel, click Configure Action Step.
  2. Then, click Action Step to configure third-party services.
  3. Within the Configure Action Step, click the Algolia connector.
    Select_Connector.png

    Note: You can sort and search the connector(s) based on the filter.

  4. Under Choose an Action, you will see three actions: Delete Entries, Index Entries, and Update Entries.
    Select_Action.png

Once done, you can go ahead and set up your Algolia connector.

Action 1: Select the Index Entries action:

  1. Under Choose an Action tab, select the Index Entries action.
  2. On the Index Entries Configure Action page, enter the details given below:
    1. Click + Add New Account button to connect your Contentstack account as shown in the Connect your Algolia Account to Automate step.
    2. Select the Index Name where you want to send the data in the form of a list of objects.
    3. In the Entries field, enter the data to be included in the index.
      Select_Fields.png

      Note: Provide your index data as per your object schema and in JSON format only. You can add a JSON object or an array of JSON objects.

  3. Click Proceed.
  4. Check if the details are correct. If yes, click Test Action.
    Test_Action.png
  5. Once set, click Save and Exit.
    Save_Exit.png
  6. Go to the Algolia Index section and check the latest index entry with the data we passed as objects within the connector configurations.
    Output.png

Action 2: Select the Delete Entries action:

  1. Under Choose an Action tab, select the Delete Entries action.
  2. On the Delete Entries Configure Action page, enter the details given below:
    1. Click + Add New Account button to connect your Contentstack account as shown in the Connect your Algolia Account to Automate step.
    2. Select the Index Name.
    3. Enter the object ID to be deleted in the Entries field.
      Select_Fields.png

      Note: You can add multiple object IDs separated by a comma to delete from the Algolia index.

  3. Click Proceed.
  4. Check if the details are correct. If yes, click Test Action.
    Test_Action.png
  5. Once set, click Save and Exit.
    Save_Exit_Button.png

Action 2: Select the Update Entries action:

  1. Under Choose an Action tab, select the Update Entries action.
  2. On the Update Entries Configure Action page, enter the details given below:
    1. Click + Add New Account button to connect your Contentstack account as shown in the Connect your Algolia Account to Automate step.
    2. Select the Index Name where you want to send the data in the form of a list of objects.
    3. In the Entries field, enter the data to be updated.
      Select_Fields.png

      Note: Provide your index data as per your object schema and in JSON format only. You can add a JSON object or an array of JSON objects.

  3. Click Proceed.
  4. Check if the details are correct. If yes, click Test Action.
    Test-Action.png
  5. Once set, click Save and Exit.
    Save_Exit_Button.png
  6. To verify the output, go to the Algolia Index section and check the updated entry.
    Output.png

This sets the Algolia action connector.

Was this article helpful?
^