Google Workspace Add-on that extends Gmail and adds sentiment analysis capabilities.
- Google Cloud Project (aka Standard Cloud Project for Apps Script) with billing enabled
- Create a Cloud Project
- Enable the Vertex AI API
- Create a Service Account and grant the role
Vertex AI User - Create a private key with type JSON. This will download the JSON file for use in the next section.
- Open an Apps Script Project bound to a Google Sheets Spreadsheet
- From Project Settings, change project to GCP project number of Cloud Project from step 1
- Add a Script Property. Enter
service_account_keyas the property name and paste the JSON key from the service account as the value.
- Add OAuth2 v43 Apps Script Library using the ID
1B7FSrk5Zi6L1rSxxTDgDEUsPzlukDsi4KGuTMorsTQHhGBzBkMun4iDF. - Add the project code to Apps Script
- Create a label in Gmail with this exact text and emojy (case sensitive!): UPSET TONE 😡
- In Gmail, click on the Productivity toolbox icon (icon of a spy) in the sidepanel.
- The sidepanel will open up. Grant the Add-on autorization to run.
- The Add-on will load. Click on the blue button "Identify angry customers."
- Close the Add-on by clicking on the X in the top right corner.
- It can take a couple of minutes until the label is applied to the messages that have a negative tone.
- If you don't want to wait until the labels are added, you can refresh the browser.