Actions24
- Documents Actions
- Indexes Actions
- Keys Actions
- Search Actions
- Settings Actions
- Tasks Actions
Overview
The Meilisearch node's "Keys" resource with the "Create An API Key" operation allows users to programmatically create new API keys for a Meilisearch instance. This is useful for managing access control, granting specific permissions to different users or applications, and automating key management workflows. For example, you might use this node to generate temporary keys for third-party integrations, restrict access to certain indexes, or automate key rotation in your CI/CD pipelines.
Properties
Name | Meaning |
---|---|
Name | Name of the key. Used to identify the API key. Example: "My Key". |
Description | Description of the key. Additional information about what the key is used for. Example: "Key for analytics dashboard". |
Actions | An array of API actions permitted for the key. Options include: All (), documents., documents.add, documents.delete, documents.get, dumps.create, indexes., indexes.create, indexes.delete, indexes.get, indexes.swap, indexes.update, keys.create, keys.delete, keys.get, keys.update, Search, settings., settings.get, settings.update, stats.getresponse, tasks., tasks.cancel, tasks.delete, tasks.get, Version. Use "" for all actions or combine specific ones as needed. |
Index UIDs | Comma delimited list of Index UID(s) to give access to. Specifies which indexes the key can operate on. Example: "products,users". |
Expires At | Date and time when the key will expire, represented in RFC 3339 format (e.g., "2024-12-31T23:59:59Z"). If left empty or null, the key never expires. |
Output
The output will be a JSON object representing the newly created API key. The structure typically includes:
{
"uid": "string", // Unique identifier for the key
"name": "string", // Name of the key
"description": "string", // Description of the key
"actions": ["string"], // List of allowed actions
"indexes": ["string"], // List of index UIDs the key has access to
"expiresAt": "string|null",// Expiry date in RFC 3339 format or null
"createdAt": "string", // Creation timestamp
"updatedAt": "string", // Last update timestamp
"key": "string" // The actual API key value
}
Note: The exact fields may vary depending on the Meilisearch version.
Dependencies
- External Service: Requires access to a running Meilisearch instance.
- API Key: You must provide valid Meilisearch credentials (
meilisearchApi
) configured in n8n. - Environment Variable: The base URL for Meilisearch should be set in the credentials as
host_url
.
Troubleshooting
- Invalid Actions or Indexes: If you specify an action or index that does not exist or is not permitted, Meilisearch may return an error such as
"invalid_action"
or"index_not_found"
. Double-check the available actions and index UIDs. - Expired or Invalid Credentials: If the provided API key is invalid or expired, you may receive authentication errors like
"Invalid API key"
. Ensure your credentials are up-to-date. - Date Format Issues: If "Expires At" is not in RFC 3339 format, Meilisearch may reject the request. Use a proper ISO 8601/RFC 3339 date string.
- Missing Required Fields: Omitting required properties (like Actions or Index UIDs) will result in validation errors.