Axelor icon

Axelor

Consume Axelor API

REST & Advances Service → Get Many

AI-generated

Overview

The Axelor n8n node, when configured with the REST & Advances Service resource and the Get Many (getAll) operation, allows users to retrieve multiple records from a specified Axelor domain model via its REST API. This is particularly useful for integrating Axelor ERP data into automated workflows, such as synchronizing sales orders, fetching customer lists, or extracting product catalogs for further processing.

Practical examples:

  • Fetching all sales orders (com.axelor.apps.sale.db.SaleOrder) with pagination.
  • Retrieving a filtered list of customers by applying query parameters.
  • Integrating Axelor data with other systems (e.g., CRM, reporting tools).

Properties

Name Type Meaning
Domain Models Resource Locator Specifies the Axelor domain model to fetch data from. Can be entered as a string or selected from a list. Example: com.axelor.apps.sale.db.SaleOrder.
Query String Additional query string appended to the request URL for filtering, sorting, or pagination. Default is ?offset=0&limit=10. Example: ?filter=[["status","=","validated"]]&offset=0&limit=20.

Output

The output is an array of JSON objects, each representing a record from the selected Axelor domain model. The structure of each object depends on the chosen domain model and the fields defined in Axelor for that model.

Example output:

[
  {
    "id": 1,
    "name": "Order #1001",
    "status": "validated",
    ...
  },
  {
    "id": 2,
    "name": "Order #1002",
    "status": "draft",
    ...
  }
]

Note: The actual fields will vary based on the selected domain model.

Dependencies

  • External Service: Requires access to an Axelor instance with the REST API enabled.
  • Authentication: Needs valid Axelor API credentials configured in n8n under the credential type axelorApi.
  • Environment: The n8n instance must be able to reach the Axelor server endpoint.

Troubleshooting

Common issues:

  • Invalid Domain Model: If the domain model is misspelled or does not exist, the API may return a 404 error or an empty result set.
  • Malformed Query: Incorrectly formatted query strings can lead to errors or unexpected results. Ensure queries follow Axelor's API syntax.
  • Authentication Errors: Missing or incorrect API credentials will result in authentication failures (e.g., 401 Unauthorized).
  • Network Issues: Connectivity problems between n8n and the Axelor server can cause timeouts or connection errors.

Error messages and resolutions:

  • "Request failed with status code 401": Check your Axelor API credentials in n8n.
  • "Domain model not found": Verify the value provided in Domain Models.
  • "Unexpected token ... in JSON at position ...": Likely due to malformed input in another operation; for Get Many, ensure the Query parameter is a valid string.

Links and References

Discussion