Odoo icon

Odoo

Consume Odoo API

Contact → Delete

AI-generated

Overview

This node allows you to delete a Contact in Odoo via its API. It is useful for automating the removal of contact records from your Odoo instance directly from n8n workflows. Common scenarios include cleaning up outdated or duplicate contacts, or integrating with other systems where contact deletion needs to be synchronized.

Practical Example:
You might use this node in a workflow that listens for contact deletion events in another CRM and automatically removes the corresponding contact in Odoo.

Properties

Name Meaning
Contact ID The unique identifier of the contact to delete in Odoo. (Required)

Output

  • The output will be a JSON object indicating the result of the deletion operation.
  • If successful, it typically returns a confirmation or status from Odoo (often a boolean or an empty object).
  • If an error occurs and "Continue On Fail" is enabled, the output will contain an error field with the error message.

Example Success Output:

[
  {
    "success": true
  }
]

(Actual structure may vary depending on Odoo's response.)

Example Error Output (if "Continue On Fail" is enabled):

[
  {
    "error": "Contact not found"
  }
]

Dependencies

  • Odoo Instance: You must have access to an Odoo server.
  • API Credentials: Requires valid Odoo API credentials (URL, username, password, and database name) configured in n8n as a credential named odooApi.
  • n8n Configuration: No special environment variables are required beyond standard credential setup.

Troubleshooting

Common Issues:

  • Invalid Contact ID: If the provided Contact ID does not exist, Odoo will return an error.
  • Authentication Errors: Incorrect Odoo credentials will prevent the node from connecting.
  • Insufficient Permissions: The user account used must have permission to delete contacts in Odoo.

Error Messages and Resolutions:

  • "Credentials are not valid": Check your Odoo API credentials in n8n.
  • "Contact not found": Verify the Contact ID exists in your Odoo instance.
  • "Settings are not valid: ...": Ensure all required fields (URL, username, password, DB name) are correctly set.

Links and References

Discussion