

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-timeUse case type
notificationReal-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.
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
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.
Field Mapping
Map these fields between your apps.
| Field | API Name | |
|---|---|---|
| Required | ||
| Reaction Name | ||
| Channel ID | ||
| Thread Timestamp | ||
| Message Text | ||
| User Display Name | ||
| Message Timestamp | ||
| AI Model Choice | ||
| System Prompt | ||
Step-by-Step Setup
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.
- 1Click the purple 'New' button in top left
- 2Select 'Workflow' from the dropdown
- 3Choose 'Start with a trigger'
- 4Search for 'Slack' in the app list
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.
- 1Select 'Reaction Added' from the event list
- 2Click 'Connect Account' and authorize your Slack workspace
- 3Leave 'Channel' blank to monitor all channels
- 4Click 'Save' to finalize the trigger
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.
- 1Click the + button below your trigger
- 2Select 'Run custom code'
- 3Choose 'Node.js' as the runtime
- 4Paste the emoji filter code in the editor
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.
- 1Click + to add another step
- 2Search for Slack and select it
- 3Choose 'Get Thread Messages' action
- 4Map the channel ID and thread timestamp from the trigger
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.
- 1Add a new Node.js code step
- 2Access the thread messages from the previous step
- 3Loop through messages to build formatted text
- 4Export the formatted content for the next step
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.
- 1Click + to add a step and select OpenAI
- 2Choose 'Chat Completions' from the actions
- 3Click 'Connect Account' and paste your API key
- 4Select 'gpt-4' or 'gpt-3.5-turbo' as the model
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.
- 1Set Role to 'system' for the first message
- 2Enter the system prompt defining summary format
- 3Add a second message with Role 'user'
- 4Map the formatted thread content from step 5
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.
- 1Add a Slack 'Send Message to Channel' step
- 2Map the channel ID from the original trigger
- 3Set thread_ts to the original message timestamp
- 4Map the OpenAI summary to the message text
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.
- 1Click 'Deploy' in the top right of your workflow
- 2Go to any Slack thread in your workspace
- 3React to a message with the π emoji
- 4Wait 10-15 seconds for the summary to appear
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() };
}
});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
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.
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.
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
How to Share Notion Meeting Notes to Slack with Pipedream
~15 min setup
How to Share Notion Meeting Notes to Slack with Power Automate
~15 min setup
How to Share Notion Meeting Notes to Slack with n8n
~20 min setup
How to Send Notion Meeting Notes to Slack with Zapier
~8 min setup
How to Share Notion Meeting Notes to Slack with Make
~12 min setup
How to Create Notion Tasks from Slack with Pipedream
~15 min setup