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

How to analyze Slack sentiment with OpenAI using Pipedream

Automatically classify messages in your #feedback channel as positive, neutral, or negative using GPT.

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

Best for

Product teams who want real-time sentiment monitoring of customer feedback without manual review

Not ideal for

Teams processing thousands of messages daily - batch analysis is more cost-effective

Sync type

real-time

Use case type

enrichment

Real-World Example

πŸ’‘

A 25-person SaaS company monitors their #customer-feedback channel where support tickets and feature requests land. Before automation, the product manager spent 30 minutes each morning reading through messages to gauge customer sentiment. Now GPT analyzes each message within seconds and posts the sentiment score back to a thread, letting the team spot negative trends immediately.

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 Pipedream

Copy the pre-built Pipedream blueprint and paste it straight into Pipedream. 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.

Slack workspace admin access to install apps and invite bots to channels
OpenAI API account with available credit balance for GPT API calls
Target Slack channel where you want to monitor messages
Pipedream account (free tier supports up to 100 invocations per month)

Field Mapping

Map these fields between your apps.

FieldAPI Name
Required
Message Text
Channel ID
Message Timestamp
GPT Model
System Prompt
2 optional fieldsβ–Έ show
User ID
Max Tokens

Step-by-Step Setup

1

Pipedream > Workflows > New

Create new Pipedream workflow

Head to pipedream.com and click New Workflow. You'll land on the workflow builder with an empty canvas. The trigger step will be pre-selected at the top. Click on it to configure your Slack connection.

  1. 1Click 'New Workflow' from your dashboard
  2. 2Click the trigger step labeled 'Select a trigger'
  3. 3Search for 'Slack' in the app list
  4. 4Choose 'New Message Posted to Channel'
βœ“ What you should see: You should see the Slack trigger configuration panel open on the right side.
2

Trigger Configuration > Connect Account

Connect your Slack workspace

Click Connect Account to authorize Pipedream with your Slack workspace. You'll be redirected to Slack's OAuth page. Make sure you're logged into the correct workspace before authorizing. Pipedream needs read access to channels and message content.

  1. 1Click 'Connect Account' button
  2. 2Select your Slack workspace from the dropdown
  3. 3Click 'Allow' on the permission screen
  4. 4Wait for the green 'Connected' confirmation
βœ“ What you should see: You should see your Slack account name appear in the Connected Account field.
⚠
Common mistake β€” If you don't see your target channel later, you may need to invite the Pipedream bot to that channel first.
Pipedream settings
Connection
Choose a connection…Add
click Add
OpenAI
Log in to authorize
Authorize Pipedream
popup window
βœ“
Connected
green checkmark
3

Trigger Configuration > Channel Selection

Configure channel monitoring

Select your feedback channel from the Channel dropdown. This list pulls all channels where the Pipedream bot has access. If you don't see your target channel, go to Slack and type /invite @Pipedream in that channel first. Leave the other filters empty to capture all messages.

  1. 1Click the Channel dropdown menu
  2. 2Search for your feedback channel name
  3. 3Select the channel from the list
  4. 4Leave 'Username' and 'Bot' filters empty
βœ“ What you should see: The channel name should appear in the selected field with a # prefix.
⚠
Common mistake β€” Private channels won't appear unless you explicitly invite the Pipedream bot as a member.
4

Trigger Configuration > Deploy & Test

Test the Slack trigger

Click Deploy at the bottom of the trigger step. Then go to your Slack channel and post a test message. Return to Pipedream and click the refresh icon next to Test Event. You should see your test message data populate in the preview panel.

  1. 1Click 'Deploy' to activate the trigger
  2. 2Go to Slack and post a message in your monitored channel
  3. 3Return to Pipedream and click the refresh icon
  4. 4Click 'Use This Event' if the message appears correctly
βœ“ What you should see: You should see message text, user info, and timestamp in the event data preview.
Pipedream
β–Ά Deploy & test
executed
βœ“
OpenAI
βœ“
Slack
Slack
πŸ”” notification
received
5

Workflow Builder > Add Step > OpenAI

Add OpenAI step

Click the + button below your trigger to add a new step. Search for OpenAI in the app directory and select 'Chat' as the action type. This gives you access to GPT-3.5 and GPT-4 models for text analysis.

  1. 1Click the '+' button below the trigger step
  2. 2Type 'OpenAI' in the search box
  3. 3Select 'OpenAI' from the apps list
  4. 4Choose 'Chat' from the actions dropdown
