Intermediate~15 min setupAI & CommunicationVerified April 2026
OpenAI logo
Slack logo

How to analyze Slack message sentiment with Power Automate

Monitor a Slack feedback channel and automatically classify each message as positive, neutral, or negative using OpenAI GPT.

Steps and UI details are based on platform versions at time of writing β€” check each platform for the latest interface.

Best for

Teams that need instant sentiment tracking on customer feedback without manual review

Not ideal for

High-volume channels with 100+ messages daily due to OpenAI API costs

Sync type

real-time

Use case type

enrichment

Real-World Example

πŸ’‘

A 25-person B2B SaaS company monitors their #customer-feedback channel and automatically tags each message with sentiment. Before automation, product managers spent 30 minutes daily manually categorizing feedback. Now they get instant sentiment scores and can prioritize negative feedback within minutes.

What Will This Cost?

Drag the slider to your expected monthly volume.

/mo
505005K50K

Each platform counts differently β€” Zapier: 1 task per trigger. Make: 1 operation per module per record. n8n: 1 execution per run.

Prices shown for annual billing. Based on published pricing as of April 2026.

Estimated ROI

1000

min saved/mo

$583

labor value/mo

Free

no platform cost

Based on ~2 min manual effort per operation at $35/hr fully loaded labor cost.

Implementation

Skip the setup

Import this workflow directly into Power Automate

Copy the pre-built Power Automate blueprint and paste it straight into Power Automate. All modules, filters, and field mappings are already configured β€” you just need to connect your accounts.

Before You Start

Make sure you have everything ready.

OpenAI API key with billing enabled (requires credit card on file)
Slack workspace admin permissions to install Power Automate app
Microsoft 365 account with Power Automate license (included in most business plans)
Access to the Slack channel you want to monitor

Field Mapping

Map these fields between your apps.

FieldAPI Name
Required
Message Text
User ID
GPT Model
Sentiment Result
3 optional fieldsβ–Έ show
User Name
Channel
Timestamp

Step-by-Step Setup

1

My flows > + New flow > Automated cloud flow

Create new automated flow

Go to make.powerautomate.com and sign in with your Microsoft account. Click 'My flows' in the left sidebar, then the blue '+ New flow' button. Select 'Automated cloud flow' from the dropdown menu. Name your flow 'Slack Sentiment Analysis' and search for 'Slack' in the trigger search box.

  1. 1Click 'My flows' in the left sidebar
  2. 2Click the blue '+ New flow' button
  3. 3Select 'Automated cloud flow'
  4. 4Enter 'Slack Sentiment Analysis' as the flow name
  5. 5Search for 'Slack' in the trigger picker
βœ“ What you should see: You should see the Slack connector options with triggers like 'When a message is posted to a channel'.
2

Trigger > Slack > When a message is posted to a channel

Configure Slack message trigger

Select 'When a message is posted to a channel' from the Slack triggers. Power Automate will prompt you to create a connection to Slack. Click 'Sign in' and authorize the connection in the popup window. After connecting, you'll see a dropdown for Team and Channel. Select your workspace and choose the #feedback channel you want to monitor.

  1. 1Click 'When a message is posted to a channel'
  2. 2Click 'Sign in' to connect Slack
  3. 3Authorize Power Automate in the Slack popup
  4. 4Select your Slack workspace from Team dropdown
  5. 5Choose '#feedback' from Channel dropdown
βœ“ What you should see: The trigger shows your selected channel name and a green checkmark indicating successful connection.
⚠
Common mistake β€” The trigger fires on ALL messages including bot messages and threading replies, which can waste API calls.
Power Automate
+
click +
search apps
OpenAI
OP
OpenAI
Configure Slack message trig…
OpenAI
OP
module added
3

New step > Control > Condition

Add condition to filter bot messages

Click '+ New step' below the Slack trigger. Search for 'Condition' and select the Control connector's Condition action. In the left value box, click 'Add dynamic content' and select 'User ID' from the Slack trigger. Set the condition to 'is not equal to' and leave the right value empty. This filters out system messages that have null User IDs.

  1. 1Click '+ New step' below the trigger
  2. 2Search for 'Condition' and select it
  3. 3Click the left value box and select 'User ID' from dynamic content
  4. 4Set dropdown to 'is not equal to'
  5. 5Leave the right value box empty
