Actions10
Overview
The Ninox node's "Ninox Script" operation allows you to execute custom Ninox Scripts directly against your Ninox database. This is useful for advanced querying, data manipulation, or triggering actions that go beyond standard CRUD operations. Typical scenarios include:
- Running complex queries to fetch or aggregate data.
- Performing batch updates or calculations within the database.
- Automating business logic using Ninox's scripting capabilities.
Example use cases:
- Retrieve all contacts with a specific tag and their email addresses.
- Calculate totals or statistics across records.
- Trigger workflow automations based on custom conditions.
Properties
| Name | Type | Meaning |
|---|---|---|
| Team Name or ID | options | The ID of the team to access. Choose from a list or specify an ID using an expression. Required to identify which team's database to query. |
| Database Name or ID | options | The ID of the database to access. Choose from a list or specify an ID using an expression. Required to select the target database within the chosen team. |
| Ninox Script | string | The Ninox Script to execute. Use this field to write your custom Ninox query or action. Example: (select contact). 'E-Mail'. Required for defining what the node will do in Ninox. |
Note: "Table Name or ID" is not required for the "Ninox Script" operation and is hidden when this operation is selected.
Output
- The output will be the result of the executed Ninox Script, returned as JSON.
- The structure of the
jsonoutput field depends entirely on the script you provide and the data it returns from Ninox.- For example, if your script selects records, you'll receive an array of objects representing those records.
- If your script performs calculations or returns a single value, the output will reflect that value.
Example output (if script returns a list of emails):
[
{ "E-Mail": "alice@example.com" },
{ "E-Mail": "bob@example.com" }
]
Dependencies
- External Service: Requires access to the Ninox API.
- API Key/Credentials: You must configure valid Ninox API credentials (
ninoxApi) in n8n. - n8n Configuration: No special environment variables are needed beyond standard credential setup.
Troubleshooting
Common Issues:
Invalid Credentials:
Error message: "401 Unauthorized"
Resolution: Check that your Ninox API credentials are correct and have sufficient permissions.Script Errors:
Error message: "400 Bad Request" or error details from Ninox
Resolution: Ensure your Ninox Script syntax is correct and references valid fields/tables.Missing Required Fields:
Error message: "teamId/databaseId/script is required"
Resolution: Make sure all required properties are filled in.Permission Denied:
Error message: "403 Forbidden"
Resolution: Verify that your user has access to the specified team and database.