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

How to Summarize Slack Threads with OpenAI using Pipedream

React with πŸ“ emoji on any Slack thread and get an AI-generated summary posted automatically back to the channel.

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

Best for

Teams drowning in long Slack discussions who need quick thread summaries without leaving the conversation

Not ideal for

Teams wanting proactive summaries or digest emails instead of reactive emoji-triggered summaries

Sync type

real-time

Use case type

notification

Real-World Example

πŸ’‘

A 25-person product team at a B2B SaaS company uses this to summarize design review threads that often hit 30+ messages. Designers react with πŸ“ and get a 3-sentence summary highlighting decisions made and next steps. Before this, team members would scroll through entire threads to catch up, wasting 10-15 minutes per thread.

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 configure bot permissions
OpenAI API account with available credits (GPT-4 costs $0.03 per 1K tokens)
Slack bot with reactions:read, channels:history, and chat:write scopes enabled
Pipedream account (free tier handles 100 executions per month)

Field Mapping

Map these fields between your apps.

FieldAPI Name
Required
Reaction Name
Channel ID
Thread Timestamp
Message Text
User Display Name
Message Timestamp
AI Model Choice
System Prompt

Step-by-Step Setup

1

Dashboard > New > Workflow

Create New Pipedream Workflow

Go to pipedream.com and click New in your dashboard. You'll see a blank workflow builder. This workflow needs to start with a Slack trigger that detects emoji reactions. The trigger will fire instantly when someone adds the πŸ“ emoji to any message.

  1. 1Click the purple 'New' button in top left
  2. 2Select 'Workflow' from the dropdown
  3. 3Choose 'Start with a trigger'
  4. 4Search for 'Slack' in the app list
βœ“ What you should see: You should see a blank workflow canvas with a trigger step placeholder waiting for app selection.
2

Trigger > Slack > Reaction Added

Configure Slack Reaction Added Trigger

Select the 'Reaction Added' event from Slack's trigger options. This fires when any emoji gets added to messages in channels where your bot has access. You'll need to connect your Slack workspace and configure which channels to monitor. The trigger captures the reaction details, message content, and thread context.

  1. 1Select 'Reaction Added' from the event list
  2. 2Click 'Connect Account' and authorize your Slack workspace
  3. 3Leave 'Channel' blank to monitor all channels
  4. 4Click 'Save' to finalize the trigger
βœ“ What you should see: The trigger shows 'Connected' status and displays sample reaction data from your Slack workspace.
⚠
Common mistake β€” Your Slack app needs 'reactions:read' and 'channels:history' scopes or the trigger won't capture thread content.
Pipedream
+
click +
search apps
OpenAI
OP
OpenAI
Configure Slack Reaction Add…
OpenAI
OP
module added
3

Steps > Add Step > Code

Add Filter for πŸ“ Emoji

Add a code step that checks if the reaction is specifically the πŸ“ emoji. Slack sends all emoji reactions through this trigger, so you need to filter for only the notebook emoji. The code examines the reaction name and stops execution if it's not the target emoji.

  1. 1Click the + button below your trigger
  2. 2Select 'Run custom code'
  3. 3Choose 'Node.js' as the runtime
  4. 4Paste the emoji filter code in the editor
βœ“ What you should see: The code step shows no errors and displays the filtered reaction data in the output preview.
⚠
Common mistake β€” Slack sends emoji names like 'memo' not 'πŸ“' - check the actual reaction name in your trigger test data.
OpenAI
OP
trigger
filter
Condition
matches criteria?
yes β€” passes through
no β€” skipped
Slack
SL
notified
4

Steps > Add Step > Slack > Get Thread Messages

Fetch Complete Thread Messages

Add another Slack step to retrieve all messages in the thread. The reaction trigger only gives you the original message, but you need the full conversation for summarization. Use Slack's conversations.replies API to get the complete thread including timestamps and user information.

  1. 1Click + to add another step
  2. 2Search for Slack and select it
  3. 3Choose 'Get Thread Messages' action
  4. 4Map the channel ID and thread timestamp from the trigger
βœ“ What you should see: You should see an array of all thread messages with user names, timestamps, and message text.
⚠
Common mistake β€” Thread timestamp is different from message timestamp - use the trigger's 'thread_ts' field, not 'ts'.
5

Steps > Add Step > Code

Format Thread Content for OpenAI

Create a code step that converts the raw Slack thread data into clean text for the AI model. Remove Slack formatting, resolve user mentions to readable names, and structure the conversation chronologically. This step is critical for getting quality summaries from GPT.

  1. 1Add a new Node.js code step
  2. 2Access the thread messages from the previous step
  3. 3Loop through messages to build formatted text
  4. 4Export the formatted content for the next step
βœ“ What you should see: The code output shows clean, readable conversation text without Slack markup or user IDs.
⚠
Common mistake β€” Map fields using the variable picker β€” don't type field names manually. Hand-typed variable names often have invisible spacing errors that produce blank output.
6

Steps > Add Step > OpenAI > Chat Completions

Connect OpenAI Account

Add an OpenAI step and connect your API account. You'll need an OpenAI API key from platform.openai.com. Choose the Chat Completions action to send the formatted thread to GPT-4 or GPT-3.5-turbo for summarization.

  1. 1Click + to add a step and select OpenAI
  2. 2Choose 'Chat Completions' from the actions
  3. 3Click 'Connect Account' and paste your API key
  4. 4Select 'gpt-4' or 'gpt-3.5-turbo' as the model
βœ“ What you should see: OpenAI shows 'Connected' status and the model dropdown populates with available options.
⚠
Common mistake β€” GPT-4 costs 10x more than GPT-3.5-turbo but gives better summaries for complex technical discussions.
Pipedream settings
Connection
Choose a connection…Add
click Add
OpenAI
Log in to authorize
Authorize Pipedream
popup window
βœ“
Connected
green checkmark
7

