Actions16
- Meta Service Actions
- REST & Advances Service Actions
- Document Service Actions
REST & Advances Service → Update a Record
AI-generatedOverview
The "Update a Record" operation for the REST & Advances Service resource in this n8n node allows you to update an existing record in an Axelor domain model via its REST API. This is achieved by sending a PUT request with the updated data to the appropriate endpoint.
Common scenarios:
- Updating customer, order, or product records in your Axelor ERP system from automated workflows.
- Synchronizing data between Axelor and other systems (e.g., updating a sales order when a change occurs in another app).
- Bulk-updating records as part of a data migration or integration process.
Practical example:
If you have a workflow that receives updated order information from an e-commerce platform, you can use this node to update the corresponding SaleOrder record in Axelor automatically.
Properties
| Name | Type | Meaning |
|---|---|---|
| Domain Models | Resource Locator | Selects the domain model (e.g., com.axelor.apps.sale.db.SaleOrder) you want to update. |
| Content JSON | JSON | The body of the request containing all fields to update. For action services, include the model domain here. |
Output
- The output will be a JSON object (or array) representing the response from the Axelor API after updating the record.
- The structure of the output depends on the Axelor API's response for the specific domain model and update operation. Typically, it includes the updated record's fields and values.
Example output:
[
{
"data": {
"id": 123,
"name": "Updated Name",
// ...other updated fields
},
"status": 0
}
]
Dependencies
- External Service: Requires access to an Axelor instance with the REST API enabled.
- API Credentials: You must configure the
axelorApicredentials in n8n. - Environment: No special environment variables are required beyond standard n8n credential setup.
Troubleshooting
Common issues:
- Invalid Domain Model: If the domain model is incorrect or misspelled, the API will return an error.
- Malformed JSON: If the
Content JSONproperty is not valid JSON, the node will throw a parsing error. - Missing Required Fields: If required fields are missing in the content, the API may reject the update.
- Permission Denied: If the API credentials lack permission to update the specified record, you'll receive an authorization error.
Error messages and resolutions:
"Unexpected token ... in JSON": Check yourContent JSONinput for syntax errors."404 Not Found": Ensure the domain model and record ID exist."401 Unauthorized": Verify your Axelor API credentials in n8n."400 Bad Request": Review the structure and required fields in your JSON payload.