Algolia Index

Learning how to use Algolia on Interplay

Written By Brian Sathinathan (Super Administrator)

Updated at December 28th, 2020

Description

This node allows the user to enter a JSON formatted string for 1 object to be entered into a pre-existing index in the user’s Algolia account.

Code For Above Flow

[{"id":"9be9b6b2.7b23b8","type":"algoliaindex","z":"2371a025.57348","API_ID":"","API_Key":"","Index":"","name":"","x":250,"y":300,"wires":[["c4090305.3bc3a"]]},{"id":"e1407952.6bd4e8","type":"inject","z":"2371a025.57348","name":"","topic":"","payload":"{     \"name\": \"Pizza\",     \"price\": \"10\",     \"quantity\": \"7\"   }","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":300,"wires":[["9be9b6b2.7b23b8"]]},{"id":"c4090305.3bc3a","type":"console","z":"2371a025.57348","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":410,"y":300,"wires":[]}]

Input

payload (string)A string formatted as a JSON object to be indexed (Example: {“name”: “Pizza”, “price”: “10”, “quantity”: “7”}

Parameters

API_ID (string)The users Application ID

API_Key (string)

The users Admin API Key

Index (string)

The index under which the JSON object that was passed through the payload will be indexed under. (Must already exists or have been created by the user)

Output

payload (object)An object with information confirming the completed transaction

Was this article helpful?