

How to Send Gmail Sales Alerts to Slack with Pipedream
Watches Gmail for high-priority prospect emails and posts a formatted Slack notification with sender details and email preview the moment each email arrives.
Steps and UI details are based on platform versions at time of writing — check each platform for the latest interface.
Best for
Sales teams of 5–30 reps who need instant Slack visibility on inbound prospect emails without building a custom integration
Not ideal for
Teams that need two-way sync or want to log emails into a CRM automatically — add a HubSpot step for that
Sync type
real-timeUse case type
notificationReal-World Example
A 12-person SaaS sales team at a B2B analytics company connects their shared sales@ Gmail inbox to a #inbound-leads Slack channel. Before this workflow, reps checked Gmail every 30–60 minutes and high-value prospects sometimes waited 3+ hours for a reply. After setup, the team gets a Slack message within 90 seconds of any email from a prospect domain, including subject, sender, and the first 300 characters of the body — enough context to decide who owns the reply without opening Gmail.
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 | ||
| Sender Display Name | ||
| Sender Email Address | ||
| Email Subject | ||
| Email Snippet | ||
| Received Timestamp | ||
3 optional fields▸ show
| Gmail Message ID | |
| Thread ID | |
| Label IDs |
Step-by-Step Setup
pipedream.com > Workflows > New Workflow
Create a new Pipedream workflow
Go to pipedream.com and sign in. Click 'Workflows' in the left sidebar, then click the blue 'New Workflow' button in the top right. You'll land on the workflow canvas with an empty trigger slot at the top. This is where you'll connect Gmail as the event source. Name the workflow something like 'Gmail → Slack: Sales Lead Alerts' using the pencil icon at the top so you can find it later.
- 1Click 'Workflows' in the left sidebar
- 2Click the blue 'New Workflow' button
- 3Click the pencil icon next to the default workflow name
- 4Type 'Gmail → Slack: Sales Lead Alerts' and press Enter
Workflow Canvas > Add a trigger > Gmail > New Email
Add Gmail as the trigger source
Click the 'Add a trigger' block. In the search bar that appears, type 'Gmail' and select it from the results. Pipedream will show you a list of available Gmail triggers. Choose 'New Email' — this fires instantly via Gmail push notifications, not polling, which is what gives you sub-2-minute delivery. Do not choose 'New Email Matching Search' yet; you'll add filtering in a later step.
- 1Click the 'Add a trigger' block on the canvas
- 2Type 'Gmail' in the search field
- 3Click 'Gmail' in the app results
- 4Select 'New Email' from the trigger list
Gmail Trigger Panel > Connect Account > Google OAuth
Connect your Gmail account
In the trigger configuration panel, click 'Connect Account' under the Gmail section. Pipedream opens a Google OAuth window. Sign in with the Gmail account that receives your prospect emails — typically your shared sales inbox or your personal sales rep account. Grant the requested permissions, which include reading emails and managing Gmail watch subscriptions. After authorization, you'll return to Pipedream and see your email address listed as a connected account.
- 1Click 'Connect Account' in the Gmail trigger panel
- 2Select your Google account in the OAuth popup
- 3Click 'Allow' to grant Gmail read permissions
- 4Confirm your email address appears in the 'Account' dropdown
Gmail Trigger Panel > Label > INBOX > Generate Test Event
Configure the Gmail trigger filter
Under the connected account, set the 'Label' field to 'INBOX' to watch only incoming emails, not sent items or drafts. Leave the 'Search Query' field blank for now — you'll handle priority filtering in a code step to keep logic centralized and easier to edit. Click 'Generate Test Event' at the bottom of the panel to pull a real email from your inbox into Pipedream so later steps have data to work with.
- 1Set the 'Label' dropdown to 'INBOX'
- 2Leave 'Search Query' blank
- 3Click 'Generate Test Event'
- 4Select a recent email from the dropdown that Pipedream fetches
Workflow Canvas > + > Run Node.js code
Add a Node.js code step to filter high-priority emails
Click the '+' button below the Gmail trigger to add a new step. Choose 'Run Node.js code' from the step type list. This step will inspect the incoming email and decide whether it qualifies as a high-priority prospect email. You'll define 'high-priority' using domain matching, subject keywords, or a combination — the code step gives you exact control without building complex Zapier filter trees. Paste the filtering code from the Pro Tip section below into the code editor.
- 1Click the '+' button below the Gmail trigger block
- 2Click 'Run Node.js code' in the step type menu
- 3Clear the default code in the editor
- 4Paste the priority filter code into the editor
Paste this into two separate Node.js code steps — the first is the priority filter (Step 5) and the second is the email parser (Step 6). The filter uses domain matching and subject keywords to decide whether to continue or exit the workflow via $.flow.exit(). The parser splits Gmail's raw 'from' header, decodes HTML entities in the snippet, and formats the timestamp — producing a clean object that the Slack step references directly.
JavaScript — Code Step// === STEP 5: Priority Filter ===▸ Show code
// === STEP 5: Priority Filter ===
// Paste this into the first Node.js code step
export default defineComponent({... expand to see full code
// === STEP 5: Priority Filter ===
// Paste this into the first Node.js code step
export default defineComponent({
async run({ steps, $ }) {
const email = steps.trigger.event;
// Define your high-priority prospect domains
const priorityDomains = [
'acmecorp.com',
'globaltrade.io',
'enterpriseco.com'
];
// Define subject keywords that indicate sales intent
const priorityKeywords = [
'pricing', 'demo', 'enterprise', 'trial', 'interested',
'evaluation', 'quote', 'proposal', 'contract'
];
const fromHeader = email.payload?.headers?.find(h => h.name === 'From')?.value || '';
const subject = email.payload?.headers?.find(h => h.name === 'Subject')?.value || '';
const labelIds = email.labelIds || [];
// Must be in INBOX (not spam, promotions, etc.)
if (!labelIds.includes('INBOX')) {
$.flow.exit('Email not in INBOX — skipping');
}
const emailMatch = fromHeader.match(/<(.+?)>/) || [null, fromHeader];
const senderEmail = emailMatch[1]?.toLowerCase() || '';
const senderDomain = senderEmail.split('@')[1] || '';
const isDomainMatch = priorityDomains.some(d => senderDomain === d);
const isKeywordMatch = priorityKeywords.some(k =>
subject.toLowerCase().includes(k)
);
if (!isDomainMatch && !isKeywordMatch) {
$.flow.exit(`Email from ${senderDomain} with subject "${subject}" did not match priority criteria`);
}
return { passed: true, senderEmail, senderDomain, subject };
}
});
// === STEP 6: Email Parser ===
// Paste this into the second Node.js code step
export default defineComponent({
async run({ steps, $ }) {
const email = steps.trigger.event;
const headers = email.payload?.headers || [];
const getHeader = (name) =>
headers.find(h => h.name.toLowerCase() === name.toLowerCase())?.value || '';
// Parse sender name and email from combined 'From' header
const fromRaw = getHeader('From');
const fromMatch = fromRaw.match(/^(.*?)<(.+?)>$/);
const senderName = fromMatch ? fromMatch[1].trim().replace(/^"|"$/g, '') : fromRaw;
const senderEmail = fromMatch ? fromMatch[2].trim() : fromRaw;
// Decode HTML entities in snippet
const rawSnippet = email.snippet || '';
const snippet = rawSnippet
.replace(/&/g, '&')
.replace(/'/g, "'")
.replace(/"/g, '"')
.replace(/</g, '<')
.replace(/>/g, '>')
.substring(0, 300);
// Format timestamp from Gmail's internalDate (milliseconds)
const receivedAt = new Date(parseInt(email.internalDate)).toLocaleString('en-US', {
month: 'short', day: 'numeric', year: 'numeric',
hour: 'numeric', minute: '2-digit', hour12: true
});
// Build Gmail deep link
const gmailLink = `https://mail.google.com/mail/u/0/#inbox/${email.id}`;
// Build Slack message
const slackMessage = [
`*New prospect email*`,
`*From:* ${senderName} (${senderEmail})`,
`*Subject:* ${getHeader('Subject')}`,
`*Received:* ${receivedAt}`,
`> ${snippet}`,
`<${gmailLink}|Open in Gmail>`
].join('\n');
return { senderName, senderEmail, snippet, receivedAt, gmailLink, slackMessage };
}
});Workflow Canvas > + > Run Node.js code
Parse and format the email data
Add another Node.js code step below the filter. This step extracts the fields you want in your Slack message: sender name, sender email, subject, timestamp, and the email snippet (first 300 characters of body text). Gmail's API returns the 'from' field as a combined string like 'Jane Smith <[email protected]>' — you need to split this into display name and email address separately for a clean Slack message. This step outputs a clean object that the Slack step will consume.
- 1Click '+' below the filter step
- 2Select 'Run Node.js code'
- 3Paste the email parsing code into the editor
- 4Click 'Test' and confirm the output shows senderName, senderEmail, subject, snippet, and receivedAt fields
Workflow Canvas > + > Slack > Send Message to a Channel
Add Slack as the destination step
Click '+' below the parsing step and search for 'Slack'. Select 'Send Message to a Channel' as the action. Connect your Slack workspace using the 'Connect Account' button — this opens Slack's OAuth flow and asks for permission to post messages. Once connected, set the channel to your sales notifications channel (e.g., #inbound-leads). You'll build the message text in the next step.
- 1Click '+' below the parsing step
- 2Search for 'Slack' and click the app
- 3Select 'Send Message to a Channel'
- 4Click 'Connect Account' and authorize with your Slack workspace
- 5Set the 'Channel' field to your sales notifications channel, e.g. #inbound-leads
Slack Step > Message Text > field references from parsing step
Build the Slack message with email details
In the Slack step's 'Message Text' field, reference the output fields from your parsing step using Pipedream's double-brace syntax. Build a message that includes sender name, sender email, subject line, time received, and the email snippet. Use Slack's mrkdwn formatting — *bold* for the subject, > blockquote for the snippet. Set 'Bot Name' to 'Sales Inbox' and optionally set 'Icon Emoji' to :email: so reps can visually scan the channel.
- 1Click into the 'Message Text' field in the Slack step
- 2Type the message template using {{steps.parse_email.$return_value.senderName}} style references
- 3Set 'Bot Name' to 'Sales Inbox'
- 4Set 'Icon Emoji' to ':email:'
- 5Click 'Test' to send a sample message to your Slack channel
Workflow Settings > Error Handling > Notification Email
Add error handling with a fallback notification
Add one more Node.js step at the end wrapped in a try/catch, or use Pipedream's built-in 'On Failure' workflow feature. Go to the workflow settings (gear icon, top right of canvas) and set an error notification email under 'Error Handling'. This catches cases where the Slack API is down or returns a rate limit error and alerts you instead of silently dropping the notification. For sales workflows, silent failures are worse than noisy ones.
- 1Click the gear icon in the top right of the workflow canvas
- 2Click 'Error Handling' in the settings panel
- 3Enter your email address in the 'Send error notifications to' field
- 4Set 'Notify after N consecutive errors' to 1 for immediate alerts
- 5Click 'Save'
Workflow Canvas > Events tab > Select latest event
Test the full workflow end-to-end
Send a real test email to your Gmail inbox from an external address that matches your priority criteria. In Pipedream, watch the workflow's 'Events' tab — you should see a new event appear within 60–90 seconds of the email arriving. Click the event to inspect each step's input and output. Confirm the Slack message posted to your channel with the correct sender, subject, and snippet. If the event doesn't appear within 3 minutes, check the Gmail trigger's 'Subscription Status' in the trigger panel.
- 1Send a test email from an external account to your connected Gmail address
- 2Click the 'Events' tab at the top of the workflow canvas
- 3Wait up to 90 seconds for the event to appear
- 4Click the event row to open the step-by-step execution log
- 5Check your Slack channel to confirm the message posted correctly
Workflow Canvas > Deploy button (top right)
Deploy and activate the workflow
Click the blue 'Deploy' button in the top right of the canvas. Pipedream will activate the Gmail push notification subscription and your workflow will start processing live emails. The workflow status changes from 'Development' to 'Active' with a green badge. From this point, every incoming Gmail message that passes your filter will trigger a Slack notification automatically — no polling, no cron jobs.
- 1Click the blue 'Deploy' button in the top right
- 2Confirm the deployment dialog if prompted
- 3Check that the workflow status badge shows 'Active' in green
- 4Send one final test email to confirm the live workflow fires correctly
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 has someone comfortable reading Node.js, even at a basic level. The Gmail push notification trigger is genuinely instant — no polling, no 5-minute delays — and the code steps let you write filtering logic that would take 15 Zapier filter steps to replicate. You also get full control over how you parse Gmail's raw headers, decode HTML entities, and format the Slack message exactly how your team wants it. The one scenario where you'd pick something else: if your entire team is non-technical and you need a point-and-click setup, Zapier's Gmail + Slack integration takes 8 minutes and requires zero code.
Pipedream's free tier gives you 10,000 events/month. Each workflow execution — regardless of whether it posts to Slack or exits early — consumes 1 credit. If your sales inbox receives 500 emails/day (15,000/month), you'll need a paid plan at $19/month, which includes 100,000 events. Zapier's equivalent workflow costs $29.99/month on the Professional plan, and that plan is required to use multi-step Zaps. Make's free tier covers 1,000 operations/month; the Core plan at $9/month gives you 10,000 — cheaper than Pipedream for the same volume, but you lose the code flexibility.
Zapier does one thing better here: its Gmail trigger has a built-in 'Search String' field that uses native Gmail search syntax (from:domain.com subject:pricing) before the Zap even fires — you burn zero tasks on non-matching emails. Make's scenario builder lets you visually branch on email fields without code, which is faster to configure for non-developers. n8n's Gmail node supports full label and header filtering in the UI and is free to self-host, making it the cheapest option at scale. Power Automate has a solid Gmail connector but its Slack integration routes through a premium connector, adding cost. Pipedream is still the right call when you need real sub-2-minute delivery, want to add a CRM step later, and have someone on the team who can maintain a few dozen lines of JavaScript.
Three things you'll hit after setup. First, Gmail's push notification subscription silently expires if your Pipedream workflow is paused for more than 7 days — you won't know until you notice emails stopped triggering notifications. Redeploy to reset it. Second, prospects who email from personal Gmail accounts (gmail.com, outlook.com) will fail your domain filter unless you explicitly add keyword matching as a fallback — most sales teams forget this edge case. Third, if your sales inbox uses Gmail's category tabs, high-intent prospect emails sometimes land in Promotions instead of Primary, meaning they never reach the INBOX label and your workflow never fires. Disable category tabs on shared sales inboxes or you'll have mysterious gaps in coverage.
Ideas for what to build next
- →Log Matched Emails to HubSpot or Salesforce — Add a CRM step after the Slack notification to create or update a contact record with the email details. This gives you a paper trail without reps having to manually log inbound emails.
- →Add a Daily Digest Variant — Build a second workflow on a daily schedule that pulls unresponded-to prospect emails from the past 24 hours and posts a summary thread to Slack — useful for emails that arrived overnight or on weekends.
- →Route Emails to Different Slack Channels by Account Tier — Extend the filter step to bucket senders by domain size or known account tier and route enterprise prospects to #enterprise-leads and SMB prospects to #smb-leads instead of a single channel.
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