| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 465 |
| Technical Name |
o4p_n8n_bi |
| License | OPL-1 |
| Website | https://www.ODOO4projects.com |
| Versions | 17.0 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 465 |
| Technical Name |
o4p_n8n_bi |
| License | OPL-1 |
| Website | https://www.ODOO4projects.com |
| Versions | 17.0 18.0 19.0 |
BI Queries
Expose named PostgreSQL queries as secure, token-authenticated JSON endpoints — ready for dashboards, scripts and n8n workflows.
What it solves
Your BI tool, dashboard or n8n workflow needs live Odoo data — but Odoo's standard JSON-RPC requires an authenticated session and can't run arbitrary SQL. Exporting CSVs by hand every morning is slow, error-prone and never up to date. This module gives you a direct, token-secured pipeline from PostgreSQL to any external tool — no session, no middleware, no manual work.
What it does
Store named SQL queries in Odoo and call each one via a lightweight HTTP endpoint. No Odoo session required — just a Bearer token in the Authorization header. Results come back as structured JSON.
Per-query Bearer tokens
Each query gets its own cryptographically secure token. Regenerate with one click whenever needed.
Masked token UI
Tokens are hidden by default with show/hide and one-click copy buttons.
Direct PostgreSQL execution
Queries run directly on the database — no ORM overhead. Ideal for heavy aggregations.
Structured JSON response
Returns id, query, row_count and a typed data array keyed by column name.
Endpoint
Example response
How to use
Go to Settings › BI › BI Queries and create a new query with a name and your SQL.
Copy the auto-generated token using the copy button next to the masked token field.
Call the endpoint from curl, your dashboard tool, or an n8n HTTP Request node — pass
Authorization: Bearer <token>.If Odoo runs with multiple databases, always include the
dbparameter.If a token is ever compromised, click Regenerate Token and update your integrations.
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module