Get Gmail Unread Count
The Get Gmail Unread Count block retrieves the total number of unread messages in a connected Gmail inbox.
Retrieve unread email count from a Gmail inbox
The Get Gmail Unread Count block retrieves the total number of unread messages in a connected Gmail inbox. It connects to Gmail via a Google OAuth connection and returns a single numeric value representing the current unread message count for the inbox label. No email content, subjects, or sender information is fetched — only the count itself.
The block has two configuration fields: a connectionId that references a stored Google OAuth credential, and a destinationVar that specifies the variable name where the returned unread count will be stored for use later in the workflow. The output is a single field, unreadCount, which is a number.
This block fits into workflows that need to make decisions or trigger actions based on inbox activity — for example, checking whether new messages have arrived before running a fetch or notification step, or surfacing inbox status as part of a dashboard or reporting workflow.
What you can build
Real-world workflows powered by the Get Gmail Unread Count block.
Inbox Activity Check
Before running an email-processing workflow, use this block to confirm there are unread messages, avoiding unnecessary downstream steps when the inbox is empty.
Daily Email Summary
Include the unread count as part of a scheduled daily briefing that reports on pending inbox items alongside other productivity metrics.
Notification Trigger
Poll the unread count on a schedule and trigger an alert or notification when the count exceeds a defined threshold.
Support Queue Monitoring
Track unread messages in a support Gmail inbox to give teams a real-time view of pending customer requests without exposing email content.
Conditional Workflow Routing
Use the returned unread count in a conditional branch to route the workflow differently depending on whether new emails are present.
Dashboard Status Widget
Feed the unread count into a status dashboard that aggregates communication and task metrics from multiple connected services.
Ready to add Get Gmail Unread Count to your workflow?
Get Started FreeCommon questions about Get Gmail Unread Count
What parameters does this block require?
The block requires a connectionId, which is a Google OAuth connection ID that grants access to the Gmail account, and a destinationVar, which is the name of the variable where the unread count will be stored in the workflow.
What does this block return?
The block returns a single output field called unreadCount, which is a number representing the total unread messages in the connected Gmail inbox.
Does this block retrieve any email content?
No. The block only retrieves the numeric unread message count for the inbox label. It does not fetch email subjects, body text, sender information, or any other message content.
What kinds of workflows commonly use this block?
This block is commonly used in conditional workflows that check for inbox activity before proceeding, scheduled reporting workflows that surface inbox status, and notification workflows that alert users when unread message counts reach a certain level.
What Google OAuth scope is needed for this block to work?
The block requires a Google OAuth connection configured with Gmail readonly scope in order to retrieve the unread count.
Related capabilities
[Google] Create Google Doc
Create a new Google Document and optionally populate it with content.
[Google] Update Google Doc
Update the contents of an existing Google Document.
[Google] Fetch Google Doc
Fetch the contents of an existing Google Document.
[Google] Create Google Sheet
Create a new Google Spreadsheet and populate it with CSV data.
[Google] Update Google Sheet
Update a Google Spreadsheet with new data.
[Google] Fetch Google Sheet
Fetch contents of a Google Spreadsheet range.
Add Get Gmail Unread Count to your workflow
Build powerful AI workflows with drag-and-drop blocks. No coding required.