Get Started
Screenshot of n8n workflow
FREE TEMPLATE
Automate Gmail Invoice Filing to Google Drive
2
Views
0
Downloads
13
Nodes
Download Template
Free
Preview Template
Utility Rating
7 / 10
Business Function
Finance
Automation Orchestrator
n8n
Integrations
pdflayer
Google Drive
Gmail
Trigger Type
On app event
Approx setup time ≈ 45 min
Need help setting up this template?
Ask in our free Futurise community
About
Community
Courses
Events
Members
Templates

How to Automate Gmail Invoice Filing to Google Drive?

Leon Petrou
FREE TEMPLATE
Automate Gmail Invoice Filing to Google Drive
2
Views
0
Downloads
13
Nodes
Download Template
Free
Preview Template
Utility Rating
7 / 10
Business Function
Finance
Automation Orchestrator
n8n
Integrations
pdflayer
Google Drive
Gmail
Trigger Type
On app event
Approximate setup time ≈ 45 minutes
Need help setting up this template?
Ask in our free Futurise community

Description

Turn invoice emails into dated PDFs and file them in the right Google Drive folder without touching a mouse. Built for teams that get billing emails with a link to view the invoice online, this setup keeps finance records tidy and easy to find.

A Gmail trigger checks your inbox every minute. A rule keeps only messages that match your sender or subject. The HTML step pulls all links in the email and a split step looks at each link. A filter keeps the invoice link only. A web call sends that link to a PDF service to create a clean PDF. The file is then uploaded to Google Drive, renamed with today’s date, and moved into your chosen folder. Messages that do not match are ignored.

You will need Gmail and Google Drive connected in n8n Cloud and an API key for a PDF conversion service. Paste your API key and your Drive folder URL in the setup node. Adjust the match rules to your vendor’s sender or subject. Expect to cut monthly filing from an hour to a few minutes and reduce naming mistakes. This is great for subscription receipts, SaaS invoices, and vendor bills sent as links.

Copy link

Tools Required

pdflayer
Sign up
Free: $0 / mo, 100 API requests / mo (rate limit 2 requests/minute)
n8n
Sign up
$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.
Google Drive
Sign up
Drive API: $0 (no additional cost; quota-limited)
Gmail
Sign up
No cost: Personal Gmail (Gmail API has no usage-based pricing; quotas apply)

What this workflow does?

  • Gmail trigger watches for new messages every minute
  • Conditional check keeps only invoice emails based on sender or subject
  • HTML parser extracts all links from the email body
  • Split step processes each link on its own to find the correct target
  • Filter keeps only the link that matches your invoice pattern
  • HTTP request converts the invoice web page to PDF using your API key
  • Google Drive upload stores the PDF as a new file
  • Rename gives the file a clear date based name and Move places it in the right folder
  • Non matching emails go to a no action path to avoid noise

What are the benefits?

  • Reduce manual filing time from 60 minutes to 5 minutes each month
  • Automate 90 percent of steps from email link to Drive storage
  • Cut file naming errors by 95 percent with date based names
  • Connect Gmail, pdflayer and Google Drive in one flow
  • Handle dozens of invoices per day without extra effort
  • Keep invoices in one folder for fast audit checks

How to set this up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Gmail, Google Drive and pdflayer. See the Tools Required section above for links to create accounts with these services.
  3. Create a pdflayer account and generate an API key on the API page. Keep this key ready.
  4. In n8n Cloud, open the Gmail Trigger node. In the Credential to connect with menu, click Create new credential and follow the on screen steps to connect Gmail.
  5. Open any Google Drive node. In the Credential to connect with menu, click Create new credential and follow the on screen steps to connect Google Drive.
  6. Open the Setup node and paste your pdflayer API key in the api_key field. In url_to_drive_folder, paste your Google Drive folder URL and remove everything after the question mark.
  7. Open the If node that filters invoice emails. Adjust the sender or subject rules to match your vendor. Use clear text that uniquely identifies these invoices.
  8. Check the HTML extract node. Confirm it collects a tags and outputs a field named link. The next Split Out node should point to this link field.
  9. Run a test by sending yourself a sample invoice email that contains a web link to the invoice page. Wait up to one minute for the trigger to poll.
  10. Open Executions in n8n and review the run. Confirm the PDF conversion step returns binary data and the Google Drive upload creates a file.
  11. Verify the Rename step applied the date based name and the Move step placed the file in your chosen folder.
  12. If no file appears, relax the email filter rules or confirm the sender address. If the PDF step fails, check your pdflayer key and that the invoice link is publicly reachable. If upload fails, reauth Google Drive.
  13. Activate the workflow in n8n. Monitor the first week and fine tune the filter so only real invoice emails are processed.

