Skip to content

Commit 1ca6a19

Browse files
committed
[IMP] mail plugins: gmail plugin updates
Updated to reflect how to download Gmail Plugin from Google Workspace Marketplace for Odoo Online users; added new images Closes Odoo Task 3001713
1 parent 4d8e3f9 commit 1ca6a19

File tree

6 files changed

+129
-61
lines changed

6 files changed

+129
-61
lines changed

content/applications/productivity/mail_plugins/gmail.rst

Lines changed: 129 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -2,94 +2,162 @@
22
Gmail Plugin
33
============
44

5-
Configuration
6-
=============
5+
The *Gmail Plugin* integrates an Odoo database with a Gmail inbox, so users can keep track of all
6+
their work between Gmail and Odoo, without losing any information.
77

8-
The Gmail :doc:`Mail Plugin <../mail_plugins>` needs to be configured both on Odoo and Gmail.
8+
Odoo Online users
9+
=================
910

10-
.. _mail-plugin/gmail/enable-mail-plugin:
11+
For databases hosted on Odoo Online (or Odoo.sh), follow the steps below to configure the Gmail
12+
Plugin.
1113

12-
Enable Mail Plugin
13-
------------------
14+
Install the Gmail Plugin
15+
------------------------
1416

15-
First, you need to enable the *Mail Plugin* feature in your database. Go to :menuselection:`Settings
16-
--> General Settings --> Integrations`, enable *Mail Plugin*, and *Save* the configuration.
17+
First, log in to the Gmail account that the user wishes to connect to Odoo.
1718

18-
.. _mail-plugin/gmail/install-plugin:
19+
From the Gmail inbox, click the plus sign icon on the right side panel to get add-ons. If the side
20+
panel is not visible, click on the arrow icon at the bottom right corner of the inbox to reveal it.
1921

20-
Install the Gmail Plugin
21-
------------------------
22+
.. image:: gmail/gmail-side-panel.png
23+
:align: center
24+
:alt: Plus sign icon on the Gmail inbox side panel.
25+
26+
Then, use the search bar to search for `Odoo` and locate the :guilabel:`Odoo Inbox Addin`.
27+
28+
.. image:: gmail/google-workspace-marketplace.png
29+
:align: center
30+
:alt: Odoo Inbox Addin on Google Workspace Marketplace.
31+
32+
Or, go directly to the :guilabel:`Odoo Inbox Addin` page on the `Google Workspace Marketplace
33+
<https://workspace.google.com/marketplace/app/odoo_inbox_addin/873497133275>`_.
34+
35+
Once the plugin is located, click :guilabel:`Install`. Then, click :guilabel:`Continue` to start
36+
the installation.
37+
38+
Next, select which Gmail account the user wishes to connect to Odoo. Then click :guilabel:`Allow`
39+
to let Odoo access the Google account. Google will then show a pop-up window confirming that the
40+
installation was successful.
41+
42+
Configure the Odoo database
43+
---------------------------
2244

23-
#. Open the `Gmail Plugin Apps Script project
24-
<https://script.google.com/d/1n7cxtaR4fGXKcP0RwinNQmL8S4FhVqpo-ZZ_cUAhYuuDpZAP_CnHE_7q/edit>`_.
45+
The :guilabel:`Mail Plugin` feature must be enabled in the Odoo database in order to use the Gmail
46+
Plugin. To enable the feature, go to :menuselection:`Settings --> General Settings`. Under the
47+
:guilabel:`Integrations` section, activate :guilabel:`Mail Plugin`, and then click
48+
:guilabel:`Save`.
2549

26-
#. Verify you are logged in using the Google account you want to install the plugin on.
50+
.. image:: gmail/mail-plugin-setting.png
51+
:align: center
52+
:alt: The Mail Plugin feature in the Settings.
2753

28-
#. Click on *Publish* then *Deploy from manifest...*
54+
Configure the Gmail inbox
55+
-------------------------
2956