βœ“ What you should see: The OpenAI Chat configuration panel should open showing model and message options.
⚠
Common mistake β€” Don't confuse 'Chat' with 'Completions' - Chat is the newer API format that works with GPT-3.5-turbo and GPT-4.
6

OpenAI Step > Connect Account

Connect OpenAI API

Click Connect Account and paste your OpenAI API key. Get this from platform.openai.com under API Keys. Create a new secret key if you don't have one. The key starts with 'sk-' and is about 50 characters long.

  1. 1Click 'Connect Account' in the OpenAI step
  2. 2Open platform.openai.com/api-keys in a new tab
  3. 3Click 'Create new secret key' and copy the key
  4. 4Paste the API key into Pipedream's field
βœ“ What you should see: You should see 'Connected to OpenAI' with a green checkmark.
⚠
Common mistake β€” Save your API key somewhere safe - OpenAI only shows it once and you can't retrieve it later.
7

OpenAI Step > Model & Messages

Configure GPT model and prompt

Set the model to 'gpt-3.5-turbo' for speed and cost efficiency. In the Messages array, add a system message with your sentiment analysis instructions and a user message containing the Slack message text. Use the dynamic data selector to insert the message content from step 1.

  1. 1Set Model to 'gpt-3.5-turbo'
  2. 2Click '+ Add Message' and set role to 'system'
  3. 3Add your system prompt in the content field
  4. 4Click '+ Add Message' again, set role to 'user'
  5. 5Insert Slack message text using the data selector
βœ“ What you should see: You should see two messages configured: one system prompt and one user message with dynamic Slack data.
8

OpenAI Step > System Message Content

Write sentiment analysis prompt

Your system message should give GPT clear instructions for sentiment classification. Be specific about the output format you want. Ask for a simple response like 'Positive', 'Negative', or 'Neutral' plus a brief reason. Keep the prompt under 100 words to minimize token usage.

  1. 1Click in the system message content field
  2. 2Type: 'Analyze the sentiment of this customer feedback message'
  3. 3Add: 'Respond with only: Positive, Negative, or Neutral'
  4. 4Add: 'Then add a dash and brief 3-word explanation'
βœ“ What you should see: Your system prompt should be concise and specify the exact output format you want from GPT.
⚠
Common mistake β€” Longer prompts cost more tokens - GPT-3.5-turbo charges for both input and output tokens.
9

Workflow Builder > Add Step > Slack

Add Slack response step

Add another step and select Slack again. Choose 'Send Message to Channel' or 'Add Reaction to Message' depending on how you want to display results. For this workflow, we'll post the sentiment analysis as a threaded reply to the original message.

  1. 1Click '+' below the OpenAI step
  2. 2Search for and select Slack
  3. 3Choose 'Send Message to Channel' action
  4. 4Set Channel to the same feedback channel
βœ“ What you should see: The Slack message configuration should appear with channel and message fields.
⚠
Common mistake β€” Thread replies require the original message's timestamp - make sure to map this correctly from step 1.
10

Slack Response > Message Configuration

Configure sentiment response

In the Message Text field, build your response using data from previous steps. Include the original message author, the sentiment classification from OpenAI, and maybe add an emoji for quick visual scanning. Use the thread_ts field to make this a reply rather than a new message.

  1. 1Click in the Message Text field
  2. 2Add static text like 'Sentiment:'
  3. 3Insert OpenAI response using the data picker
  4. 4Set Thread Timestamp to the original message's ts value
  5. 5Test the message format in the preview
βœ“ What you should see: Your message should show the sentiment result formatted clearly with proper threading.
11

Workflow > Deploy & Test

Test full workflow

Deploy the entire workflow by clicking Deploy at the top. Go to your Slack channel and post a clearly positive or negative message. Watch for the sentiment analysis to appear as a threaded reply within 5-10 seconds. Check the workflow execution log if nothing appears.

  1. 1Click 'Deploy' at the top right
  2. 2Go to Slack and post 'This new feature is amazing!'
  3. 3Wait 10 seconds for the analysis reply
  4. 4Check the workflow Logs tab if no response appears
  5. 5Test with negative feedback too
