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 task" operation under the "Indices" resource in this Algolia node allows users to check the status of a specific indexing task on an Algolia index. Indexing tasks in Algolia are asynchronous operations that occur when you add, update, or delete records or indices. Each such operation generates a task with a unique Task ID. This node operation queries the status of that task by its ID, enabling users to monitor whether the task has completed successfully or is still pending.
This functionality is beneficial in scenarios where workflows depend on the completion of indexing operations before proceeding, such as ensuring data consistency after batch updates or deletions. For example, after uploading a large dataset to an index, you can use this node to poll the task status and only continue once the indexing is complete.
Properties
| Name | Meaning |
|---|---|
| Index Name | The name of the Algolia index for which you want to check the task status. |
| Task ID | The unique identifier of the indexing task whose status you want to retrieve. |
Output
The output of this operation is the JSON response from Algolia's API representing the status of the specified task. This typically includes information such as whether the task is completed, pending, or failed, along with timestamps and other metadata related to the task.
No binary data is output by this operation.
Dependencies
- Requires an Algolia application with valid credentials (API key and Application ID) configured in n8n.
- The node uses Algolia's REST API endpoint:
GET /1/indexes/{indexName}/task/{taskID}. - Proper permissions on the API key to query task statuses are necessary.
Troubleshooting
- Invalid Task ID: If the provided Task ID does not exist or is malformed, the API may return an error. Ensure the Task ID is correct and corresponds to a recent indexing operation.
- Index Not Found: If the specified index name does not exist, the API will return an error. Verify the index name is accurate and exists in your Algolia application.
- Authentication Errors: If the API key or application ID credentials are incorrect or lack sufficient permissions, authentication errors will occur. Check your credentials and their permissions.
- Network Issues: Connectivity problems can cause request failures. Ensure network access to Algolia's API endpoints.
- Rate Limits: Excessive requests might hit Algolia's rate limits, resulting in HTTP 429 errors. Implement retry logic or reduce request frequency.
Links and References
Summary of execute() logic for "Indices" resource, "Get task" operation:
- The node reads the input parameters:
indexName(string) andtaskID(number). - It constructs a GET request to the Algolia API endpoint
/1/indexes/{indexName}/task/{taskID}. - The request is authenticated using the configured Algolia API credentials.
- The response JSON containing the task status is returned as the node's output.