Skip to Content

Connect Google Spreadsheet

20.80 26.00

Technical Name
odoo_connect_spreadsheet
Subscribe to download Add to collection

The module allows businesses to synchronize data with Google Sheets in real-time. Users can select specific objects and columns, or use custom SQL queries, to manage data efficiently. This module ensures seamless updates, improves workflow, and provides quick access to data directly within Google Sheets.

  • Real-Time Synchronization: Automatically sync data with Google Sheets for up-to-date information.

  • Customizable Data Selection: Choose which objects and fields to synchronize.

  • SQL Query Support: Use custom queries to select and synchronize specific data.

  • User-Friendly Interface: Configure synchronization easily within the Odoo interface.

  • Secure API Integration: Connect securely to Google Sheets using API credentials.

  • Enhanced Accessibility: Work with data directly in Google Sheets for analysis and reporting.

  • Improved Collaboration: Share synchronized spreadsheets with team members effortlessly.

  • Time-Saving: Reduce manual updates and eliminate repetitive tasks.

  • Customizable Views: Tailor data in Google Sheets to fit business needs.

  • Scalable Solution: Easily expand synchronization to include additional objects as your business grows.

Here is an example of the result. result.png


  1. Google Drive API
  2. Google Sheet API

All use of the Google Drive and Sheets API is available at no additional cost. And the more interest is Google Drive and Sheets API has per-minute quotas, and they're refilled every minute, even if you exceed the quota request limits it doesn't incur extra charges and your account is not billed.

Google Sheets API Quotas
Read requests Per day per project Unlimited
Per minute per project 300
Per minute per user per project 60
Write requests Per day per project Unlimited
Per minute per project 300
Per minute per user per project 60
https://developers.google.com/sheets/api/limits

Google Drive API Quotas
Queries Per 100 seconds 20,000
Per day 1,000,000,000 (1 billion)
Per 100 seconds per user 20,000
https://developers.google.com/drive/api/guides/limits

You can select any models on your to connect to Google spreadsheet

select_any_models.png

And you can select any field in the model to display in the spreadsheet

select_any_fields.png

Choose whether you want to connect an existing spreadsheet or create a new one

existing_or_new.png

If do you want to connect to an existing, fill the Google spreadsheet ID

existing.png

The spreadsheet ID is the ID that showing in the spreadsheet URL like bellow

existing_spreadsheet.png

When you choose the "Existing" option, you will get warning such like this, that indicate you must grant the Google service account email permission first to the existing spreadsheet do you want to connect

warning_service_account_email_permission.png

To grant permission to the service account email, click on the Share button on the existing spreadsheet

grant_existing_spreadsheet_permission.png

But if you want to create a new spreadsheet instead, then select the "Create New" in the option above, then fill the Spreadsheet Title for the new spreadsheet

spreadsheet_title.png

You can update the spreadsheet in real-time, schedule action/cron job every (x) times, or you can also update it manually, it depends on your needs
update_type.png
  1. Realtime

    Every action such create, write and unlink on the selected model will update the spreadsheet automatically. Be careful with busy operations on the selected model and huge of rows, considering the quota limit from Google API. On the other hand this will also make your server be busy because it detects any create, write and unlink/delete on the selected model. But if your server is good enough, there is no problem with this method, because Google API provides quite a lot of request quota. Read more about quotas on the source link listed on the previous slide.

  2. Schedule Action/Cron Job

    The spreadsheet will be updated automatically every (x) time (minutes, hours, days, weeks, and months). You can define the (x) time freely depending on your wants or needs. Go to Settings -> Technical -> Scheduled Actions -> Update spreadsheet, in the example bellow we update the spreadsheet every 1 minutes. schedule_action.png

  3. Manual

    The spreadsheet will be updated when the user triggers Update Spreadsheet button

    manual_update.png

Create new sheets or use the existing
sheet_name.png

If you specify the Sheet Name and the name already exists in the existing spreadsheet, it will write your data in the existing sheet, but if there is no same name in the spreadsheet with the name you defined, it will create a new sheet and write your data on the new one. spreadsheet_sheets.png


Fill data in a specific range, default is A1 notation, we can change it to something like A1:B2, A:A, 1:2, etc...
range_name.png
A thing to note is the defined range cannot be less than the number of selected fields in the model, e.g: If you fill in the range name A:B it will fill your data in two columns in the spreadsheet, so you can't select more than two fields from the selected model, if you select more than two columns, when you update the spreadsheet, it will raise a warning indicating that you can not write more than two columns. If are you not sure, just keep the default A1 value, which means write data starting from A1 notation.

Clear or overwrite the old data

You can choose whether you want to clear all data in the selected sheet name and replace it with new data, if so check Clear Data to True. Or set it to False if you want to write data to the sheet name without clearing the existing data, but be careful when choosing a range name, because it can overwrite old data (if any) with new data in the selected range.

clear_sheet.png

Grant access to the spreadsheet for certain users

You can grant Write or Reader access to the spreadsheet, just select the contact and make sure their email is set up.

grant_access.png

Timezone

By default displays Datetime according to the user's time zone, for example, the Date Order of Purchase Order in the database is stored at 26-12-2022 03:00:00 (UTC), but if a user's time zone is GMT+7 Date Order will be displayed on 2022-12-26 10:00:00. Interestingly with this option, you can select the timezone you want to display when connecting with a spreadsheet.

timezone.png