Mail Pro signs in to Gmail through an OAuth client in your own Google Cloud project. Making one takes about ten minutes and needs a Google Workspace administrator. You do it once; after that everybody connects their mailbox with their own Google sign-in.
You only need this if your mail is hosted at Google Workspace. For Microsoft 365 see Microsoft 365 Setup; for any other host see IMAP/SMTP Setup. A personal @gmail.com account cannot be connected: Mail Pro on Google is for Workspace accounts only.
Before you start, finish step 1 of Settings → Mail Pro (connect this Odoo to Pantalytics).
Step 1: Pick Gmail in Odoo
-
Go to Settings → Mail Pro and press the arrow on step 2, Email provider. The provider page opens on Microsoft 365.
-
Set Provider to Gmail.
- Copy the Callback URL it shows. It looks like
https://your-odoo-domain.com/google_oauth/callback.
Leave this tab open; you come back to it in Step 5.
Step 2: Create a Google Cloud project
-
Open Google Cloud Console → New project, signed in with your Workspace administrator account
-
Name it
Odoo Mail Pro, keep your organization as its location, and press Create - Check that the new project is selected in the picker at the top
Step 3: Turn on the Gmail API
-
Open Gmail API in the API Library
-
Press Enable
Skip this and the sign-in still works, but every mail Mail Pro sends or reads afterwards fails.
Step 4: Set up the sign-in screen and the client
-
Open Google Auth Platform and press Get started
-
App information: app name
Odoo Mail Pro, and your own address as User support email -
Audience: choose Internal. Only accounts in your Workspace can then sign in, which is what Mail Pro needs, and Google does not review the app
-
Contact information: your address. Agree to the policy and press Create
- Go to Clients and press Create client
- Application type: Web application. Name:
Odoo Mail Pro -
Under Authorized redirect URIs, press Add URI and paste the Callback URL from Step 1
-
Press Create, then copy the Client ID and the Client secret
Google shows the client secret only now. Copy it, or press Download JSON, before you close the dialog. Lost it? Open the client, add a new secret, and use that one.
An Internal app needs nothing under Data Access: Google does not list scopes on the sign-in screen for an app that only your own Workspace uses.
Step 5: Enter the client in Odoo
- Back on the provider page, paste the Client ID and Client secret
- Press Save
- Press Sign in with Google and sign in with your own Workspace account
Step 2 of Settings, Mail Pro turns green. Your colleagues each connect their own mailbox next: see User Setup.
What Mail Pro asks for
| Scope | Why |
|---|---|
openid, email |
Which Workspace account just signed in |
https://www.googleapis.com/auth/gmail.modify |
Read, label and send mail, and keep drafts |
gmail.modify covers sending, so Mail Pro does not ask for gmail.send as
well. It never asks for https://mail.google.com/, which would also allow
deleting mail for good.
Shared addresses on Gmail
On Microsoft 365 a colleague sends as sales@ with their own sign-in. On
Google, sales@ is a Workspace user of its own, with its own password, and it
signs in as itself. A Google Group cannot sign in, so make sales@ a user,
not a group.
- Add the mailbox under Settings → Mail Pro, step 4, with no Owner
- Open it. It says it is not signed in yet: press Sign in as this address
- Google asks which account to use. Choose Use another account and sign
in as
sales@
Signed in as anybody else, Mail Pro stores nothing and says which address it expected. Only a mailbox manager sees the button.
Next Steps
Proceed to User Setup to connect accounts.