30-
.. image:: gmail/deploy-from-manifest.png
31-
:align: center
32-
:alt: Deploying from manifest the Gmail Plugin from the Apps Script project
57+
In the Gmail inbox, a purple Odoo icon is now visible on the right side panel. Click on the Odoo
58+
icon to open up the Odoo plugin window. Then, click on any email in the inbox. Click
59+
:guilabel:`Authorize Access` in the plugin window to grant Odoo access to the Gmail inbox.
3360

34-
.. important::
35-
Make sure you are using the legacy editor; otherwise the *Deploy from manifest* functionality
36-
may not be available.
61+
.. image:: gmail/authorize-access.png
62+
:align: center
63+
:alt: The Authorize Access button in the right sidebar of the Odoo plugin panel.
64+
65+
Next, click :guilabel:`Login`. Then, enter the URL of the Odoo database that the user wishes to
66+
connect to the Gmail inbox, and log in to the database.
67+
68+
.. note::
69+
Use the general URL for the database, not the URL of a specific page in the database. For
70+
example, use `https://mycompany.odoo.com`, not
71+
`https://mycompany.odoo.com/web#cids=1&action=menu`.
72+
73+
Finally, click :guilabel:`Allow` to let Gmail access the Odoo database. The browser will then show a
74+
:guilabel:`Success!` message. After that, close the window. The Gmail inbox and Odoo database are
75+
now connected.
76+
77+
Odoo On-Premise users
78+
=====================
79+
80+
For databases hosted on servers other than Odoo Online (or Odoo.sh), follow the steps below to
81+
configure the Gmail Plugin.
82+
83+
.. note::
84+
As part of their security guidelines, Google requires add-on creators to provide a list of URLs
85+
that can be used in actions and redirections launched by the add-on. This protects users by
86+
ensuring, for example, that no add-on redirects users toward a malicious website. (Read more on
87+
`Google Apps Script <https://developers.google.com/apps-script/manifest/allowlist-url>`_.)
88+
89+
Since Odoo can only list the `odoo.com` domain and not every on-premise customer’s unique server
90+
domain, on-premise customers cannot install the Gmail Plugin from the Google Workspace
91+
Marketplace.
92+
93+
Install the Gmail Plugin
94+
------------------------
3795

38-
.. image:: gmail/legacy-editor.png
39-
:align: center
40-
:alt: Using the legacy editor in the Gmail Plugin Apps Script project
96+
First, access the `GitHub repository <https://github.com/odoo/mail-client-extensions>`_ for the
97+
Odoo Mail Plugins. Next, click on the green :guilabel:`Code` button. Then, click
98+
:guilabel:`Download ZIP` to download the Mail Plugin files onto the user's computer.
4199

42-
#. Click on *Install add-on*. A "Deployment installed" notification should appear. You can then
43-
click on *Close*.
100+
.. image:: gmail/gh-download-zip.png
101+
:align: center
102+
:alt: Download the ZIP file from the Odoo GitHub repository for Mail Plugins.
44103

45-
.. image:: gmail/install-add-on.png
46-
:align: center
47-
:alt: Installing the Gmail Plugin from the Apps Script project
104+
Open the ZIP file on the computer. Then, go to :menuselection:`mail-client-extensions-master -->
105+
gmail --> src --> views`, and open the :guilabel:`login` TS file using any text editor software,
106+
such as Notepad (Windows), TextEdit (Mac), or Visual Studio Code.
48107

49-
.. _mail-plugin/gmail/configure-mailbox:
108+
Delete the following three lines of text from the :guilabel:`login` TS file:
50109

