Archive last month’s invoice tab with Google Sheets and Google Drive
Ready for 3.0What this workflow does
This workflow has 22 nodes and runs on a schedule (every month at 06:00). Along the way it connects Google Drive and Gmail. It also calls sheets.googleapis.com over HTTP.
How it runs
Trigger: On a schedule (every month at 06:00).
- Set config (Edit Fields (Set)): sets 6 fields: sourceSpreadsheetId, archiveParentFolderId, archiveSuffix…
- Work out last month (Code): runs custom JavaScript code
- Look for the month folder (Google Drive): work with file folder
- Folder exists? (If): checks a condition and branches into true / false
- Use that folder (Merge): merges the data from its input branches
- Create the month folder (Google Drive): work with folder
- Look for an existing archive (Google Drive): work with file folder
- Already archived? (If): checks a condition and branches into true / false
- Get every tab in the sheet (HTTP Request): calls an HTTP API
- Find last month's tab (Code): runs custom JavaScript code
…plus 10 more steps. See the full node list below.
Services it uses
HTTP calls to: sheets.googleapis.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (9)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - Google Drive
n8n-nodes-base.googleDrive - If
n8n-nodes-base.if - Merge
n8n-nodes-base.merge - No Operation, do nothing
n8n-nodes-base.noOp - HTTP Request
n8n-nodes-base.httpRequest - Gmail
n8n-nodes-base.gmail
From the author
Quick overview This workflow runs monthly to archive last month’s invoice tab from a Google Sheets workbook into a new spreadsheet created in the matching Google Drive month folder, then renames the copied tab for accounting. How it works 1. Runs on a monthly…