Actions52
- Advanced Actions
- Api Keys Actions
- Clusters Actions
- Dictionaries Actions
- Indices Actions
- Records Actions
- Rules Actions
- Search Actions
- Synonyms Actions
- Vaults Actions
Overview
The "Add or update object" operation in the Records resource allows you to add a new record or replace an existing record in a specified Algolia index. If a record with the given unique identifier (Object ID) exists, it will be replaced; otherwise, a new record is added. This operation is useful for maintaining up-to-date data in your search indices, ensuring that records reflect the latest information.
Common scenarios include:
- Adding new items to a product catalog.
- Updating user profiles or content entries.
- Synchronizing external databases with Algolia indices.
For example, if you have an e-commerce site and want to update the details of a product or add a new product, this operation lets you do so by specifying the index and the unique object ID.
Properties
| Name | Meaning |
|---|---|
| Index Name | The name of the Algolia index where the record will be added or updated. |
| Object ID | A unique identifier for the record. If a record with this ID exists, it will be replaced. |
Output
The node outputs the response from the Algolia API after attempting to add or update the record. The json output field contains the result of the operation, typically including metadata such as task IDs or status messages confirming the success or failure of the request.
This node does not output binary data.
Dependencies
- Requires an Algolia account and an API key credential configured in n8n for authentication.
- The node uses the Algolia REST API endpoint specific to the application ID provided in credentials.
- Proper permissions on the API key are necessary to perform write operations on indices.
Troubleshooting
- Invalid Index Name: If the specified index does not exist, Algolia will create it automatically. However, ensure the index name is correct to avoid unintended index creation.
- Invalid Object ID: The Object ID must be unique and properly formatted. Using invalid characters may cause errors.
- API Key Permissions: Insufficient permissions on the API key can lead to authorization errors. Ensure the API key has write access to the target index.
- Rate Limits: Algolia enforces indexing rate limits. Exceeding these limits may result in throttling or errors. Refer to Algolia's documentation on rate limits.
- Network Issues: Connectivity problems can cause request failures. Verify network access to Algolia endpoints.