51-
Configure your Gmail mailbox
52-
----------------------------
110+
.. code-block:: python
53111
54-
#. Open any email in your Gmail mailbox. On the right-side panel, click on the Odoo icon and then
55-
*Authorize Access*.
112+
if (!/^https:\/\/([^\/?]*\.)?odoo\.com(\/|$)/.test(validatedUrl)) {
113+
return notify("The URL must be a subdomain of odoo.com");
114+
}
56115
57-
.. image:: gmail/authorize-access.png
58-
:align: center
59-
:alt: Authorizing access to the Gmail Plugin
116+
This removes the `odoo.com` domain constraint from the Gmail Plugin program.
60117
61-
#. Choose the right Google account.
118+
Next, in the ZIP file, go to :menuselection:`mail-client-extensions-master --> gmail`, and open the
119+
file called :guilabel:`README`. Follow the instructions in the :guilabel:`README` file to push the
120+
Gmail Plugin files as a Google Project.
62121
63-
.. image:: gmail/choose-account.png
64-
:align: center
65-
:alt: Choosing your Google account
122+
.. note::
123+
The computer must be able to run Linux commands in order to follow the instructions on the
124+
:guilabel:`README` file.
66125
67-
#. Allow the Gmail Plugin to access some of your data.
126+
After that, share the Google Project with the Gmail account that the user wishes to connect to
127+
Odoo. Then, click :guilabel:`Publish` and :guilabel:`Deploy from manifest`. Lastly, click
128+
:guilabel:`Install the add-on` to install the Gmail Plugin.
68129
69-
.. image:: gmail/allow-permissions.png
70-
:align: center
71-
:alt: Allowing the Gmail Plugin to access Google data
130+
Configure the Odoo database
131+
---------------------------
72132
73-
#. The right-side panel can now display **Company Insights**. At the bottom, click on *Login*.
133+
The :guilabel:`Mail Plugin` feature must be enabled in the Odoo database in order to use the Gmail
134+
Plugin. To enable the feature, go to :menuselection:`Settings --> General Settings`. Under the
135+
:guilabel:`Integrations` section, activate :guilabel:`Mail Plugin`, and then click
136+
:guilabel:`Save`.
74137
75-
.. image:: gmail/panel-login.png
76-
:align: center
77-
:alt: Logging in your Odoo database
138+
.. image:: gmail/mail-plugin-setting.png
139+
:align: center
140+
:alt: The Mail Plugin feature in the Settings.
78141
79-
.. note::
80-
Only a limited amount of *Company Insights* (*Lead Enrichment*) requests are available as a
81-
trial. This feature requires :ref:`prepaid credits <mail_plugins/pricing>`.
142+
Configure the Gmail inbox
143+
-------------------------
82144
83-
#. Enter your Odoo database URL and click on *Login*.
145+
In the Gmail inbox, a purple Odoo icon is now visible on the right side panel. Click on the Odoo
146+
icon to open up the Odoo plugin window. Then, click on any email in the inbox. Click
147+
:guilabel:`Authorize Access` in the plugin window to grant Odoo access to the Gmail inbox.
84148
85-
.. image:: gmail/database-url.png
86-
:align: center
87-
:alt: Entering your Odoo database URL
149+
.. image:: gmail/authorize-access.png
150+
:align: center
151+
:alt: The Authorize Access button in the right sidebar of the Odoo plugin panel.
88152
89-
#. If you aren't logged into your database, enter your credentials.
153+
Next, click :guilabel:`Login`. Then, enter the URL of the Odoo database that the user wishes to
154+
connect to the Gmail inbox, and log in to the database.
90155
91-
#. Click on *Allow* to let the Gmail Plugin connect to your database.
156+
.. note::
157+
Use the general URL for the database, not the URL of a specific page in the database. For
158+
example, use `https://mycompany.odoo.com`, not
159+
`https://mycompany.odoo.com/web#cids=1&action=menu`.
92160
93-
.. image:: gmail/odoo-permission.png
94-
:align: center
95-
:alt: Allowing the Gmail Plugin to connect to a database
161+
Finally, click :guilabel:`Allow` to let Gmail access the Odoo database. The browser will then show a
162+
:guilabel:`Success!` message. After that, close the window. The Gmail inbox and Odoo database are
163+
now connected.
49.1 KB
Loading
45.9 KB
Loading
46.4 KB
Loading
9.83 KB
Loading
25.5 KB
Loading

0 commit comments

Comments
 (0)