Supercharge Your Gmail: Automate Labels, Digests & Auto-Replies with n8n
This page may contain affiliate links.
\n\n
Ah, the inbox. For many of us running a side hustle or juggling multiple projects, it’s a constant battleground. Client enquiries, project updates, newsletters, invoices – it piles up, fast. Before you know it, you’re spending precious hours just managing your email, rather than actually doing the work that brings in the quid. But what if you could have a tireless assistant sorting, summarising, and even replying to emails for you?
\n\n
Enter n8n, the powerful open-source workflow automation tool that’s a game-changer for anyone looking to reclaim their time. Think of it as your digital personal assistant, capable of connecting hundreds of apps and services to automate repetitive tasks. And today, we’re going to focus on one of the biggest time sinks: Gmail. We'll dive into how n8n can transform your inbox with smart labelling, timely digests, and clever auto-replies, all tailored for a UK audience looking to maximise efficiency.
\n\n
Getting Started with n8n and Gmail
\n\n
Before we build our email superpowers, you'll need a working n8n instance. You can run n8n in a few ways:
\n
- \n
- n8n Cloud: The easiest way to get started, with a managed service (paid tiers available after a free trial).
- \n
- Self-hosted: If you're a bit more tech-savvy, you can host n8n on your own server (e.g., a DigitalOcean droplet, AWS EC2, or even a Raspberry Pi) using Docker. This gives you maximum control and keeps your data local.
- \n
\n\n
Once your n8n instance is up and running, the first step is to connect it to your Gmail account. This involves setting up Gmail API credentials, which might sound intimidating but is fairly straightforward:
\n\n
- \n
- Go to Google Cloud Console: Navigate to console.cloud.google.com.
- \n
- Create a New Project: If you don't have one, create a new project (e.g., "n8n Gmail Automation").
- \n
- Enable Gmail API: In your project, search for "Gmail API" in the search bar and enable it.
- \n
- Create Credentials: Go to "APIs & Services" > "Credentials". Click "Create Credentials" > "OAuth client ID".
- \n
- Configure Consent Screen: You'll need to configure your OAuth consent screen first. Select "External" for User Type and fill in the required fields (App name, support email, developer contact email). You may need to add "Gmail API" as a scope.
- \n
- Choose Application Type: Select "Desktop app" (or "Web application" if you prefer, but Desktop is often simpler for n8n authentication).
- \n
- Copy Credentials: You'll get a Client ID and Client Secret. Copy these.
- \n
- Add Gmail Credential in n8n: In your n8n workflow editor, click "Credentials" in the sidebar, then "New Credential". Search for "Google" and select "Google OAuth2 API".
- \n
- Paste & Authenticate: Paste your Client ID and Client Secret. When prompted, authorise n8n to access your Gmail account. Make sure to grant all necessary permissions.
- \n
\n\n
Once authenticated, you're ready to build!
\n\n
Taming the Inbox Beast: Smart Labelling
\n\n
The first step to an organised inbox is often good labelling. Instead of manually dragging emails into folders, let n8n do the heavy lifting. Imagine automatically flagging all invoices from your suppliers or moving client communications into a dedicated "Client Projects" label.
\n\n
Here’s a practical workflow:
\n\n
- \n
- \nGmail Trigger Node: Start your workflow with a "Gmail Trigger" node. Set the "Events" to "New Email". This will run the workflow every time a new email lands in your inbox.\n
- \n
- \nIf Node (Conditional Logic): Drag an "If" node onto the canvas. This is where you define your rules. For example, to label invoices:\n\nOr, to catch emails with specific subjects:\n\n
- \n
- Set "Value 1" to
{{ $json.from.emailAddress }} - \n
- Set "Operation" to "Contains"
- \n
- Set "Value 2" to
invoice-sender@example.co.uk(or add multiple conditions with OR logic for different senders). - \n
- \n
- Set "Value 1" to
{{ $json.subject }} - \n
- Set "Operation" to "Contains"
- \n
- Set "Value 2" to
InvoiceorReceipt(you can add multiple conditions here too). - \n
- \n
- \nGmail Node (Update Email): Connect the "True" branch of your If node to a "Gmail" node. Set its "Operation" to "Update Email".\n\n
- \n
- For "Message ID", select
{{ $json.id }}from the previous Gmail Trigger. - \n
- For "Add Labels", type the exact name of the label you want to add (e.g.,
Invoices/Pending). Make sure this label already exists in your Gmail account. - \n
- You can also set "Mark as Read" to
Trueif you want these sorted emails to appear as read. - \n
- \n
- \nSave & Activate: Save your workflow and activate it. Now, every new email matching your criteria will be automatically labelled!\n
- \n
\n\n
Never Miss a Beat: Daily/Weekly Digests
\n\n
Instead of constantly checking your inbox for crucial updates, why not get a neatly summarised digest sent to you at a specific time? This is perfect for daily sales reports, project updates, or even aggregating emails from specific clients.
\n\n
Here’s how to build one:
\n\n
- \n
- \nSchedule Trigger Node: Start with a "Schedule Trigger" node. Set it to run daily or weekly, at a time convenient for you (e.g.,
9 AMevery weekday).\n - \n
- \nGmail Node (Get All Emails): Connect this to a "Gmail" node. Set "Operation" to "Get All Emails".\n\n
- \n
- You'll want to filter these emails. Use "Query" with Gmail's search operators, e.g.,
is:unread label:Urgent after:{{ $now.minus({ hours: 24 }).toISO() }}to get all unread emails with the 'Urgent' label from the last 24 hours. - \n
- Set "Limit" to a reasonable number (e.g.,
50) to avoid overwhelming your digest. - \n
- \n
- \nItem Lists Node (Summarise): This is where we create our digest. Connect the Gmail node to an "Item Lists" node.\n\n
- \n
- Set "Input Data Type" to "JSON".
- \n
- For "Output Field Name", enter something like
digestContent. - \n
- In "Format String", you can craft the layout for each email. For example:
- **{{ $json.subject }}** from {{ $json.from.name }} ({{ $json.from.emailAddress }})\n *Received: {{ new Date($json.internalDate).toLocaleString('en-GB', { dateStyle: 'short', timeStyle: 'short' }) }}*\n {{ $json.snippet.substring(0, 150) }}...View Email\n - \n
- \n
- \nEmail Sender Node (e.g., Gmail, SendGrid): Connect the "Item Lists" node to another "Gmail" node (or a SendGrid node if you prefer a dedicated email service). Set "Operation" to "Send Email".\n\n
- \n
- "To": Your email address.
- \n
- "Subject":
Daily Side Hustle Digest - {{ $now.toFormat('yyyy-MM-dd') }} - \n
- "HTML Body":
<h2>Your Daily Side Hustle Digest</h2><p>Here's what you missed:</p>{{ $json.digestContent.join('<br><hr><br>') }}<p>Stay productive!</p> - \n
- \n
\n\n
Building these workflows from scratch can be a learning curve, but the investment pays off. If you’re looking for a genuine shortcut, you might find our n8n Starter Workflows incredibly useful. These are plug-and-play n8n workflow templates you can import in minutes (from £9), giving you a done-for-you version of many common automations, including some sophisticated Gmail management ones, without having to build them step-by-step.
\n\n
Automated Replies: Your Time-Saving Assistant
\n\n
Dealing with repetitive enquiries or needing to send a quick acknowledgement? Automated replies are a fantastic way to maintain responsiveness without constant manual effort. This is particularly useful for FAQs, out-of-office scenarios, or even basic lead qualification for your side hustle.
\n\n
Let's create a workflow for auto-replying to specific enquiries:
\n\n
- \n
- \nGmail Trigger Node: Again, start with a "Gmail Trigger" node, listening for "New Email" events.\n
- \n
- \nIf Node (Filter for Specific Enquiries): Connect an "If" node to filter emails. For example, you might want to auto-reply only to emails containing "enquiry" in the subject line AND sent to a specific email alias (like
info@yourdomain.co.uk).\n\n- \n
- Condition 1:
{{ $json.subject }}Containsenquiry - \n
- Condition 2:
{{ $json.to[0].emailAddress }}Equalsinfo@yourdomain.co.uk - \n
- Use an "AND" combination for both conditions to be true.
- \n
- \n
- \n
- "Message ID":
{{ $json.id }}(from the initial trigger) - \n
- "To":
{{ $json.from.emailAddress }}(reply to the sender) - \n
- "Subject":
Re: {{ $json.subject }}(auto-include original subject) - \n
- "HTML Body": This is your auto-reply message. Keep it polite and informative.
- \n
- \n
- \nImportant: Prevent Reply Loops! To avoid endlessly replying to the same email or creating a bot conversation, add a "Gmail" node after your reply, set to "Update Email".\n\nThen, modify your initial "If" node to include an extra condition:
{{ $json.labelIds }}Does Not Contain (the ID for your 'Auto-Replied' label). This ensures the workflow only processes emails that haven't already received an auto-reply.\n- \n
- "Message ID":
{{ $json.id }} - \n
- "Add Labels":
Auto-Replied(create this label in Gmail first) - \n
- "Mark as Read":
True - \n
- \n
\nGmail Node (Reply to Email): Connect the "True" branch of the If node to a "Gmail" node. Set "Operation" to "Reply to Email".\n\n
<p>Dear {{ $json.from.name || 'valued customer' }},</p>\n<p>Thank you for your enquiry. We've received your email and will get back to you within 1-2 working days.</p>\n<p>In the meantime, you might find answers to common questions on our FAQ page: <a href='https://sheddad.tech/faq'>https://sheddad.tech/faq</a>.</p>\n<p>Best regards,<br>The Sheddad Team</p>\n
\n\n
Conclusion: Reclaim Your Time with n8n
\n\n
Gmail automation with n8n isn’t just about being tech-savvy; it’s about strategic time management. By offloading repetitive email tasks, you free up mental space and precious hours to focus on growing your side hustle, developing new skills, or simply enjoying a well-deserved cuppa. Whether it's meticulously labelling invoices, getting a distilled digest of urgent emails, or ensuring every enquiry gets an immediate, professional response, n8n empowers you to take control of your inbox.
\n\n
Start small, experiment with these workflows, and soon you’ll wonder how you ever managed without your n8n-powered Gmail assistant. The possibilities are vast, and the productivity gains are real. So, dive in, build your first automation, and say goodbye to email overwhelm – for good!
How Freelancers Use AI to Win Back a Working Day Every Week
Discover how UK freelancers are using AI tools to automate admin, speed up client communication, and reclaim a full day of focused work every single week.
ChatGPT Prompts for CVs, Cover Letters and Job Applications
Stuck on your CV or cover letter? These UK-tested ChatGPT prompts will help you tailor applications, beat the ATS, and land more interviews.
AI Prompts for Meeting Notes, Minutes and Action Points
Stop drowning in meeting admin. Here are the exact AI prompts that turn messy transcripts into clean minutes and action points — tested for UK teams and side hustlers.