Actions52
- Advanced Actions
- Api Keys Actions
- Clusters Actions
- Dictionaries Actions
- Indices Actions
- Records Actions
- Rules Actions
- Search Actions
- Synonyms Actions
- Vaults Actions
Overview
The "Get rule" operation in the Algolia node retrieves a specific search rule by its unique identifier (Object ID) from a specified index. Search rules in Algolia are conditional statements that modify search results based on defined conditions and consequences, useful for customizing and curating search behavior.
This operation is beneficial when you want to fetch details of an existing rule to inspect or use it within your workflow, such as validating rule configurations, auditing, or applying logic based on rule properties.
Practical example:
You have a merchandising rule that boosts certain products during a sale. Using this operation, you can retrieve the rule's details to check its conditions and consequences before deciding to update or delete it.
Properties
| Name | Meaning |
|---|---|
| Index Name | The name of the Algolia index where the rule exists. This must be selected from available indices. |
| Object ID | The unique identifier of the rule object to retrieve. |
Output
The output contains the JSON representation of the requested rule object. This includes all properties of the rule such as its conditions, consequences, description, enabled status, and validity periods.
The output does not include binary data.
Dependencies
- Requires an Algolia application with appropriate API credentials configured in n8n.
- Requires an API key credential with permissions to read rules from the specified index.
- The node uses the Algolia REST API endpoint:
GET /1/indexes/{indexName}/rules/{objectID}.
Troubleshooting
Common issues:
- Providing an invalid or non-existent Object ID will result in an error indicating the rule was not found.
- Incorrect or missing API credentials will cause authentication errors.
- Specifying an incorrect index name may lead to a "not found" or permission error.
Error messages:
- 404 Not Found: The specified rule or index does not exist. Verify the Object ID and Index Name.
- 401 Unauthorized: Authentication failed. Check that the API key credential is valid and has sufficient permissions.
- 400 Bad Request: Invalid parameters. Ensure the Object ID and Index Name are correctly formatted.
Resolution tips:
- Confirm the Object ID corresponds exactly to an existing rule in the index.
- Verify API credentials and their permissions.
- Use the "search rules" operation to list available rules and their IDs if unsure.
Links and References
Note: This summary is based on static analysis of the provided source code and property definitions without runtime execution.