Intermediate~15 min setupCommunication & EmailVerified April 2026
Slack logo
Gmail logo

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-time

Use case type

notification

Real-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.

/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.

Gmail account with read access to the inbox you want to monitor — personal Gmail or Google Workspace with Pub/Sub API not restricted by admin policy
Slack account with permission to install apps in your workspace and post to the target sales channel
Pipedream account — free tier works for up to 10,000 events/month
Gmail account must have Gmail API enabled — this is on by default but may be disabled in some Google Workspace configurations
Target Slack channel already created (e.g., #inbound-leads) before configuring the workflow

Field Mapping

Map these fields between your apps.

FieldAPI 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

1

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.

  1. 1Click 'Workflows' in the left sidebar
  2. 2Click the blue 'New Workflow' button
  3. 3Click the pencil icon next to the default workflow name
  4. 4Type 'Gmail → Slack: Sales Lead Alerts' and press Enter
What you should see: You should see the workflow canvas with an empty 'Add a trigger' block at the top and your new workflow name displayed.
2

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.

  1. 1Click the 'Add a trigger' block on the canvas
  2. 2Type 'Gmail' in the search field
  3. 3Click 'Gmail' in the app results
  4. 4Select 'New Email' from the trigger list
What you should see: The Gmail trigger configuration panel opens on the right side of the screen with fields for account connection and optional filters.
Common mistake — Pipedream's Gmail trigger uses Gmail push notifications via Google Pub/Sub. This requires your Google account to have Pub/Sub API access enabled, which is on by default for personal Gmail but may be blocked in Google Workspace accounts with restrictive admin policies. Check with your Google Workspace admin if the connection step fails.
Pipedream
+
click +
search apps
Slack
SL
Slack
Add Gmail as the trigger sou…
Slack
SL
module added
3

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.

  1. 1Click 'Connect Account' in the Gmail trigger panel
  2. 2Select your Google account in the OAuth popup
  3. 3Click 'Allow' to grant Gmail read permissions
  4. 4Confirm your email address appears in the 'Account' dropdown
What you should see: Your Gmail address appears in the account selector and the trigger panel shows 'Connected' with a green indicator.
Common mistake — If you're connecting a shared sales@ inbox, you must authorize with an account that has full access to that mailbox — not just Send-as permissions. Delegated access accounts sometimes fail the Pub/Sub subscription step silently.
Pipedream settings
Connection
Choose a connection…Add
click Add
Slack
Log in to authorize
Authorize Pipedream
popup window
Connected
green checkmark
4

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.

  1. 1Set the 'Label' dropdown to 'INBOX'
  2. 2Leave 'Search Query' blank
  3. 3Click 'Generate Test Event'
  4. 4Select a recent email from the dropdown that Pipedream fetches
What you should see: You should see a JSON preview of the selected email on the right, including fields like 'from', 'subject', 'snippet', and 'labelIds'.
Common mistake — Filters are the most common place setups break. Double-check the field name and value exactly match what your app sends — a single capital letter difference will block everything.
Slack
SL
trigger
filter
Condition
matches criteria?
yes — passes through
no — skipped
Gmail
GM
notified
5

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.

  1. 1Click the '+' button below the Gmail trigger block
  2. 2Click 'Run Node.js code' in the step type menu
  3. 3Clear the default code in the editor
  4. 4Paste the priority filter code into the editor
What you should see: The code step appears on the canvas with the editor open. When you click 'Test', it should return either a pass or a $.flow.exit() call depending on whether the test email matches your criteria.
Common mistake — If you call $.flow.exit() to stop non-matching emails, Pipedream counts this as a successful execution — it still consumes 1 credit. At high inbound email volume, use the Gmail 'Search Query' filter in Step 4 to pre-filter before the workflow runs to reduce credit burn.

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(/&amp;/g, '&')
      .replace(/&#39;/g, "'")
      .replace(/&quot;/g, '"')
      .replace(/&lt;/g, '<')
      .replace(/&gt;/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 };
  }
});
6

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.

  1. 1Click '+' below the filter step
  2. 2Select 'Run Node.js code'
  3. 3Paste the email parsing code into the editor
  4. 4Click 'Test' and confirm the output shows senderName, senderEmail, subject, snippet, and receivedAt fields
What you should see: The step output panel shows a clean JSON object with senderName, senderEmail, subject, snippet, and receivedAt as separate fields — no raw Gmail header strings.
Common mistake — Gmail's 'snippet' field strips HTML but can include encoded characters like &amp; or &#39;. Decode these in this step before passing to Slack or your message will display raw HTML entities.
7

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.

  1. 1Click '+' below the parsing step
  2. 2Search for 'Slack' and click the app
  3. 3Select 'Send Message to a Channel'
  4. 4Click 'Connect Account' and authorize with your Slack workspace
  5. 5Set the 'Channel' field to your sales notifications channel, e.g. #inbound-leads
What you should see: Your Slack workspace name appears in the account field and your channel list is populated in the 'Channel' dropdown.
Common mistake — Pipedream's Slack integration posts as the 'Pipedream' bot by default. If your Slack workspace has restrictions on third-party bots, your admin will need to approve the Pipedream app before messages will send.
8

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.

  1. 1Click into the 'Message Text' field in the Slack step
  2. 2Type the message template using {{steps.parse_email.$return_value.senderName}} style references
  3. 3Set 'Bot Name' to 'Sales Inbox'
  4. 4Set 'Icon Emoji' to ':email:'
  5. 5Click 'Test' to send a sample message to your Slack channel
What you should see: A Slack message appears in your #inbound-leads channel within a few seconds showing the sender, subject, and email preview formatted cleanly.
Common mistake — Slack messages over 4,000 characters will be truncated silently. Keep your snippet field capped at 300 characters in the parsing step — do not pull the full email body here.
9

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.

  1. 1Click the gear icon in the top right of the workflow canvas
  2. 2Click 'Error Handling' in the settings panel
  3. 3Enter your email address in the 'Send error notifications to' field
  4. 4Set 'Notify after N consecutive errors' to 1 for immediate alerts
  5. 5Click 'Save'
What you should see: The workflow settings show your email address saved under error notifications. If a step fails, Pipedream will email you with the step name, error message, and a link to the failed event.
10

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.

  1. 1Send a test email from an external account to your connected Gmail address
  2. 2Click the 'Events' tab at the top of the workflow canvas
  3. 3Wait up to 90 seconds for the event to appear
  4. 4Click the event row to open the step-by-step execution log
  5. 5Check your Slack channel to confirm the message posted correctly
What you should see: The Events tab shows a green checkmark next to each step. Your Slack channel shows the formatted notification with sender name, email, subject, and preview text.
Pipedream
▶ Deploy & test
executed
Slack
Gmail
Gmail
🔔 notification
received
11

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.

  1. 1Click the blue 'Deploy' button in the top right
  2. 2Confirm the deployment dialog if prompted
  3. 3Check that the workflow status badge shows 'Active' in green
  4. 4Send one final test email to confirm the live workflow fires correctly
What you should see: The workflow header shows an 'Active' green badge. Within 90 seconds of your final test email arriving, a Slack notification appears in your sales channel.
Common mistake — Gmail push notification subscriptions expire after 7 days if not renewed. Pipedream renews them automatically, but if your workflow is paused for more than 7 days and then reactivated, you may miss emails for up to 10 minutes while the subscription re-registers. Send a test email after any reactivation.

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 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.

Cost

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.

Tradeoffs

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 SalesforceAdd 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 VariantBuild 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 TierExtend 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

Was this guide helpful?
Slack + Gmail overviewPipedream profile →