βœ“ What you should see: You should see a condition block with 'User ID is not equal to [blank]' configured.
⚠
Common mistake β€” Don't use 'User name' field as it can be inconsistent with bot detection.
OpenAI
OP
trigger
filter
Condition
matches criteria?
yes β€” passes through
no β€” skipped
Slack
SL
notified
4

Condition Yes > Add an action > HTTP

Add OpenAI GPT action

In the 'Yes' branch of the condition, click 'Add an action'. Search for 'OpenAI' and you'll see the HTTP connector since there's no native OpenAI connector. Select 'HTTP' and choose 'HTTP' action. Set the method to POST and the URI to 'https://api.openai.com/v1/chat/completions'. We'll configure headers and body in the next steps.

  1. 1Click 'Add an action' in the Yes branch
  2. 2Search for 'HTTP' and select the HTTP connector
  3. 3Choose the 'HTTP' action
  4. 4Set Method dropdown to 'POST'
  5. 5Enter 'https://api.openai.com/v1/chat/completions' in URI field
βœ“ What you should see: You should see an HTTP action configured with POST method and the OpenAI API endpoint.
⚠
Common mistake β€” Make sure you use the /v1/chat/completions endpoint, not the legacy /v1/completions endpoint.
5

HTTP action > Show advanced options > Headers

Configure OpenAI authentication headers

In the HTTP action, click 'Show advanced options'. In the Headers section, add a new header by typing 'Authorization' in the key field and 'Bearer YOUR_API_KEY' in the value field (replace with your actual OpenAI API key). Add another header with key 'Content-Type' and value 'application/json'. Your API key should start with 'sk-' if it's valid.

  1. 1Click 'Show advanced options' in the HTTP action
  2. 2Click 'Enter key' in Headers section
  3. 3Type 'Authorization' as the key
  4. 4Type 'Bearer sk-YOUR_API_KEY' as the value
  5. 5Add another header with key 'Content-Type' and value 'application/json'
βœ“ What you should see: Headers section shows Authorization and Content-Type headers properly configured.
⚠
Common mistake β€” Never hardcode API keys in production - use environment variables or Key Vault references instead.
6

HTTP action > Body

Build OpenAI request body

In the Body field of the HTTP action, you need to construct a JSON payload for the OpenAI API. Click in the Body field and build this JSON structure. Set the model to 'gpt-3.5-turbo' for cost efficiency. Create a system message that instructs GPT to classify sentiment, then include the actual Slack message text as the user message. Use dynamic content to insert the 'Text' field from the Slack trigger.

  1. 1Click in the Body field
  2. 2Start typing the JSON structure with model and messages
  3. 3Set system message with sentiment analysis instructions
  4. 4Click 'Add dynamic content' for the user message
  5. 5Select 'Text' from the Slack trigger dynamic content
βœ“ What you should see: Body field contains properly formatted JSON with the Slack message text dynamically inserted.
⚠
Common mistake β€” JSON syntax errors will cause the API call to fail - validate your JSON structure carefully.
7

Add action > Data Operation > Parse JSON

Parse OpenAI API response

Add another action below the HTTP step. Search for 'Parse JSON' and select it from the Data Operation connector. In the Content field, select 'body' from the HTTP action's dynamic content. You'll need to provide a schema that matches OpenAI's response structure. The key field you want is choices[0].message.content which contains the sentiment classification.

  1. 1Click 'Add an action' below the HTTP step
  2. 2Search for 'Parse JSON' and select it
  3. 3Click Content field and select 'body' from HTTP dynamic content
  4. 4Click 'Generate from sample' to create schema
  5. 5Paste a sample OpenAI API response to generate the schema
βœ“ What you should see: Parse JSON action shows the schema and can extract the sentiment from the API response.
8

Add action > Slack > Post message

Post sentiment result back to Slack

Add a final Slack action to post the sentiment analysis result. Search for Slack and select 'Post message' action. Choose the same channel or a different channel like #sentiment-alerts. In the message text, combine the original message text with the parsed sentiment result. Format it clearly so your team can quickly see both the original feedback and its classification.

  1. 1Click 'Add an action' after Parse JSON
  2. 2Search for 'Slack' and select 'Post message'
  3. 3Select your target channel from the dropdown
  4. 4Click in Message field and add dynamic content
  5. 5Combine original Text and parsed sentiment result
