

How to Send Gmail Digest Summaries to Slack with Pipedream
A scheduled Pipedream workflow that queries Gmail for priority emails — by label, sender domain, or unread status — then formats and posts a digest message to a Slack channel on a daily or weekly cadence.
Steps and UI details are based on platform versions at time of writing — check each platform for the latest interface.
Best for
Engineering or ops teams who want a filtered Gmail digest posted to Slack every morning without writing a cron job from scratch
Not ideal for
Teams who need real-time email alerts per message — use a Gmail webhook trigger and Slack post for that instead
Sync type
scheduledUse case type
notificationReal-World Example
A 12-person devops team at a B2B SaaS company gets flooded with vendor emails, automated alerts, and customer escalations in a shared Gmail inbox. Before this workflow, someone had to check the inbox each morning and manually paste important threads into #ops-alerts on Slack — it took 15 minutes and got skipped on busy days. Now a Pipedream workflow runs at 8:00 AM every weekday, pulls all emails labeled 'escalation' or from *.enterprise-client.com received in the last 24 hours, and posts a formatted digest to #ops-alerts with sender, subject, and a direct Gmail link for each message.
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 | ||
| Gmail Message ID | id | |
| Thread ID | threadId | |
| Sender (From) | from | |
| Subject Line | subject | |
| Internal Date | internalDate | |
| Slack Channel | ||
| Digest Header Text | ||
| Email Count | ||
2 optional fields▸ show
| Snippet | snippet |
| Label IDs | labelIds |
Step-by-Step Setup
pipedream.com > Workflows > New Workflow
Create a new Pipedream Workflow
Go to pipedream.com and sign in. Click the blue 'New Workflow' button in the top-right corner of your dashboard. Give the workflow a name like 'Gmail Digest to Slack' in the name field at the top of the canvas. You'll land on the workflow editor with an empty trigger slot at the top and a '+' button below it for adding steps.
- 1Click 'New Workflow' in the top-right of the dashboard
- 2Type a workflow name such as 'Gmail Digest to Slack' in the name field
- 3Click 'Save' to confirm the name before proceeding
Workflow Canvas > Trigger Slot > Schedule
Set a Schedule Trigger
Click the trigger placeholder at the top of the canvas. In the search box, type 'Schedule' and select the built-in 'Schedule' source — this does not require any connected account. Set the cron expression to '0 8 * * 1-5' for 8:00 AM Monday through Friday, or '0 8 * * 1' for a Monday-only weekly digest. Pipedream shows a human-readable preview of the next 5 scheduled run times so you can confirm the timing is correct before saving.
- 1Click the trigger placeholder at the top of the canvas
- 2Type 'Schedule' in the search field and select the 'Schedule' source
- 3Click 'Custom (cron syntax)' and enter '0 8 * * 1-5' for weekday digests
- 4Check the 'Next runs' preview to confirm timing
- 5Click 'Save and continue'
Workflow Canvas > + Step > Gmail > Find Emails > Connect Account
Connect Your Gmail Account
Click the '+' button below the trigger to add a new step. Search for 'Gmail' and select it. Choose the action 'Find Emails' (also listed as 'Search Emails' depending on your Pipedream version). Click 'Connect Account' and authenticate with the Google account that owns the inbox you want to query. Pipedream uses OAuth 2.0 — you'll see a Google consent screen asking for Gmail read access.
- 1Click '+' below the Schedule trigger
- 2Search for 'Gmail' and select it from the app list
- 3Choose the 'Find Emails' action
- 4Click 'Connect Account' and select or add your Google account
- 5Accept the Gmail read permissions on the Google consent screen
Workflow Canvas > Gmail Step > Query Field
Configure the Gmail Search Query
In the 'Find Emails' step, fill in the 'Query' field using standard Gmail search operators. To capture emails from the last 24 hours with a specific label, use: 'label:escalation newer_than:1d'. For unread emails from a domain, use: 'from:@enterprise-client.com is:unread newer_than:1d'. Set the 'Max Results' field to 20 — this prevents the Slack message from becoming unreadable if there's a spike in email volume. The results will include the full email metadata for each match.
- 1Click inside the 'Query' field in the Gmail step
- 2Type your Gmail search string, e.g. 'label:escalation newer_than:1d'
- 3Set 'Max Results' to 20
- 4Click 'Test' to run the step and verify real emails are returned
Workflow Canvas > + Step > Run Node.js Code
Add a Node.js Code Step to Format the Digest
Click '+' below the Gmail step and choose 'Run Node.js code'. This step will take the array of email objects from Gmail and build a formatted Slack Block Kit message. Paste the code provided in the Pro Tip section into the code editor. The step reads from the previous Gmail step's output using the 'steps' object — specifically 'steps.gmail.$return_value' — and maps each email to a Slack block with the sender, subject, timestamp, and a direct link to the thread in Gmail.
- 1Click '+' below the Gmail Find Emails step
- 2Select 'Run Node.js code' from the step options
- 3Paste the formatting code into the code editor
- 4Click 'Test' to verify the step outputs a valid Slack blocks array
Paste this into the Node.js code step (Step 5) in the Pipedream workflow canvas. It reads the Gmail results array from the previous step, deduplicates against previously-sent message IDs stored in Pipedream's built-in $.db key-value store, builds a Block Kit message, and exports both the blocks array and the email count for the downstream Slack step.
JavaScript — Code Step// Pipedream Node.js step — Gmail Digest Formatter with Deduplication▸ Show code
// Pipedream Node.js step — Gmail Digest Formatter with Deduplication
// Reads from Gmail 'Find Emails' step and builds Slack Block Kit blocks
export default defineComponent({... expand to see full code
// Pipedream Node.js step — Gmail Digest Formatter with Deduplication
// Reads from Gmail 'Find Emails' step and builds Slack Block Kit blocks
export default defineComponent({
async run({ steps, $ }) {
const emails = steps.gmail.$return_value || [];
if (emails.length === 0) {
return { blocks: [], email_count: 0 };
}
// Load previously sent message IDs from Pipedream's key-value store
const sentIds = (await $.db.get('sent_message_ids')) || [];
// Filter out emails already included in a previous digest
const newEmails = emails.filter(email => !sentIds.includes(email.id));
if (newEmails.length === 0) {
return { blocks: [], email_count: 0 };
}
// Build the digest date header
const today = new Date().toLocaleDateString('en-US', {
weekday: 'long', month: 'short', day: 'numeric'
});
const blocks = [
{
type: 'header',
text: {
type: 'plain_text',
text: `📬 Gmail Digest — ${today} — ${newEmails.length} email${newEmails.length !== 1 ? 's' : ''}`,
emoji: true
}
},
{ type: 'divider' }
];
// Build one section block per email
for (const email of newEmails) {
// internalDate is in milliseconds — convert to seconds for Slack date tokens
const timestampSeconds = Math.floor(Number(email.internalDate) / 1000);
const gmailUrl = `https://mail.google.com/mail/u/0/#inbox/${email.threadId}`;
// Truncate subject and snippet to keep blocks compact
const subject = (email.subject || '(no subject)').slice(0, 80);
const snippet = (email.snippet || '').slice(0, 120);
const from = email.from || 'Unknown sender';
blocks.push({
type: 'section',
text: {
type: 'mrkdwn',
text: [
`*<${gmailUrl}|${subject}>*`,
`From: ${from}`,
snippet,
`<!date^${timestampSeconds}^{date_short_pretty} at {time}|Received>`
].join('\n')
}
});
blocks.push({ type: 'divider' });
}
// Slack Block Kit hard limit is 50 blocks — enforce it here
const safeBlocks = blocks.slice(0, 50);
// Persist the new message IDs so next run skips them
// Keep only the last 500 IDs to avoid unbounded growth
const updatedIds = [...sentIds, ...newEmails.map(e => e.id)].slice(-500);
await $.db.set('sent_message_ids', updatedIds);
return {
blocks: safeBlocks,
email_count: newEmails.length
};
}
});Workflow Canvas > + Step > Flow Control > Filter
Add a Condition to Skip Empty Digests
Click '+' below the code step and choose 'Filter' (listed under 'Flow Control'). Set the condition to check if the email array length is greater than 0. Reference the Gmail step output: use '{{steps.gmail.$return_value.length}}' and set the condition to 'greater than' '0'. This prevents Pipedream from posting an empty 'No new emails' message to Slack on quiet days — which quickly becomes noise that trains your team to ignore the channel.
- 1Click '+' below the Node.js code step
- 2Select 'Flow Control' then 'Filter'
- 3Set the left value to '{{steps.gmail.$return_value.length}}'
- 4Set the condition to 'greater than' and the right value to '0'
- 5Click 'Test' with a scenario that has emails to confirm it passes
Workflow Canvas > + Step > Slack > Send Message (Block Kit) > Connect Account
Connect Your Slack Workspace
Click '+' below the Filter step and search for 'Slack'. Select the 'Send Message (Block Kit)' action — not the basic 'Send Message', which only accepts plain text. Click 'Connect Account' and authorize Pipedream to your Slack workspace. You'll be redirected to Slack's OAuth screen where you select the workspace and approve the bot permissions. Pipedream creates a Slack bot named 'Pipedream' that will post the digest.
- 1Click '+' below the Filter step
- 2Search 'Slack' and select it
- 3Choose 'Send Message (Block Kit)'
- 4Click 'Connect Account' and select your Slack workspace
- 5Click 'Allow' on the Slack permissions screen
Workflow Canvas > Slack Step > Channel + Blocks Fields
Configure the Slack Message
In the Slack step, set the 'Channel' field to your target channel name or ID — use the format '#ops-alerts' or paste the channel ID (starts with 'C'). In the 'Blocks' field, reference the formatted blocks from your Node.js step: type '{{steps.nodejs.$return_value.blocks}}'. Set the 'Text' field (used as a fallback for notifications) to something like 'Daily Gmail Digest — {{steps.nodejs.$return_value.email_count}} emails'. This fallback text appears in Slack push notifications and in channels that don't render Block Kit.
- 1Type your channel name in the 'Channel' field, e.g. '#ops-alerts'
- 2Click the 'Blocks' field and enter '{{steps.nodejs.$return_value.blocks}}'
- 3Set the 'Text' field to 'Daily Gmail Digest — {{steps.nodejs.$return_value.email_count}} emails'
- 4Click 'Test' to send a real message to the channel
Workflow Canvas > Step Menu (···) > Add Error Handler
Add Error Handling with a Notification Step
Click the three-dot menu on any step and select 'Add error handler'. Alternatively, add a final Slack step at the workflow level that fires only on failure. Configure it to post to a separate channel like '#automation-alerts' with the error message and workflow name. Without this, a failed Gmail API call — common when tokens expire — will silently stop the digest with no indication to your team.
- 1Click the three-dot '···' menu on the Gmail step
- 2Select 'Add error handler'
- 3Add a Slack step inside the error handler
- 4Set it to post to '#automation-alerts' with message 'Gmail Digest failed: {{error.message}}'
- 5Click 'Deploy' to save the error handler
Workflow Canvas > Deploy > Workflow Overview > Run Now
Deploy and Verify the First Run
Click the blue 'Deploy' button in the top-right of the workflow canvas. Pipedream activates the schedule and the workflow is now live. To verify without waiting for the cron time, click 'Run Now' from the workflow overview page — this triggers an immediate execution. Check your Slack channel for the digest message and review the execution log in Pipedream's 'Logs' tab to confirm each step returned a 200 status.
- 1Click 'Deploy' in the top-right corner of the workflow canvas
- 2Navigate to the workflow overview page
- 3Click 'Run Now' to trigger an immediate test execution
- 4Open the Slack channel to confirm the digest appears
- 5Click 'Logs' in Pipedream to review the step-by-step execution results
Scaling Beyond More than 20 emails per digest period+ Records
If your volume exceeds More than 20 emails per digest period records, apply these adjustments.
Cap Results at the Gmail Step
Set 'Max Results' to 20 in the Gmail Find Emails step. Gmail will return the 20 most recent matching emails. If you need more, split into multiple queries by label and post separate digest sections.
Respect Slack's 50-Block Limit
Slack's Block Kit API rejects messages with more than 50 blocks. Each email uses 2 blocks (a section and a divider). The Node.js code in the Pro Tip section hard-caps the array at 50 blocks before sending. Never remove this cap.
Use Gmail's 'Max Results' + Multiple Queries Instead of One Large Fetch
If you need to surface 50+ emails, run three separate Gmail steps with different label queries rather than one query returning 50 results. This keeps each block of emails organized and avoids hitting Block Kit limits in a single Slack message.
Monitor Pipedream Credit Usage on High-Volume Days
Each workflow run costs roughly 30 credits on the free tier. If email volume spikes and you add retry logic or additional steps, a single run can reach 50+ credits. Set a Pipedream billing alert at 80% of your monthly credit limit to avoid unexpected pauses.
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 at least one person comfortable reading Node.js, you want deduplication logic without spinning up a database, or you need the digest to run within a predictable 5-second window every morning. Pipedream's built-in $.db key-value store is genuinely useful here — it eliminates the need for a Google Sheet or Redis instance just to track which message IDs you've already sent. The one scenario where you'd pick something else: if your team is entirely non-technical and needs to edit the Gmail query or Slack channel without touching code. For that, use Zapier — the Gmail and Slack steps have a point-and-click query builder that a non-developer can adjust in 2 minutes.
Pipedream's free tier gives you 10,000 credits per month. This workflow costs roughly 25-35 credits per run depending on how many Gmail results are processed. A daily weekday digest (22 runs/month) costs about 660-770 credits — well inside the free tier. If you add a second Gmail query step for a second label category, double that to ~1,400 credits/month, still free. Make's free tier allows 1,000 operations/month, which this workflow would exhaust in about 3 weeks if you count each API call as an operation. Pipedream is the cheaper option here by roughly $0/month vs. Make's $9/month Growth plan if you exceed Make's free limit.
Zapier has a 'Digest by Zapier' native action specifically built for this use case — it batches items throughout the day and sends them as one message at a scheduled time. That's a meaningful advantage: no code, no array handling, no Block Kit JSON. But Zapier Digest requires a paid plan ($19.99/month minimum) and gives you less control over formatting. Make handles the batch-to-message logic with an aggregator module that's visual but requires understanding Make's data bundle model — not simpler than Pipedream's array map. n8n has a Schedule trigger and a Code node with the same Node.js capabilities as Pipedream, but you'd need to self-host or pay for n8n Cloud to run it reliably. Power Automate has a 'Recurrence' trigger and can query Gmail via a connector, but the Gmail connector in Power Automate is limited — it doesn't support full Gmail search operator syntax, so label-based filtering requires workarounds. Pipedream wins here specifically because the Gmail API component supports raw query strings and the Node.js step handles the formatting without any third-party add-ons.
Three things you'll run into after the first week: First, Google OAuth tokens expire silently. There's no Pipedream alert when this happens — the workflow just stops posting and your team notices when there's no digest on Monday. Set up the error handler from Step 9 on day one. Second, Gmail's 'newer_than:1d' is evaluated at execution time in UTC, not at midnight, so if your cron fires at 8:05 AM due to a brief Pipedream queue delay, emails from exactly 24 hours ago may fall outside the window. This usually means losing 0-2 emails per week — acceptable for most teams, but if precision matters, compute the 'after:' timestamp in Node.js using 'new Date(Date.now() - 86400000)' and format it as 'YYYY/MM/DD'. Third, if the Gmail account is a Google Workspace account and your Workspace admin runs a quarterly app audit, they may revoke Pipedream's OAuth access without warning. The fix is a 30-second reconnect in Connected Accounts, but it will break your digest until someone notices.
Ideas for what to build next
- →Add a Second Gmail Query for a Different Label — Duplicate the Gmail and Node.js steps to add a second query — for example, one block for 'escalation' emails and a separate block for 'billing' emails — so the digest is organized by category rather than a flat chronological list.
- →Route Digests to Different Slack Channels by Label — Add a conditional branch after the Node.js step: if the emails include a 'finance' label, post to #finance; if they include 'escalation', post to #ops-alerts. Pipedream's Filter step handles this without code.
- →Store Digest History in Google Sheets — Add a Google Sheets step at the end of the workflow to log each digest run — date, email count, senders — so you have a searchable record of what was surfaced each day without opening Slack history.
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