Actions5
- Integrations Actions
Overview
The node "Basic Integration" provides a way to interact with an external integration API, supporting multiple operations on different resources. Specifically, for the resource Integrations and operation Execute Raw SQL, it allows users to run arbitrary SQL queries against the connected integration's database or service.
This is useful when you need to perform custom data retrieval or manipulation that is not covered by predefined operations. For example, you can fetch invoice records matching specific criteria or generate reports by writing your own SQL query.
Practical examples:
- Retrieve all invoices from a certain period with a specific pattern in their invoice number.
- Execute complex joins or filters on integration data tables.
- Run update or delete statements if supported by the integration backend.
Properties
| Name | Meaning |
|---|---|
| SQL Query | The raw SQL query string to execute. This is required and supports multiline input. |
| Additional Fields | Optional extra parameters: - Logo Tenant: Overrides tenant logo setting (defaults to credential value). - Logo Firm Number: Overrides firm number (defaults to credential value). - Logo Firm Period: Overrides firm period (defaults to credential value). |
Output
The output of this node is JSON data representing the result of the executed SQL query. Typically, this will be an array of objects where each object corresponds to a row returned by the query, with key-value pairs matching column names and values.
If the query modifies data (e.g., UPDATE, DELETE), the output may contain metadata about affected rows depending on the integration's API response.
No binary data output is indicated by the source code.
Dependencies
- Requires connection credentials to the target integration API, including authentication tokens or API keys.
- The node depends on the integration's backend supporting execution of raw SQL queries via its API.
- Proper configuration of credentials in n8n is necessary to authenticate requests.
Troubleshooting
Common issues:
- Syntax errors in the SQL query will cause the node to fail.
- Insufficient permissions or disabled raw SQL execution on the integration side may lead to authorization errors.
- Missing or incorrect credential configuration will prevent successful API calls.
- Using placeholders like
{firm}or{period}in the SQL without providing corresponding values in additional fields or credentials may cause query failures.
Error messages:
- Errors returned from the integration API typically include the error message in the output JSON under
error. - If the node is set to continue on failure, errors are captured per item; otherwise, execution stops at the first error.
- Errors returned from the integration API typically include the error message in the output JSON under
Resolution tips:
- Validate SQL syntax before running.
- Ensure credentials have sufficient rights.
- Provide all required placeholder values either in additional fields or credentials.
- Use the "Additional Fields" to override default tenant, firm number, and period values if needed.
Links and References
- Refer to your integration's API documentation for details on supported SQL syntax and limitations.
- n8n documentation on Custom Nodes for building and troubleshooting nodes.
- General SQL tutorials for crafting valid queries suitable for your integration backend.