βœ“ What you should see: Slack action is configured to post formatted messages with original text and sentiment classification.
⚠
Common mistake β€” Test with a dedicated test channel first to avoid spamming your main channels during setup.
9

Save > Test in Slack channel > Check run history

Test the complete flow

Save your flow by clicking the 'Save' button in the top toolbar. Post a test message in your monitored Slack channel - try something clearly positive like 'Great job on the new feature!' The flow should trigger automatically, call OpenAI's API, and post the sentiment result back to Slack. Check the run history to debug any failures.

  1. 1Click 'Save' in the top toolbar
  2. 2Go to your monitored Slack channel
  3. 3Post a test message with clear sentiment
  4. 4Wait 30-60 seconds for the flow to complete
  5. 5Check run history in Power Automate for success/errors
βœ“ What you should see: You should see a new message in your target channel with the sentiment analysis of your test message.
⚠
Common mistake β€” First runs can take 2-3 minutes to process as Power Automate initializes the flow connections.

Add this expression in the HTTP Body field to create a more robust JSON payload with proper escaping and token limits for the OpenAI API call.

Copy this template{
β–Έ Show code
{
  "model": "gpt-3.5-turbo",
  "messages": [

... expand to see full code

{
  "model": "gpt-3.5-turbo",
  "messages": [
    {
      "role": "system",
      "content": "Classify the sentiment of user feedback as exactly one word: positive, negative, or neutral. Only respond with that single word."
    },
    {
      "role": "user",
      "content": "@{replace(replace(triggerBody()?['text'], '"', '\\"'), char(10), ' ')}"
    }
  ],
  "max_tokens": 10,
  "temperature": 0.3
}
Power Automate
β–Ά Test flow
executed
βœ“
OpenAI
βœ“
Slack
Slack
πŸ”” notification
received

Going live

Production Checklist

Before you turn this on for real, confirm each item.

Troubleshooting

Common errors and how to fix them.

Frequently Asked Questions

Common questions about this workflow.

Analysis

VerdictWhy n8n for this workflow

Use Microsoft Power Automate for this if you're already deep in the Microsoft ecosystem and want native integration with Teams, SharePoint, or other Microsoft services. Power Automate handles the Slack webhook registration automatically and includes built-in retry logic for API failures. Skip it if you need advanced data transformation or complex conditional logic - Make handles those scenarios much better.

Cost

Real costs add up fast. Each sentiment analysis costs $0.002-0.004 with gpt-3.5-turbo. At 100 messages daily, expect $6-12 monthly in OpenAI fees plus your Power Automate premium license ($15/user/month). Zapier costs similar for the automation but charges per task, making it $30+ monthly for the same volume. n8n self-hosted is cheapest at just the OpenAI costs.

Tradeoffs

Make beats Power Automate with better JSON handling and built-in OpenAI connector that handles authentication automatically. Zapier's Formatter tools make text preprocessing easier than Power Automate's limited expression functions. n8n offers the most control with custom JavaScript for prompt engineering and response parsing. Pipedream gives you full Node.js access for building sophisticated sentiment scoring. Power Automate wins on ease of setup and Microsoft integration, but lags on flexibility.

You'll hit rate limits at 200+ messages per hour with OpenAI's default quotas. Power Automate doesn't queue requests intelligently, so bursts of Slack activity can cause failures. JSON parsing breaks when Slack messages contain special characters or exceed 4000 characters. The biggest gotcha: Power Automate's HTTP connector doesn't handle OpenAI's streaming responses, so you're stuck with basic completions that take 3-5 seconds per message.

Ideas for what to build next

  • β†’
    Add confidence scoring β€” Modify the GPT prompt to return confidence levels with each sentiment classification for better decision making.
  • β†’
    Create sentiment dashboard β€” Use Power BI to visualize sentiment trends over time by connecting to a database that stores the classified results.
  • β†’
    Set up escalation alerts β€” Add logic to immediately notify managers in Slack when negative sentiment is detected in customer feedback.

Related guides

Was this guide helpful?
← OpenAI + Slack overviewPower Automate profile β†’