What This Workflow Does
This workflow solves the common business problem of manually extracting company data from Odoo for reporting, integrations, or analysis. Instead of logging into Odoo, running queries, and exporting CSV files, this automation provides a ready-to-use API endpoint that instantly delivers filtered company records in your preferred format.
When teams need current company information for sales outreach, compliance reporting, or data synchronization with other systems, they can simply call the API with search parameters and receive structured data. This eliminates hours of manual work each week and ensures data consistency across your organization.
The solution is particularly valuable for businesses that need to share Odoo data with non-technical team members, external partners, or other software systems without granting direct database access.
How It Works
The automation follows a logical sequence to receive requests, fetch data, and deliver results:
1. API Request Reception
The workflow exposes a webhook endpoint at /api/v1/get-companies that accepts GET requests with query parameters. It validates required inputs like company name search terms and response format preferences.
2. Odoo Data Retrieval
Using secure API credentials, the workflow connects to your Odoo instance and executes a search for company records matching the provided criteria. It uses "like" filters for partial name matching to ensure relevant results.
3. Data Processing & Formatting
The retrieved company data is processed to include relevant fields (name, VAT, address, etc.). Based on the request parameter, the workflow prepares the data either as structured JSON for API integrations or as an Excel file for human consumption.
4. Response Delivery
The final step delivers the formatted data with appropriate headers. JSON responses include status codes and structured data, while Excel requests trigger file downloads with proper MIME types for immediate use in spreadsheet applications.
Who This Is For
This automation template is ideal for Odoo users across various business functions:
Sales & Marketing Teams: Need current company data for outreach campaigns, territory management, or account planning without IT assistance.
Finance & Operations: Require regular exports of company records for compliance reporting, audit documentation, or supplier management.
IT & Development Teams: Building integrations between Odoo and other business systems like CRM platforms, BI tools, or custom applications.
Business Analysts: Creating regular reports and dashboards that pull data from Odoo without manual extraction steps.
External Partners: Agencies or consultants who need secure, limited access to specific company data without full Odoo licenses.
What You'll Need
- Odoo Instance: A running Odoo installation (cloud or self-hosted) with company data you want to export.
- API Access: Odoo API credentials with appropriate permissions to read company/partner records.
- n8n Environment: A running n8n instance (cloud or self-hosted) where you can import and run workflows.
- Basic Technical Knowledge: Understanding of APIs, webhooks, and how to configure credentials in automation tools.
- Use Case: A clear business need for exporting company data, whether for reporting, integration, or analysis purposes.
Quick Setup Guide
Follow these steps to implement this automation in your environment:
Pro tip: Test the workflow in a development environment first before connecting to production Odoo data.
- Download & Import: Download the template file and import it into your n8n instance using the workflow import function.
- Configure Webhook: Note the webhook URL generated by n8n (typically includes
/webhook-test/or similar). This becomes your API endpoint. - Set Up Odoo Credentials: Add your Odoo API credentials in the Odoo node, ensuring the connection has read access to company records.
- Customize Fields: Optionally modify the fields list in the Odoo node to include additional company information relevant to your use case.
- Test the Endpoint: Use a browser, Postman, or curl to call your endpoint with test parameters like
?name=Test&response_format=json. - Deploy & Secure: Activate the workflow and implement any additional security measures like authentication tokens if exposing externally.
Key Benefits
Eliminate Manual Exports: Save 2-5 hours per week previously spent logging into Odoo, running queries, and exporting files manually. This time can be redirected to higher-value analysis and decision-making.
Ensure Data Consistency: Automated exports guarantee that everyone receives the same data structure and formatting, eliminating version confusion and manual errors that occur with ad-hoc exports.
Enable Real-Time Access: Provide stakeholders with immediate access to current company data through API calls rather than waiting for scheduled manual reports or database access approvals.
Simplify Integrations: Create a clean, documented API layer between Odoo and other systems, making it easier to connect CRM, accounting, and analytics platforms without complex custom development.
Improve Security Posture: Reduce the need for direct database access by providing controlled API endpoints with specific data permissions, minimizing security risks associated with broad access privileges.