Skip to Content

Connect Google Cloud Vertex AI with Odoo: A Step-by-Step Guide

21 June 2025 by
Nikhil Krishnan

🧠 Why Integrate Google Cloud Vertex AI with Odoo?


Odoo is a robust, open-source ERP platform used by businesses of all sizes to manage core operations like sales, inventory, accounting, CRM, HR, and more. What makes Odoo particularly powerful is its modular architecture and flexibility—developers can customize or extend any module to fit unique business needs. It provides a seamless way to unify data and processes across departments, helping organizations operate more efficiently and make data-driven decisions.


On the other side, Google Cloud Vertex AI is a fully managed machine learning platform that helps you build, deploy, and scale ML models. Whether you're using pre-trained APIs or training custom models, Vertex AI brings powerful tools like AutoML, feature store, pipelines, and endpoints under one ecosystem. It's designed for production-grade AI use cases, enabling developers and data scientists to move from experimentation to deployment faster and more reliably.


By integrating Vertex AI with Odoo, you're embedding intelligence directly into your business workflow. Such as smart predictions, recommendations, and automation—right inside your ERP system.


This means you can:
  • Predict customer behavior (e.g., churn or lifetime value)
  • Recommend products based on past purchases
  • Score leads automatically
  • Forecast demand or sales trends
  • Automate repetitive decision-making tasks


Instead of treating AI as a separate tool, this integration puts it right inside your ERP, enabling smarter, real-time business actions based on data.

  • Predict customer behavior (e.g., churn or lifetime value)
  • Recommend products based on past purchases
  • Score leads automatically
  • Forecast demand or sales trends
  • Automate repetitive decision-making tasks


🛠️ What You'll Need

  • A working Odoo instance
  • Google Cloud Project with Vertex AI enabled
  • Trained model and deployed endpoint
  • Python and Odoo knowledge
  • google-cloud-aiplatform SDK


🔧 Step 1: Set Up Vertex AI on Google Cloud

To get started with Google’s machine learning capabilities, we first need to set up Vertex AI—Google Cloud’s unified platform for developing and deploying ML models.

You have two main options depending on your use case and budget:


✅ Option 1: Deploy a Trained Model (AutoML or Custom)

Go to the Google Cloud Console: https://console.cloud.google.com/


Create or Select a Project:

Choose an existing project or create a new one where your AI workload will live.


Enable Vertex AI API:

Navigate to APIs & Services > Library, search for Vertex AI API, and enable it.


Train a Model (Two options):

AutoML (No-code): Upload a dataset (like a CSV), define the target column, and let Google Cloud train the model for you. This works well for tabular data, image classification, or text classification.


Custom Model (Advanced): If you have your own trained model (e.g., in TensorFlow, PyTorch), you can upload and serve it from Vertex AI.


Deploy the Model to an Endpoint:

After training, click on the model → Deploy to Endpoint. Once deployed, copy the endpoint ID, which will be used by our products/applications like odoo to make prediction requests.



✅ Option: Use Vertex AI Studio with Prompt-based Models (Cost-Effective)

If your use case involves tasks like text generation, classification, sentiment analysis, or document summarization, you can use Vertex AI Studio, which supports prompt-based interactions with foundation models like Gemini or PaLM.


Go to Vertex AI Studio: https://console.cloud.google.com/vertex-ai/studio


Start a New Prompt:

Choose the appropriate model (text-bison, gemini-pro, etc.), and define a prompt that suits your business use case.


Test and Tune:

Try out your prompts directly in the UI. Once you're happy with the output, copy the prompt configuration or set up a custom endpoint using Generative AI API.


Use the Generative AI API in Odoo:

This allows you to send user inputs from Odoo to the prompt model and receive structured responses without needing to build or train a model.


💡 Use Case Example:

Instead of manually writing product descriptions, you can automate the process by generating compelling, SEO-friendly descriptions for each product in your Odoo database. The system can use data such as the product name, image (for visual context), and variants (like size, color, or material) to craft a unique and engaging product description.


Using Google Vertex AI Studio's prompt-based models (like Gemini), you can send this product metadata as input and receive high-quality, human-like product descriptions—tailored for e-commerce, catalogs, or internal sales use. You can then store this generated text directly into the Product Description field in Odoo.


✨ Two Ways to Use Vertex AI Studio with Odoo

When working with Google Vertex AI Studio, you can easily build natural language solutions (like product description generation) using simple prompt-based interfaces. There are two main ways to use your prompt in a production setup:

🧪 1. Create a Prompt with System Instructions + Prompt Note

In Vertex AI Studio, you start by crafting a prompt using:

  • System Instructions: Define the AI’s behavior. Example: “You are an expert e-commerce content writer. Write creative and SEO-optimized product descriptions.”

  • Prompt Input: Provide the actual data (product name, image description, variant details, etc.)

This creates a reusable and fine-tuned generation logic without needing to train a custom model.

🚀 2. Publish as App or Use 'Get Code'

Once your prompt setup is ready, you can proceed in either of the following ways:

  • 🔧 Deploy as App
    In the top-right corner of the interface, click “Deploy as App”. This turns your prompt into a lightweight web app powered by Google Cloud infrastructure. Ideal for testing or internal tools.

  • 📜 Get Code for Backend Integration
    Alternatively, click “Get Code”. This opens a wizard where you can:

    • Select your programming language: Python, Node.js, Web, Flutter, Android, etc.

    • Configure API parameters (temperature, max tokens, etc.)

    • Copy ready-to-use code snippets

🧩 Using the Python Code in Odoo

For Odoo integration, simply choose Python in the "Get Code" wizard. The generated code includes everything you need to:

  • Authenticate using a service account
  • Call the Vertex AI model with the prompt
  • You can select from various supported models, including: Gemini family
  • Receive and use the AI response

You can then paste this code into your Odoo module (e.g., a helper script), and call it from an Odoo model method or controller.

✅ Example: When creating or updating a product, trigger a method that sends product metadata to Vertex AI and writes the response to the product’s description field in Odoo.