Axelor icon

Axelor

Consume Axelor API

Meta Service → Get Model Properties

AI-generated

Overview

The Meta Service - Get Model Properties operation of this n8n node retrieves the properties (fields) of a specified domain model from an Axelor instance. This is useful for dynamically discovering the structure of business objects (domain models) in Axelor, such as "SaleOrder" or any other entity, which can help in building automations that adapt to changes in the data model.

Common scenarios:

  • Automatically generating forms or UI elements based on available fields in a model.
  • Validating or mapping data before creating or updating records in Axelor.
  • Building dynamic integrations where the set of fields may change over time.

Practical example:
Suppose you want to synchronize data between Axelor and another system. Before pushing data, you use this operation to fetch all fields of the com.axelor.apps.sale.db.SaleOrder model, ensuring your integration is always up-to-date with the latest schema.


Properties

Name Type Meaning
Domain Models Resource Locator Selects the domain model whose properties (fields) you want to retrieve.

Details:

  • The "Domain Models" property allows selection either by entering the full domain model name (e.g., com.axelor.apps.sale.db.SaleOrder) or by choosing from a list of available models fetched from Axelor.

Output

The output is a JSON array containing the properties (fields) of the selected domain model. Each item in the array represents a field/property of the model.

Example output structure:

[
  {
    "name": "fieldName",
    "type": "string",
    "label": "Field Label",
    // ...other metadata about the field
  },
  ...
]
  • Each object describes a single field, including its name, type, label, and possibly additional metadata provided by Axelor.

Dependencies

  • External Service: Requires access to an Axelor instance with the Meta API enabled.
  • Authentication: Needs valid Axelor API credentials configured in n8n under the credential type axelorApi.
  • Environment: The Axelor instance must be reachable from the n8n environment.

Troubleshooting

Common issues:

  • Invalid Domain Model: If the specified domain model does not exist, the node will likely return an error or an empty result. Double-check the model name.
  • Authentication Errors: Missing or incorrect API credentials will cause authentication failures.
  • Network Issues: If n8n cannot reach the Axelor server, you'll encounter connection errors.

Error messages and resolutions:

  • "401 Unauthorized": Check your Axelor API credentials in n8n.
  • "404 Not Found": Ensure the domain model name is correct and exists in your Axelor instance.
  • "ECONNREFUSED" or similar: Verify network connectivity between n8n and Axelor.

Links and References

Discussion