Actions24
- Documents Actions
- Indexes Actions
- Keys Actions
- Search Actions
- Settings Actions
- Tasks Actions
Overview
The Get All Tasks operation for the "Tasks" resource in this custom n8n node allows you to retrieve a list of tasks from a Meilisearch instance. This is useful for monitoring, auditing, or managing background operations (such as document indexing, updates, deletions, etc.) that Meilisearch performs asynchronously.
Common scenarios:
- Fetching all recent tasks to monitor their status.
- Filtering tasks by type, status, or time window for reporting or debugging.
- Paginating through large sets of tasks for administrative purposes.
Practical examples:
- Retrieve all failed tasks in the last 24 hours for troubleshooting.
- List all tasks related to a specific index.
- Get the latest 100 completed tasks for audit logs.
Properties
Name | Meaning |
---|---|
Additional Fields | A collection of optional filters and parameters to refine your task query. Includes: |
- Limit | Max number of results to return. |
- From | Fetch the next set of results starting from the given UID (for pagination). |
- UIDs | Comma-delimited list of Task UID(s) to filter results by. |
- Index UIDs | Comma-delimited list of Index UID(s) to filter results by. |
- Statuses | Comma-delimited list of Task Status(es) to filter results by (e.g., succeeded, failed, enqueued, processing, canceled). |
- Types | Comma-delimited list of Task Type(s) to filter results by (e.g., documentAddition, documentDeletion, indexCreation, etc.). |
- Canceled By | Comma-delimited list of Task UID(s) that canceled another task(s). |
- Before Enqueued At | Filter tasks enqueued before a specific date/time. |
- After Enqueued At | Filter tasks enqueued after a specific date/time. |
- Before Started At | Filter tasks started before a specific date/time. |
- After Started At | Filter tasks started after a specific date/time. |
- Before Finished At | Filter tasks finished before a specific date/time. |
- After Finished At | Filter tasks finished after a specific date/time. |
Output
The output will be an array of task objects, each containing details about a Meilisearch task. The structure typically includes:
{
"uid": 123,
"indexUid": "my_index",
"status": "succeeded",
"type": "documentAddition",
"enqueuedAt": "2023-12-01T10:00:00Z",
"startedAt": "2023-12-01T10:00:01Z",
"finishedAt": "2023-12-01T10:00:02Z",
"details": { /* ... */ },
// other fields depending on Meilisearch version
}
- Each item in the output represents a single task with its metadata.
- No binary data is returned; all output is JSON.
Dependencies
- Meilisearch API: Requires access to a running Meilisearch instance.
- API Key: You must configure the
meilisearchApi
credential in n8n, which should include the host URL and an API key with sufficient permissions. - n8n Configuration: Ensure the node is properly configured with the correct credentials.
Troubleshooting
Common issues:
- Invalid API Key: If the API key is missing or incorrect, you'll receive authentication errors. Double-check your credentials.
- Host URL Misconfiguration: If the base URL is wrong, requests will fail. Verify the
host_url
in your credentials. - Filter Syntax Errors: Providing incorrectly formatted values (e.g., non-numeric UIDs, malformed dates) may result in errors or empty results.
- Large Result Sets: Not setting a limit may cause performance issues if there are many tasks.
Error messages and resolutions:
"401 Unauthorized"
: Check your API key and permissions."400 Bad Request"
: Review your filter parameters for correct formatting."404 Not Found"
: Ensure the Meilisearch instance is reachable and the endpoint exists.