MARKETPLACE
PLUGINS
GOOGLE CLOUD NLP SENTIMENT ANALYSIS
Google Cloud NLP Sentiment Analysis logo

Google Cloud NLP Sentiment Analysis

Published August 2020
   •    Updated this month

Plugin details

Google Cloud NLP - Sentiment Analysis is a natural language processing (NLP) service for gaining insight into the content of documents.
This plugin provides two ways to analyze sentiment:
- DETECT SENTIMENT (BACK-END): Server-side action for sentiment analysis
- DETECT SENTIMENT (FRONT-END): Client-side element with action for more responsive sentiment analysis

Both options inspect text for sentiments and return information such as the overall sentiment's score and magnitude of the document, for each sentence, and the document language.

> For additional text analysis, please refer to the "Google Cloud NLP - Text Analytics" plugin.

A script is provided to automatically configure your Google Cloud settings.

Demo link: https://gcpnaturalsentimentdemo.bubbleapps.io/version-test
Editor link: https://bubble.io/page?type=page&name=index&id=gcpnaturalsentimentdemo-editor&tab=tabs-1

💡 𝗦𝘂𝗯𝘀𝗰𝗿𝗶𝗽𝘁𝗶𝗼𝗻𝘀 𝗮𝗿𝗲 𝗽𝗿𝗼𝗿𝗮𝘁𝗲𝗱. 𝗜𝗳 𝘆𝗼𝘂 𝗶𝗻𝘀𝘁𝗮𝗹𝗹 𝗮𝗻𝗱 𝘂𝗻𝘀𝘂𝗯𝘀𝗰𝗿𝗶𝗯𝗲 𝘁𝗵𝗶𝘀 𝗽𝗹𝘂𝗴𝗶𝗻 𝗶𝗻 𝗼𝗻𝗲 𝗱𝗮𝘆 𝘁𝗼 𝘁𝗲𝘀𝘁 𝗶𝘁 𝗼𝘂𝘁, 𝘆𝗼𝘂'𝗹𝗹 𝗼𝗻𝗹𝘆 𝗯𝗲 𝗰𝗵𝗮𝗿𝗴𝗲𝗱 𝟭/𝟯𝟬𝘁𝗵 𝗼𝗳 𝘁𝗵𝗲 𝗺𝗼𝗻𝘁𝗵𝗹𝘆 𝘀𝘂𝗯𝘀𝗰𝗿𝗶𝗽𝘁𝗶𝗼𝗻 𝗳𝗲𝗲.

📖 𝗦𝘁𝗲𝗽-𝗯𝘆-𝗦𝘁𝗲𝗽 𝗶𝗻𝘀𝘁𝗿𝘂𝗰𝘁𝗶𝗼𝗻𝘀 𝗮𝗿𝗲 𝘁𝗵𝗲 "𝗜𝗻𝘀𝘁𝗿𝘂𝗰𝘁𝗶𝗼𝗻𝘀" 𝘀𝗲𝗰𝘁𝗶𝗼𝗻 𝗮𝗻𝗱 𝗗𝗲𝗺𝗼 𝗘𝗱𝗶𝘁𝗼𝗿 𝗶𝘀 𝗶𝗻 𝘁𝗵𝗲 "𝗟𝗶𝗻𝗸𝘀" 𝘀𝗲𝗰𝘁𝗶𝗼𝗻 𝗼𝗳 𝘁𝗵𝗲 𝗣𝗹𝘂𝗴𝗶𝗻 𝗣𝗮𝗴𝗲.

Contact us at [email protected] for any additional feature you would require or support question.

$99

One time  •  Or  $5/mo

5.0 stars   •   1 ratings
38 installs  
This plugin does not collect or track your personal data.

Platform

Web & Native mobile

Contributor details

wise:able logo
wise:able
Joined 2020   •   122 Plugins
View contributor profile

Instructions

1️⃣: DETECT SENTIMENT (BACK-END) =======================

📋 ACTION DESCRIPTION
--------------------------------
DETECT SENTIMENT (BACK-END) inspects text for sentiment, and returns information such as the overall sentiment's score and magnitude of the overall document, for each sentence, and the document language.

🔧 STEP-BY-STEP SETUP
--------------------------------
ℹ️ The steps from 0) to 1) can be automatically performed by logging in into your Google Cloud Console, opening the Cloud Shell (top right corner of your page) and copy pasting this command and press enter:

wget -q https://storage.googleapis.com/bubblegcpdemo/demo-assets/wiseable-gcp-language.py && python3 wiseable-gcp-language.py

Otherwise, follow these manual steps:

0) Set-up a project from Google Cloud Console: https://cloud.google.com/language/docs/setup
- Create or select a project
- Enable the CLOUD NATURAL LANGUAGE API for that project
- Create a service account
- Download a private key as JSON.

1) Open the private key JSON file with a text editor, copy/paste the following parameters from your file to the Plugin settings:
- CLIENT_EMAIL
- PROJECT_ID
- PRIVATE_KEY, including the -----BEGIN PRIVATE KEY-----\\n prefix and \\n-----END PRIVATE KEY-----\\n suffix.

2) Set up the action "DETECT SENTIMENT (BACK-END)" in the workflow.
 Inputs Fields:
   - TEXT: A UTF-8 text string. Each string must contain fewer than 1,000,000 bytes of UTF-8 encoded characters.
   - RESULT DATA TYPE: Returned type, must always be set to "RESULT (NLP SENTIMENT ANALYSIS)".
 Output Fields:
   - RESULTS: Returns information such as the overall sentiment's score and magnitude of the overall document, for each sentence, and the document language.

2️⃣: GOOGLE CLOUD NLP SENTIMENT ANALYSIS (FRONT-END)
==================================