Need help or want to customize this?

Similar Templates

n8n
Finance
Automate Month-End Receipt and Invoice Pull from Gmail to Drive
Speed up monthly bookkeeping by pulling PDF receipts and invoices from Gmail and filing them in Google Drive. You choose a date range and an optional email step, and the system sorts and stores the right files for finance work. A secure webhook starts the run with a start date, end date, and a send email flag. A dated folder is created in Google Drive and the webhook responds right away with the folder link so you can track results. Emails with attachments are fetched from Gmail. Each attachment is checked for PDF, the text is read, and a size check prevents sending very long text to the AI. OpenAI then confirms if a file matches your target phrase, like receipt or invoice, set in the Configure node. Matched PDFs are uploaded to the Drive folder. If the flag is on, the matched files are bundled and sent in one Gmail message to your chosen address. Set up needs Gmail, Google Drive, and OpenAI credentials in n8n. Adjust Match on, maxTokenSize, replyTokenSize, and your recipient email. Expect faster month end close, fewer filing mistakes, and easier audits. Ideal for finance teams, bookkeepers, and solo founders who get many vendor receipts.
15 views
view
n8n
Finance
Automate Gmail to Sheets Expense Tracking
Keep your spend records up to date without typing. The flow reads invoice and payment emails from Gmail and writes clean expense rows to Google Sheets. Finance teams and small business owners get fast visibility into daily costs and monthly bills. Two Gmail triggers watch labeled inbox folders every minute. Emails get parsed in two ways. PDF invoices are opened and read, while payment alerts in HTML are scanned for each spend line. A Switch node routes emails with one charge, many charges, or invoices. The HTML path can split multiple line items using a CSS selector, then a Merge node brings email context back. AI models (Google Gemini and Groq) extract date, amount, service, currency, category, and card into a fixed schema. Parsed results append straight to Google Sheets. You will need Gmail labels and filters, a Google Sheet with matching columns, and API keys for Google Gemini and Groq. Expect big time savings on reconciliation and more accurate records. Great for card spend alerts, vendor invoices, and receipt emails that show many charges in one message.
13 views
view
n8n
Finance
Automate Gmail Invoice Alerts to Slack
Keep your finance team on top of new invoices without digging through email. The flow watches your inbox, finds invoice messages, reads the attached file to get the total, and alerts the team when the amount is high. It also emails the finance manager with the original invoice for quick approval. Here is how it works step by step. The IMAP email node checks the Gmail Inbox and looks for the word invoice in the email body. If it matches, the file attachment is sent to Mindee to extract the total amount. A simple rule checks if the total is over 1000. When the amount is high, the workflow sends an SMTP email to the finance manager with the original attachment and posts a Slack message to a chosen channel with the amount and sender details. The Slack post helps the team act fast while the manager gets the full file. Setup is simple. You need access to Gmail via IMAP, a Mindee API key, a Slack token, and an SMTP account such as Mailtrap. Change the amount limit in the If node to match your policy. Expect faster approvals, fewer missed invoices, and less manual sorting. This fits small and mid sized finance teams, agencies, and any group that needs quick invoice checks with a clear handoff.
11 views
view
See More Templates

These templates were sourced from publicly available materials across the web, including n8n’s official website, YouTube and public GitHub repositories. We have consolidated and categorized them for easy search and filtering, and supplemented them with links to integrations, step-by-step setup instructions, and personalized support in the Futurise community. Content in this library is provided for education, evaluation and internal use. Users are responsible for checking and complying with the license terms with the author of the templates before commercial use or redistribution.Where an original author was identified, attribution has been provided. Some templates did not include author information. If you know who created this template, please let us know so we can add the appropriate credit and reference link. If you are the author and would like this template removed from the library, email us at info@futurise.com and we will remove it promptly.