Connect your Gmail account to n8n and automate sending emails, responding to messages and backing up attachments — without writing a line of code. This guide walks UK businesses through Gmail OAuth2 setup, building common workflows and the pragmatic patterns that save hours per week.
What the Gmail integration is for • Connecting Gmail to n8n step by step • Building a form-to-email workflow • Example automations • UK-specific Gmail patterns • Troubleshooting • FAQ
Gmail is one of the most popular nodes in n8n — and with good reason. Email remains the dominant channel for UK business communication, and being able to automatically send, read and organise messages opens up substantial time savings.
n8n’s Gmail integration lets you automatically send emails in response to events in other systems: a new order in the shop, a new CRM entry, a new row in Google Sheets, a completed contact form.
n8n can also react to incoming messages. The Gmail Trigger fires a workflow whenever an email arrives that matches specific criteria — from a particular sender, with a keyword in the subject, or carrying a specific label. This enables automatic handling patterns: a customer writes “INVOICE” in the subject line, n8n automatically looks up the document and replies with the PDF attached.
Tip: n8n on SmartXHosting runs in a pre-configured Docker container on UK infrastructure, with SSL ready out of the box — Gmail OAuth2 redirects work without extra SSL configuration.
Another use is filtering and archiving. n8n can periodically browse your inbox, extract important data from emails (order numbers, GBP amounts, customer names) and save it to sheets or databases — turning a chaotic inbox into structured data ready for analysis.
Connecting n8n to Gmail requires OAuth2 setup through Google Cloud Console. It’s a one-off process that takes about 10–15 minutes.
https://yourinstance.n8n.smartxhosting.uk/rest/oauth2-credential/callback).One of the most commonly built workflows — automatic email reply after a contact form submission.
{{ $json.email }}Thank you for getting in touch, {{ $json.name }}!{{ $json.message }} inserted where appropriateNew enquiry from {{ $json.name }}. Message: all form data.When a customer places an order in WooCommerce, n8n sends an email confirmation with order number and GBP total. Add a Wait node set to 24 hours and send a review-request email afterwards.
Gmail Trigger fires on every email with the label “INVOICES”. n8n automatically downloads PDF attachments and saves them in the right Google Drive folder — sorted by date or sender. End of manual invoice downloading.
Workflow scheduled Friday 16:00 pulls data from Google Sheets or a database, generates a weekly summary and emails it to selected recipients. Data always current, report always in the inbox.
Gmail Trigger listens for emails containing keywords (“complaint”, “problem”, “return”, “refund”). n8n parses the content, creates a ticket in your helpdesk system and replies to the customer with a ticket number and expected response time.
For sales teams: initial outreach email today, follow-up in 3 days if no reply, second follow-up in 7 days if still no reply. n8n checks for replies via Gmail Trigger and advances or exits the sequence automatically.
n8n email automation on UK infrastructure
SmartXHosting n8n with Gmail integration — pre-configured Docker, free SSL for OAuth2, UK data centre. Automate your inbox and save hours a week.
See n8n hosting plansQ: Can I use Gmail with Google Workspace or only personal Gmail?
A: Both work. Workspace gets higher sending quotas (2,000/day vs 500/day) and better support options.
Q: Do I need to publish my Google Cloud app?
A: Not for personal use with Test Users. Publishing is required only if you want authorisation to work for accounts outside your Test Users list.
Q: Is OAuth2 the only way to connect Gmail?
A: OAuth2 is strongly recommended. App Passwords via IMAP/SMTP exist but are less secure and less reliable.
Q: How do I send emails to multiple recipients?
A: Use the To field with comma-separated addresses, or loop through an array of recipients with the Loop Over Items node.
Q: Can I send HTML emails?
A: Yes — tick “HTML” in the node options. You can include inline images via CID references.
Q: How fast are emails sent?
A: Gmail API responds in 200–500ms typically. Bulk operations are subject to rate limits — use Split In Batches for volume.
Q: Can n8n mark emails as read/unread or move to folders?
A: Yes. The Gmail node supports operations: Label add/remove, Move to trash, Mark as read, Reply, Forward.
Q: Is Gmail UK GDPR-compliant?
A: Gmail data is processed by Google. For UK GDPR, Google Workspace offers a proper DPA. Personal Gmail is acceptable for internal use but for customer data consider a dedicated business email service like SmartXHosting’s Axigen which keeps data on UK infrastructure.