Configure Sentiment Analysis Flow

Learn how to configure a sentiment analysis flow.

Employee App
Front Door Intranet

The sentiment analysis flow allows you to monitor the sentiment of News posts and comments. After importing the Sentiment Analysis template into a flow, you can configure it.

You need to follow the same configuration process for both the news posts analysis flow and comment analysis flow.

Open the flow

  1. In Power Automate, navigate to the sentiment analysis flow you imported.
  2. Click Edit to open the flow.
    The sentiment analysis flow opens.

You have opened the flow. Now, you can configure the steps in the flow.

Configure the analysis interval and channels

Copy the ID of the channels for which you want to analyze comments or posts. If you want to analyze the comments of all channels, you can leave the channel ID value empty.

  1. In the sentiment analysis flow, click the step Recurrence Interval to define how often you want to run the sentiment analysis flow.
  2. In the Interval field, enter a value.
    For example, enter 24 to run the analysis once every 24 hours.
  3. From the Frequency dropdown, select the frequency.

Define the frequency of your flow depending on your pricing plan for Microsoft Azure Cognitive Services.

  1. Click the step Staffbase Recurrence Interval.
  2. In the Value field, enter the same value you entered for the Interval field.
  3. Optionally, open the step Staffbase Channels if you want to analyze the comments of specific channels.
  4. In the Value field, paste the channel IDs you copied in the following format:
    [ "channelId1", "channelId2", …. "channelIdN" ]
Staffbase Channels

If you do not provide specific channel IDs, all channels are analyzed.

Configure your Staffbase platform

  1. In the sentiment analysis flow, open the step Staffbase URL.
  2. In the Value field, enter the URL of your Staffbase platform.
Staffbase URL

You have configured your Staffbase platform details. Now, you can configure the notification details.

Configure the notification details

  1. In the sentiment analysis flow, click the step Staffbase Notification Recipients.
  2. In the Value field, enter the email address of the recipient who needs to get a notification.
    For example, this can be a shared mailbox — contentmanagement@yourcompany.com

Alternatively, you can enter multiple recipients. If you are entering multiple email addresses, separate each email address with a semicolon. For example, contentmanager@yourcompany.com; contenteditor@yourcompany.com; communitymanager@yourcompany.com

  1. Click the step Staffbase Notification Text.
  2. In the Value field, enter a subject line for the email notification.
    For example, Negative sentiments detected
  3. Click Save.

You can do additional customization to the email notification by modifying flow steps on your own. For example, customize the email notification header, body, or footer.

Enable the flow

  1. In Power Automate, navigate to the sentiment analysis flow you configured.
  2. Click Turn on. You have enabled the flow.

Fix errors and save the flow

Some steps can miss a mapping connection leading to errors. You need to fix all the errors before saving the flow.

  1. On the flow page, click Flow checker on the top toolbar.
    The Flow checker dialog opens and displays any errors.
  2. Click on an error.
    You are redirected to the step in which the configuration is incorrect.
  3. Provide the correct details to fix the error.
  4. Click Save.

Test the flow

After saving the flow, you can test the flow to ensure that it works as expected.

  1. On the flow page, click Test in the top toolbar.
    The Test Flow dialog opens.
  2. Click Manually.
  3. Click Save & Test.
    You have tested the flow. If you have not encountered any errors, you can run the flow. If you encounter any errors, fix them and test the flow again.

On completing the test successfully, an email is sent out to the recipient if a negative sentiment is detected.

Go to the flow’s Run history page to analyze the flow. You can click on any step to see the details. For example, you can see on which posts negative sentiment comments were detected under Check comments sentiment

Sentiment Analysis .