Mira Library Query
AI-generatedOverview
The "Mira Library Query" node allows users to execute custom SQL queries on a specific Mira library database. It is designed for scenarios where you need to retrieve or manipulate data stored within a Mira library using SQLite syntax. This node is beneficial when integrating Mira's data storage with other workflows, enabling dynamic querying and data extraction.
Practical examples include:
- Fetching a list of files from a library that match certain criteria.
- Running parameterized queries to filter data based on input values.
- Integrating Mira library data into broader automation pipelines by extracting relevant records.
Properties
| Name | Meaning |
|---|---|
| Token Source | Choose where to get the access token from: either from stored credentials or from input data. |
| Server URL | The URL of the Mira App Server (required if token source is from input). |
| Access Token | Access token for authentication, provided directly or via input data (required if token source is input). |
| Library ID | The identifier of the Mira library to query (required). |
| SQL Query | The SQLite query string to execute on the library database (required). |
| Parameters | Optional JSON array of parameters to be used in the SQL query for parameterized queries. |
Output
The node outputs JSON data representing the result of the executed SQL query on the specified Mira library. The output structure includes the rows returned by the query, formatted as an array of objects where each object corresponds to a row with column names as keys.
No binary data output is indicated by the code.
Dependencies
- Requires access to a Mira App Server instance reachable via the provided Server URL.
- Requires an access token for authentication, which can be supplied either through stored credentials or directly via input data.
- The node depends on Mira's API endpoint
/api/libraries/{libraryId}/queryto execute the SQL query.
Troubleshooting
- Invalid or missing Library ID: The node will throw an error if the Library ID is not provided or empty. Ensure this property is correctly set.
- Invalid or missing SQL query: An error occurs if the SQL query string is empty or invalid. Verify the query syntax and presence.
- Parameters JSON format errors: If parameters are provided, they must be a valid JSON array. Malformed JSON or non-array JSON will cause an error with a message indicating invalid JSON format.
- Authentication failures: If the access token is missing, invalid, or expired, the request to the Mira server will fail. Confirm the token source and validity.
- Server connectivity issues: Ensure the Server URL is correct and the Mira App Server is accessible from the n8n environment.
Links and References
- SQLite Documentation – For writing and understanding SQL queries compatible with this node.
- Mira API documentation (not publicly linked here) – Refer to your Mira App Server API docs for details on the
/api/libraries/{libraryId}/queryendpoint.