workflows.fit
Back to n8n workflows
n8n templateFreeBy V3 Code Studio

Fetch Odoo customer data and export to JSON or Excel

Odoo Customers API – Export to JSON or Excel Odoo Customers API – Export to JSON or Excel provides a simple way to fetch customer records from your Odoo database and get them back either as a structured JSON response ...

Data & StorageDevelopmentCore NodesUtilityWebhookFunctionIfConvert To File
Loading interactive preview...

Template notes

Odoo Customers API – Export to JSON or Excel

Odoo Customers API – Export to JSON or Excel provides a simple way to fetch customer records from your Odoo database and get them back either as a structured JSON response or a downloadable Excel (.xlsx) file.

⚙️ What it does - Listens for HTTP GET requests on the endpoint /api/v1/get-customers. - Checks for the required name parameter and builds a search filter automatically. - Queries the res.partner model to return only customer contacts (iscompany = false). - Delivers results in JSON by default, or as an Excel (.xlsx) export when responseformat=excel is included.

📥 Parameters

- name — Required. Used for partial matching on customer names (via Odoo’s Like filter). - responseformat — Optional. Accepts json (default) or excel.

🔗 Examples Excel Example GET /api/v1/get-customers?name=Demo&responseformat=excel JSON Example GET /api/v1/get-customers?name=Demo&responseformat=json

🧩 Default fields displayname, name, email, phone, mobile, parentid, companyid, countrycode, countryid

🛠️ Setup - Open the Odoo node and connect your Odoo API credentials. - Adjust the fieldsList in the node if you want to include more data fields (e.g., address, city, or VAT). - Trigger the flow from its webhook URL or run it manually inside n8n to test the output.