Actions16
- Meta Service Actions
- REST & Advances Service Actions
- Document Service Actions
REST & Advances Service → Advanced Search
AI-generatedOverview
The REST & Advances Service resource with the Advanced Search operation allows you to perform advanced search queries on Axelor domain models via the Axelor API. This node is useful when you need to retrieve records from a specific domain model using complex filters, sorting, or pagination options that are defined in a custom JSON body.
Common scenarios:
- Fetching filtered lists of business objects (e.g., sales orders, customers) based on dynamic criteria.
- Implementing advanced reporting or dashboard widgets that require flexible querying.
- Integrating Axelor data into other systems with precise control over what records are retrieved.
Practical example:
You want to find all sales orders created after a certain date and with a specific status. You would use this node, select the "SaleOrder" domain, and provide a JSON body specifying your filter conditions.
Properties
| Name | Type | Meaning |
|---|---|---|
| Domain Models | Resource Locator | Selects the Axelor domain model to query. Can be specified as a string (e.g., com.axelor.apps.sale.db.SaleOrder) or chosen from a list. Determines which type of records will be searched. |
| Content JSON | JSON | The request body containing the search criteria, filters, sort order, and other parameters as per Axelor's API. Must include all necessary fields for the search. For action services, the domain model must also be included in this data. |
Output
The output is an array of JSON objects representing the records returned by the advanced search. Each object corresponds to a record from the selected domain model and contains its fields as provided by the Axelor API.
Example output:
[
{
"id": 123,
"name": "Order #123",
"status": "validated",
...
},
{
"id": 124,
"name": "Order #124",
"status": "draft",
...
}
]
Note: The exact structure depends on the selected domain model and the fields requested in the search.
Dependencies
- External Service: Requires access to an Axelor instance with the REST API enabled.
- API Credentials: Needs valid Axelor API credentials configured in n8n under the name
axelorApi. - Environment: The Axelor server URL and authentication details must be set up in the n8n credentials configuration.
Troubleshooting
Common issues:
- Invalid JSON in Content JSON: If the JSON body is malformed, the node will throw a parsing error. Ensure your JSON is valid.
- Missing required fields: If the search body does not include mandatory fields (such as the domain model for some actions), the API may return an error.
- Authentication errors: Incorrect or missing API credentials will result in authentication failures.
- Domain model typos: Providing an incorrect domain model string will cause the API to reject the request.
Error messages and resolutions:
"Unexpected token ... in JSON": Check your Content JSON for syntax errors."401 Unauthorized": Verify your Axelor API credentials in n8n."404 Not Found": Ensure the domain model exists and is spelled correctly."400 Bad Request": Review the structure and required fields in your Content JSON.