Manage your productsProduct images with Google Images

Product images with Google Images

Leveraging Google Custom Search API in Odoo simplifies bulk product image assignment, allowing images to be added quickly based on product barcodes.

Having accurate product images in Odoo is important for sales, inventory, and online visibility. Assigning images manually for a large product catalog, however, can be very time-consuming.

By integrating the Google Custom Search API into Odoo, you can automatically retrieve images for products using their barcodes, saving time and improving efficiency.

Setup

To use the Google Custom Search API in Odoo, both the Odoo database and the Google API need to be properly configured.

Note

Free Google accounts allow up to 100 image queries per day. If more images are required, upgrading to a paid plan is necessary.

Google API Dashboard

  1. Visit the Google Cloud Platform API & Services page. Log in with your Google account, accept the Terms of Service, and click Agree and Continue.

  2. Create (or select) a project for storing your API credentials. Give it a recognizable Project Name, choose a Location if required, and click Create.

  3. In the left sidebar, select Credentials, click Create Credentials, and choose API key from the dropdown.

    API & Services page on Google Cloud Platform.
    API & Services page on Google Cloud Platform.
  4. A pop-up with your API key will appear. Copy and save it securely – you will need it for Odoo. Then click Close.

    The API key created pop-up window that appears.
    The API key created pop-up window that appears.
  5. Search for Custom Search API in the search bar and select it.

    Search bar containing 'Custom Search API' on Google Cloud Platform.
    Search bar containing 'Custom Search API' on Google Cloud Platform.
  6. On the Custom Search API page, click Enable to activate it.

    'Custom Search API' page with Enable button highlighted on Google Cloud Platform.
    'Custom Search API' page with Enable button highlighted on Google Cloud Platform.

Google Programmable Search Dashboard

  1. Go to Google Programmable Search Engine and click Get started. Log in if needed.

    Google Programmable Search Engine page with the Get Started buttons.
    Google Programmable Search Engine page with the Get Started buttons.
  2. Fill in the Create a new search engine form with a name and the sites or content to search. Enable Image Search and SafeSearch.

    Create new search engine form that appears with search engine configurations.
    Create new search engine form that appears with search engine configurations.
  3. Click Create to finalize the search engine.

  4. You will see a confirmation page: Your new search engine has been created.

    The Your New Search Engine Has Been Created page that appears with copy code.
    The Your New Search Engine Has Been Created page that appears with copy code.
  5. Click Customize, go to Overview ‣ Basic, and copy the Search engine ID. This ID is required for Odoo.

    Basic overview page with search engine ID field.
    Basic overview page with search engine ID field.

Odoo Configuration

  1. Open Settings in Odoo and scroll to Integrations. Enable the Google Images option and click Save.

    The Google Images setting in the Odoo Settings app page.
    The Google Images setting in the Odoo Settings app page.
  2. Enter the API Key and Search Engine ID in the fields under Google Images. Click Save.

Assigning Product Images Using Google Custom Search API

Images can be assigned to any product or product variant in Odoo, using apps such as Sales or Inventory.

Follow these steps to fetch images via the Google Custom Search API:

  1. Navigate to Products in the Sales app (Sales app ‣ Products ‣ Products) or Product Variants (Sales app ‣ Products ‣ Product Variants).

  2. Select the product (or variant) requiring an image.

    Note

    Only products with a barcode and without an existing image are processed. If a product has multiple variants, each matching variant will be processed.

  3. Click the Action ⚙️ (gear) icon and select Get Pictures from Google Images.

    The Get Pictures from Google Images option from the Action drop-down menu in Odoo.
    The Get Pictures from Google Images option from the Action drop-down menu in Odoo.
  4. In the pop-up, click Get Pictures.

    The pop-up that appears in which the user should click Get Picture in Odoo Sales.
    The pop-up that appears in which the user should click Get Picture in Odoo Sales.
  5. Images will appear gradually.

    Note

    • Only the first 10 images are retrieved immediately; additional images are fetched via a background job.
    • The background job can process approximately 100 images per minute. If the daily quota is reached, the job pauses for 24 hours and then resumes automatically.