OpenAI Step > Messages Configuration

Configure Summary Prompt

Set up the system and user prompts to get consistent, useful summaries. The system prompt defines the AI's role and output format. The user prompt contains the actual thread content. Specify that you want 2-3 sentences focusing on decisions made and action items.

  1. 1Set Role to 'system' for the first message
  2. 2Enter the system prompt defining summary format
  3. 3Add a second message with Role 'user'
  4. 4Map the formatted thread content from step 5
βœ“ What you should see: The prompt configuration shows your system instructions and the dynamic thread content placeholder.
8

Steps > Add Step > Slack > Send Message

Post Summary Back to Slack

Add a final Slack step to post the AI summary back to the original channel as a thread reply. Use the 'Send Message' action and make sure to set the thread timestamp so it appears as a reply, not a new message. Include some visual formatting to make the summary stand out.

  1. 1Add a Slack 'Send Message to Channel' step
  2. 2Map the channel ID from the original trigger
  3. 3Set thread_ts to the original message timestamp
  4. 4Map the OpenAI summary to the message text
βœ“ What you should see: The step shows the formatted message that will be posted, with the summary text and thread reply configuration.
⚠
Common mistake β€” Use the original message timestamp for thread_ts, not the reaction timestamp, or the reply won't thread correctly.
9

Workflow > Deploy > Test in Slack

Test the Complete Workflow

Deploy your workflow and test it end-to-end in Slack. Go to any channel thread and react with πŸ“. The workflow should trigger, fetch the thread, generate a summary, and post it back within 10-15 seconds. Check the execution logs in Pipedream to debug any issues.

  1. 1Click 'Deploy' in the top right of your workflow
  2. 2Go to any Slack thread in your workspace
  3. 3React to a message with the πŸ“ emoji
  4. 4Wait 10-15 seconds for the summary to appear
βœ“ What you should see: You should see the AI-generated summary posted as a thread reply with clear formatting.
⚠
Common mistake β€” If nothing happens, check your Slack app's channel permissions - it needs access to read the specific channel.

This code formats the raw Slack thread data into clean text for OpenAI and handles user mention resolution. Paste this into your thread formatting code step.

JavaScript β€” Code Stepexport default defineComponent({
β–Έ Show code
export default defineComponent({
  async run({ steps, $ }) {
    const messages = steps.get_thread_messages.messages || [];

... expand to see full code

export default defineComponent({
  async run({ steps, $ }) {
    const messages = steps.get_thread_messages.messages || [];
    
    let formattedThread = "";
    
    for (const msg of messages) {
      // Skip bot messages and system messages
      if (msg.bot_id || msg.subtype) continue;
      
      // Get user display name
      const userInfo = await $.send.http({
        method: 'GET',
        url: `https://slack.com/api/users.info`,
        headers: {
          'Authorization': `Bearer ${auths.slack.oauth_access_token}`
        },
        params: { user: msg.user }
      });
      
      const displayName = userInfo.user?.real_name || userInfo.user?.name || 'Unknown User';
      
      // Clean up message text - remove user mentions and links
      let cleanText = msg.text
        .replace(/<@U[A-Z0-9]+>/g, '@user')
        .replace(/<#C[A-Z0-9]+\|([^>]+)>/g, '#$1')
        .replace(/<([^>]+)>/g, '$1');
      
      // Format timestamp
      const timestamp = new Date(parseFloat(msg.ts) * 1000).toLocaleTimeString();
      
      formattedThread += `[${timestamp}] ${displayName}: ${cleanText}\n`;
    }
    
    return { formatted_thread: formattedThread.trim() };
  }
});
Pipedream
β–Ά Deploy & test
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 Pipedream for this if your team needs instant thread summaries and you're comfortable with light coding. The Node.js code steps let you clean up Slack's messy message formatting before sending to OpenAI, which dramatically improves summary quality. Pipedream's instant webhook processing means summaries appear 5-10 seconds after the emoji reaction. Skip this platform if you need zero-code setup - Zapier handles the basic version without custom formatting.

Cost

Real costs add up fast with active teams. Each summary uses 500-2000 tokens depending on thread length. At 50 summaries per month with GPT-3.5-turbo, expect $5-8/month in OpenAI costs plus Pipedream's free tier. GPT-4 pushes that to $50-80/month but catches nuanced decisions that GPT-3.5 misses. Pipedream's execution limits hit at 100 runs monthly on free tier.

Tradeoffs

Zapier costs more per execution but needs zero coding for basic summaries. Make handles this cheaper with better built-in text formatting tools, though summaries take 30+ seconds to appear. n8n gives you the same coding flexibility as Pipedream but requires self-hosting. Power Automate integrates well if you're already Microsoft-heavy, but Slack integration requires premium connectors. Pipedream wins on speed and OpenAI integration simplicity.

You'll hit OpenAI rate limits with enthusiastic teams who react to everything. Slack's user mention format (<@U123>) breaks GPT context if you don't clean it up first - the raw data is useless. Long threads with images and files inflate token counts since you're sending URLs and metadata. Set a 50-message thread limit or you'll burn through API quotas on those marathon planning discussions.

Ideas for what to build next

  • β†’
    Add Custom Summary Styles β€” Create different emoji triggers (πŸ“Š for data focus, βœ… for action items only, πŸ” for technical details) with tailored prompts for each summary type.
  • β†’
    Build Thread Analytics Dashboard β€” Send summary data to Google Sheets or Airtable to track which channels generate the most long discussions and identify communication patterns.
  • β†’
    Create Digest Workflows β€” Extend this to automatically summarize all threads from the past week and post digest reports to leadership channels every Friday.

Related guides

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