Upload attachments to Drive
Configured with Function, Gmail, Gmail Trigger, Google Drive, and additional nodes. Review the connections and setup before adapting this template.
Node categories in this workflow
- Files / media
- Routing
- Trigger
- Messaging
- Code
- Transform
- Data store
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| Search For Folder | Files / media | Google Drive | fileFolder |
| Create Month Folder | Files / media | Google Drive | folder |
| Check If Folder Exists | Routing | If | See node parameters |
| Gmail Trigger | Trigger | Gmail Trigger | See node parameters |
| Gmail | Messaging | Gmail | get |
| Split Up Binary Data1 | Code | Function | See node parameters |
| YYYY/MM | Transform | Edit Fields | See node parameters |
| Loop Over Items | Routing | Loop Over Items | See node parameters |
| Company Folder Exists | Routing | If | See node parameters |
| Create Company Folder | Files / media | Google Drive | folder |
| Lookup in Sheets | Data store | Google Sheets | See node parameters |
| Search Company Folder1 | Files / media | Google Drive | fileFolder |
| Upload To Folder | Files / media | Google Drive | See node parameters |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
gmailOAuth2googleDriveOAuth2ApigoogleSheetsOAuth2Api
Workflow notes
Upload attachments to Drive
Upload attachments to Drive
Incoming files are split up into individual items, each with a single binary data object under the data key.
Files names are prefixed with the current timestamp
2. Google Sheets Whitelist Config
2. Google Sheets Whitelist Config
To filter contacts against a whitelist:
1. Make a copy of this spreadsheet
OR create a Google Sheet with two columns: | email | company |
2. Add whitelisted emails and their company as rows in the sheet and configure this node Document and Sheet to point to it.
1. Trigger Settings and Filters
1. Trigger Settings and Filters
Configure the interval to check for new emails and apply filters to process only some emails
For example: To create a filter that applies a label to emails with attachments containing the words "invoice" or "receipt," follow these steps:
- Open your Gmail and click on the burger menu button next to the search bar to open the search options.
- In the
Has the wordsfield type in 'invoice receipt' - Check the
Has attachmentcheckbox - Click on the "Create filter with this search" option at the bottom of the search window.
- In the filter options, select the "Apply the label" option and choose or create a label for these emails.
- Click "Create filter" to save your new filter.
Upload attachments to Drive
Upload attachments to Drive
Purpose and structure
This folder contains the Upload attachments to Drive workflow. Its executable nodes use function, gmail, gmailTrigger, googleDrive, googleSheets, if, set, splitInBatches. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
Gmail Trigger
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Googlesheets/0837_GoogleSheets_Gmail_Create_Triggered.json MIT; preserve source notices.
Canvas section labels
These name areas of the original canvas; they do not include explanatory instructions.
- Checks if YYYY/MM Folder exists
- Checks if a folder with the company of the email exists
- 3. Configure storage location