📋 ELEMENT DESCRIPTION
--------------------------------
GOOGLE CLOUD NLP SENTIMENT ANALYSIS (FRONT-END) provides a visual element with the DETECT SENTIMENT (FRONT-END) action to analyze text sentiment directly from the client-side. This is ideal for applications where responsiveness is desired.

🔧 STEP-BY-STEP SETUP
--------------------------------
ℹ️ The steps from 0) to 1) can be automatically performed by logging in into your Google Cloud Console, opening the Cloud Shell (top right corner of your page) and copy pasting this command and press enter:

wget -q https://storage.googleapis.com/bubblegcpdemo/demo-assets/wiseable-gcp-language.py && python3 wiseable-gcp-language.py

0) Set-up a project from Google Cloud Console: https://cloud.google.com/language/docs/setup
- Create or select a project
- Enable the CLOUD NATURAL LANGUAGE API for that project
- Create a service account
- Download a private key as JSON.

1) Open the private key JSON file with a text editor, copy/paste the following parameters from your file to the Plugin settings:
- CLIENT_EMAIL
- PROJECT_ID
- PRIVATE_KEY, including the -----BEGIN PRIVATE KEY-----\\n prefix and \\n-----END PRIVATE KEY-----\\n suffix.

2) Register on plugins.wiseable.io. Create a new Credential which associates your BUBBLE APP URL, GCP PROJECT_ID, CLIENT_EMAIL & PRIVATE_KEY.
The registration service will generate your PUBLIC ACCESS KEY. This key serves as a secure proxy for your real API key. It allows your application to communicate with the service without exposing your real API key. Since this PUBLIC ACCESS KEY is explicitly tied to your registered BUBBLE APP URL, it can only be used from that domain, ensuring that even if the key is publicly visible, it remains safe and cannot be misused by unauthorized sources.

3) Enter in the PLUGIN SETTINGS your PUBLIC ACCESS KEY (used for front-end element only).

4) Add the GOOGLE CLOUD NLP SENTIMENT ANALYSIS (FRONT-END) element to the page on which the sentiment analysis feature must be integrated. Select the RESULT DATA TYPE as Returned type, must always be set to "RESULT (NLP SENTIMENT ANALYSIS)".

5) Integrate the logic into your application using the following element's states and actions:

FIELDS:
- RESULT DATA TYPE: Returned type, must always be set to "RESULT (NLP SENTIMENT ANALYSIS)".  

EVENTS:
- SUCCESS: Event triggered upon success
- ERROR: Event triggered upon error

EXPOSED STATES:
Use any element able to show/process the data of interest (such as a Group with a Text field) stored within the result of the following states of the element:
- RESULTS: Populated upon SUCCESS event. Returns information such as the overall sentiment's score and magnitude of the overall document, for each sentence, and the document language.
- ERROR MESSAGE: Populated upon ERROR event.
- IS PROCESSING: Set to true when processing is in progress, false otherwise.

ELEMENT ACTIONS - TRIGGERED IN WORKFLOW:
- DETECT SENTIMENT (FRONT-END): Analyze text for sentiment. Populates RESULTS state upon completion.

Inputs Fields:
 - TEXT: A UTF-8 text string. Each string must contain fewer than 1,000,000 bytes of UTF-8 encoded characters.

🔍 IMPLEMENTATION EXAMPLE
======================
Feel free to browse the app editor in the Service URL for an implementation example.

ℹ️ ADDITIONAL INFORMATION
======================
> Supported languages: https://cloud.google.com/natural-language/docs/languages

> GOOGLE NATURAL LANGUAGE PROCESSING service limits: https://cloud.google.com/natural-language/quotas

⚠️ TROUBLESHOOTING
================
Any plugin related error will be posted to the Logs tab, "Server logs" section of your App Editor.
Make sure that "Plugin server side output" and "Plugin client side output" is selected in "Show Advanced".

For front-end actions, you can also open your browser's developer console (F12 or Ctrl+Shift+I in most browsers) to view detailed error messages and logs.

Always check the ERROR MESSAGE state of the element and implement error handling using the ERROR event to provide a better user experience.

> Server Logs Details: https://manual.bubble.io/core-resources/bubbles-interface/logs-tab#server-logs

⚡ PERFORMANCE CONSIDERATIONS
===========================

⏱️ BACK-END ACTION START DELAY
-----------------------------------------------
Each time a server-side action is called, Bubble initializes a small virtual machine to execute the action. If the same action is called shortly after, the caching mechanism kicks in, resulting in faster execution on subsequent calls.

A useful workaround is to fire a dummy execution at page load, which pre-warms the Bubble engine for the next few minutes, reducing the impact of cold starts for your users.

Note that for back-end actions, the maximum retrievable result set is capped at 30 seconds duration time - this does not apply to front-end actions.

❓ QUESTIONS?
===========
Contact us at [email protected] for any additional feature you would require or support question.

Types

This plugin can be found under the following types:
Api   •   Background Services   •   Element   •   Event   •   Action

Categories

This plugin can be found under the following categories:
Media   •   Productivity   •   Analytics   •   Customer Support   •   AI   •   Visual Elements

Resources

Support contact
Documentation
Tutorial

Rating and reviews

Average rating (5.0)

Great for getting sentitment
October 30th, 2020
Instructions on setup are clear and the plugin works as described. We are collecting sentiment values on some input fields. Works great in a backend workflow also for post thing creation processing. We are auto flagging content that doesn't meet our criteria and it is working like a charm. Great job team!
Thanks for your lovely feedback, it means a lot to us ❤️! Don’t hesitate to reach us if needed be, we are always happy to support your endeavors 🚀! (plugin author)
October 30th, 2020
  •  
wise:able
Bubble