

How to Draft email responses with Pipedream
Paste client emails into Slack and automatically get professional response drafts generated by OpenAI GPT-4.
Steps and UI details are based on platform versions at time of writing β check each platform for the latest interface.
Best for
Customer service teams that handle 20+ client emails daily and need consistent response quality
Not ideal for
Teams handling sensitive legal or financial communications that require human-only review
Sync type
real-timeUse case type
notificationReal-World Example
A 12-person customer success team at a SaaS company uses this to handle client emails faster. Team members paste incoming emails into #support-drafts and get AI-generated responses within 10 seconds. Before automation, drafting responses took 8-12 minutes per email and response quality varied by rep experience.
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.
Optional
Field Mapping
Map these fields between your apps.
| Field | API Name | |
|---|---|---|
| Required | ||
| Original Email Content | ||
| Slack Username | ||
| Channel ID | ||
| Thread Timestamp | ||
| AI Response Text | ||
1 optional fieldβΈ show
| Response Tone |
Step-by-Step Setup
pipedream.com > Workflows > New
Create new workflow
Go to pipedream.com and click New Workflow in the top right. You'll land on the workflow builder with an empty canvas. The trigger step is automatically created as the first node in your workflow.
- 1Click the 'New Workflow' button
- 2Select 'Start with a trigger' option
- 3Name your workflow 'Email Response Drafter'
Trigger Step > Select App > Slack
Configure Slack trigger
Click on the trigger step and select Slack as your source app. Choose 'New Message Posted to Channel' as your trigger event. This fires instantly when someone posts to your designated channel without polling delays.
- 1Click the trigger step
- 2Search for 'Slack' in the app list
- 3Select 'New Message Posted to Channel' trigger
- 4Click 'Connect Account' to authenticate
Slack Trigger > Channel Configuration
Select monitoring channel
Choose which Slack channel to monitor for email pastes. Create a dedicated channel like #email-drafts to keep this separate from general chat. The workflow will trigger every time someone posts in this channel.
- 1Select your target channel from the dropdown
- 2If channel doesn't exist, create it in Slack first
- 3Leave 'Include Bot Messages' unchecked
- 4Click 'Test Trigger' to verify connection
usage.prompt_tokens: {{usage.prompt_tokens}}
usage.completion_tokens: {{usage.completion_tokens}}
Workflow > Add Step > Node.js
Add filter step
Add a custom Node.js step to filter out short messages and bot posts. This prevents the workflow from firing on casual chat messages that aren't email content. You want to process only substantial text that looks like forwarded emails.
- 1Click the + button below your trigger
- 2Select 'Run custom Node.js code'
- 3Name the step 'Filter Email Content'
- 4Paste the filter logic in the code editor
Workflow > Add Step > OpenAI
Connect OpenAI account
Add an OpenAI step and connect your API account. You'll need an OpenAI API key from platform.openai.com. The GPT-4 model works best for professional email responses but costs more than GPT-3.5.
- 1Click + to add another step
- 2Search for 'OpenAI' in the app directory
- 3Select 'Chat' action
- 4Enter your OpenAI API key when prompted
OpenAI Step > Message Configuration
Configure GPT prompt
Set up the system prompt to generate professional email responses. Reference the Slack message text using steps.trigger.event.text. The prompt should specify your company tone, response length, and any specific instructions for your industry.
- 1Set Model to 'gpt-4' for best results
- 2Set Max Tokens to 500 for email-length responses
- 3Configure the system message with response guidelines
- 4Map the user message to the Slack text content
Workflow > Add Step > Node.js
Add response formatting
Create another Node.js step to format the AI response for Slack. This cleans up the GPT output, adds context about the original message, and formats it nicely for your team to copy-paste.
- 1Add another custom Node.js code step
- 2Name it 'Format Response'
- 3Reference the OpenAI response using steps.openai.choices[0].message.content
- 4Add formatting for Slack display
Workflow > Add Step > Slack > Send Message
Send response to Slack
Add a Slack Send Message step to post the drafted response back to the channel. Configure it to reply in a thread so responses stay organized. Include the original poster's username so they know their request was processed.
- 1Add a Slack 'Send Message to Channel' step
- 2Select the same channel as your trigger
- 3Set Thread TS to steps.trigger.event.ts for threading
- 4Map your formatted response to the message text
Workflow > Deploy > Test
Test the workflow
Deploy your workflow and test it by pasting a sample client email into your monitoring channel. The response should appear within 5-10 seconds as a threaded reply. Check that the tone matches your brand and the content addresses the original email appropriately.
- 1Click 'Deploy' in the top right
- 2Go to your Slack channel
- 3Paste a sample client email
- 4Wait for the threaded response
Node.js Steps > Error Handling
Configure error handling
Add a try-catch block to handle OpenAI API errors gracefully. When the API is down or rate limited, post an error message to Slack instead of failing silently. This keeps your team informed when the automation isn't working.
- 1Edit your formatting step
- 2Wrap the OpenAI call in try-catch
- 3Add fallback message for API errors
- 4Test with invalid API key to verify error handling
This code filters incoming Slack messages to process only email-like content and formats the AI response with proper threading. Paste this in your filter step to avoid triggering on casual chat messages.
JavaScript β Code Stepexport default defineComponent({βΈ Show code
export default defineComponent({
async run({ steps, $ }) {
const message = steps.trigger.event.text;... expand to see full code
export default defineComponent({
async run({ steps, $ }) {
const message = steps.trigger.event.text;
const user = steps.trigger.event.user;
// Filter out bot messages and short content
if (steps.trigger.event.bot_id || message.length < 100) {
$.end('Message too short or from bot');
}
// Check for email-like patterns
const emailPatterns = [
/@\w+\.\w+/, // email addresses
/from:/i, // email headers
/subject:/i, // subject lines
/dear|hi|hello/i // greetings
];
const hasEmailPattern = emailPatterns.some(pattern =>
pattern.test(message)
);
if (!hasEmailPattern) {
$.end('Does not appear to be email content');
}
// Format for OpenAI processing
const promptContext = {
original_message: message,
requested_by: user,
timestamp: steps.trigger.event.ts,
instructions: "Draft a professional, empathetic response that addresses the client's concerns directly. Keep it under 150 words and match our friendly but professional tone."
};
return promptContext;
}
});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 handles 30+ emails daily and needs sub-10-second response times. The instant webhook triggers beat Zapier's 2-minute delays, and the Node.js code steps let you build sophisticated content filters that Make's visual interface makes clunky. Skip Pipedream if you're just testing the concept - Zapier's simpler for one-off experiments.
This costs about $0.10 per email draft with GPT-4, assuming 200-word responses. At 100 emails per month, you're looking at $10 in OpenAI costs plus Pipedream's free tier covers the workflow execution. Zapier would cost $20/month for the same volume, making Pipedream 50% cheaper once you factor in the platform fees.
Make handles conditional logic better if you need complex routing rules based on email content. Zapier's ChatGPT integration requires fewer setup steps and includes prompt templates. N8N gives you more control over the OpenAI parameters and better error handling options. Power Automate integrates tighter with Outlook if that's your email client. But Pipedream's instant triggers and generous free tier make it the smart choice for real-time email processing.
You'll hit OpenAI rate limits faster than expected during busy periods - even paid accounts throttle at 60 requests per minute. The AI sometimes generates responses that are too formal or too casual despite prompt engineering. Slack's message formatting can break if someone pastes emails with unusual characters or multiple attachments, so test with real forwarded emails not clean copy-paste text.
Ideas for what to build next
- βAdd sentiment analysis β Use OpenAI to detect angry or urgent emails and alert managers immediately with high-priority responses.
- βCreate response templates β Build a library of common response patterns and have AI select the best template before customizing it.
- βTrack response metrics β Log all drafts to a spreadsheet to measure response time improvements and identify common email types for better prompts.
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