๐ค Fetch Odoo customer data and export to JSON or Excel
โก 651 views ยท ๐ค CRM & Sales Operations
Description
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
GETrequests on the endpoint/api/v1/get-customers. - Checks for the required
nameparameter and builds a search filter automatically. - Queries the
res.partnermodel to return only customer contacts (is_company = false). - Delivers results in JSON by default, or as an Excel (.xlsx) export when
response_format=excelis included.
๐ฅ Parameters
nameโ Required. Used for partial matching on customer names (via OdooโsLikefilter).response_formatโ Optional. Acceptsjson(default) orexcel.
๐ Examples
Excel Example
GET /api/v1/get-customers?name=Demo&response_format=excel
JSON Example
GET /api/v1/get-customers?name=Demo&response_format=json
๐งฉ Default fields
display_name, name, email, phone, mobile, parent_id, company_id, country_code, country_id
๐ ๏ธ 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.
๐ก Notes
- Built and tested for n8n v1.108.2+
๐ Nodes Used
Function, Webhook, Odoo, Convert to File
๐ฅ Import
Download workflow.json and import into n8n:
Workflow menu โ Import from File