βœ“ What you should see: You should see threaded replies with sentiment classifications appearing under your test messages.
⚠
Common mistake β€” First runs can take 15-20 seconds while Pipedream initializes connections - subsequent runs are much faster.

Add this Node.js code step between OpenAI and Slack to track sentiment trends and only alert on concerning patterns instead of every message.

JavaScript β€” Code Stepexport default defineComponent({
β–Έ Show code
export default defineComponent({
  async run({ steps, $ }) {
    const sentiment = steps.openai.choices[0].message.content;

... expand to see full code

export default defineComponent({
  async run({ steps, $ }) {
    const sentiment = steps.openai.choices[0].message.content;
    const messageText = steps.trigger.event.text;
    const userId = steps.trigger.event.user;
    
    // Parse GPT response
    const isNegative = sentiment.toLowerCase().includes('negative');
    const isPositive = sentiment.toLowerCase().includes('positive');
    
    // Get recent sentiment history from workflow state
    const recentSentiments = $.service.db.get('recent_sentiments') || [];
    
    // Add current sentiment with timestamp
    const newEntry = {
      sentiment: isNegative ? -1 : (isPositive ? 1 : 0),
      timestamp: Date.now(),
      user: userId,
      text: messageText.substring(0, 100)
    };
    
    recentSentiments.push(newEntry);
    
    // Keep only last 20 messages
    const recent = recentSentiments.slice(-20);
    await $.service.db.set('recent_sentiments', recent);
    
    // Calculate trend - percentage negative in last 10 messages
    const lastTen = recent.slice(-10);
    const negativeCount = lastTen.filter(item => item.sentiment === -1).length;
    const negativePercentage = (negativeCount / lastTen.length) * 100;
    
    // Only proceed to Slack if concerning trend (>40% negative)
    if (negativePercentage > 40) {
      return {
        shouldAlert: true,
        trendAlert: `🚨 ${negativePercentage}% of recent feedback is negative`,
        currentSentiment: sentiment,
        recentNegative: negativeCount
      };
    }
    
    // Stop workflow execution for normal sentiment
    $.flow.exit('Normal sentiment trend - no alert needed');
  }
});

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 Pipedream for this if you need real-time sentiment monitoring with custom business logic. The Node.js code steps let you build sentiment trending, conditional alerts, and custom scoring that generic tools can't match. Skip Pipedream if you just want basic sentiment tagging without any intelligence - Zapier's GPT integration costs the same and requires zero code.

Cost

Real math: GPT-3.5-turbo costs $0.002 per 1K tokens. A typical Slack message uses 50-100 tokens for analysis, so you're paying roughly $0.0001-0.0002 per message. At 500 messages monthly, that's $0.10 in OpenAI costs. Pipedream's free tier covers 100 workflow executions monthly, then $0.01 per run after that. Total monthly cost for 500 messages: $4.10. Zapier would cost $20/month at that volume.

Tradeoffs

Zapier's ChatGPT integration is simpler for basic sentiment labeling and handles the OpenAI connection more smoothly. Make beats everyone on cost with better bulk processing if you can batch messages every hour instead of real-time analysis. n8n matches Pipedream's coding flexibility but requires self-hosting to avoid their execution limits. Power Automate integrates better with Microsoft Teams if that's your chat platform. But Pipedream wins on the instant webhook processing - your sentiment analysis appears in 2-3 seconds versus 1-2 minutes on other platforms.

You'll hit GPT's content policy rejections on messages containing profanity or heated complaints - OpenAI returns an error instead of sentiment analysis. The Slack bot permissions get revoked if someone removes it from channels, breaking your triggers silently. Thread replies fail if your workflow triggers on edited messages since the timestamp format changes. Budget for 10-15% higher OpenAI costs than estimated - longer customer messages and system prompts add up faster than you expect.

Ideas for what to build next

  • β†’
    Add sentiment scoring β€” Modify the GPT prompt to return confidence scores (1-10) along with classifications for more nuanced analysis.
  • β†’
    Build sentiment dashboard β€” Send results to Google Sheets or Airtable to track sentiment trends over time and identify patterns.
  • β†’
    Smart escalation rules β€” Add conditional logic to immediately notify product managers when highly negative feedback is detected from key customers.

Related guides

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