Automate Bulk File Uploads to Google Drive with n8n

This n8n workflow automates uploading multiple files to a specified Google Drive folder. It checks if the folder exists and creates it if not, saving you hours of manual organization and upload time.
formTrigger
googleDrive
code
+3
Workflow Identifier: 1558
NODES in Use: Form Trigger, Set, Google Drive, If, Code, Sticky Note

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Automation Does

This workflow lets you upload many files to Google Drive fast.

You give it files and a folder name.

It looks if the folder is already there.

If the folder is missing, it makes one for you.

Then it puts all files in that folder.

This saves hours of work and stops mistakes like putting files in wrong folders.


Inputs, Processing, and Outputs

Inputs

  • Multiple files uploaded by users.
  • A folder name typed in the form.

Processing Steps

  • Form Trigger receives files and folder name.
  • Set node saves the folder name to use in next steps.
  • Google Drive node searches for the folder inside a chosen parent folder.
  • If node checks if folder exists or not.
  • If missing, Google Drive creates the folder.
  • Code nodes split multiple files so each uploads individually.
  • Google Drive nodes upload all files to the found or made folder.

Outputs

  • Files uploaded with correct original names inside correct Google Drive folder.
  • No duplicate folder creation cases.
  • Time saved and less upload errors.

Who Should Use This Workflow

This is good for anyone who uploads many files to Google Drive often.

It helps project managers, marketing teams, and any group sharing lots of files weekly.

No need to be tech expert to get more organized with file uploads.


Tools and Services Used

  • n8n automation platform: Runs the workflow.
  • Google Drive API: Searches, creates folders, and uploads files.
  • Google OAuth Credentials: Allows secure Drive access without passwords in workflow.
  • Form Trigger node: Receives files and folder names from users.
  • Set, If, and Code nodes: Handle data flow and file preparation.
  • self-host n8n (optional): Use this if hosting workflow on your own server.

Beginner Step-by-Step: How to Use This Workflow in n8n Production

Step 1: Import Workflow

  1. Download the workflow file using the Download button on this page.
  2. In n8n editor, click “Import from File.”
  3. Select downloaded file to load workflow in n8n.

Step 2: Configure Required Settings

  1. Add Google Drive OAuth credentials in Credentials area.
  2. Update parent folder ID in Google Drive nodes for your Drive folder.
  3. If you changed node names, check the Code node’s expressions and update folderName references accordingly.

Step 3: Test Workflow

  1. Click Execute once on the Form Trigger node to get webhook URL.
  2. Submit multiple files and a folder name to this webhook URL to test live upload.
  3. Watch workflow run logs to confirm files upload correctly.

Step 4: Activate Workflow

  1. When satisfied, click Activate to run workflow automatically on form submissions.
  2. Use the webhook URL as your file upload form or integrate it into your own app.

Important Code Snippet Explanation

This Code node snippet splits all uploaded files into separate items.

Each file keeps its original name and binary data to upload one by one.

let results = [];
const items = $("On form submission").all()

for (item of items) {
    for (key of Object.keys(item.binary)) {
        results.push({
            json: {
                fileName: item.binary[key].fileName
            },
            binary: {
                data: item.binary[key],
            }
        });
    }
}

return results;

Change the node name inside $(“On form submission”) if your form node has a different name.


Customization Ideas

  • Change parent folder ID in Google Drive nodes to upload files to different folders.
  • Add extra form fields like description or tags and update workflow to store them.
  • Include email notifications after upload to alert team.
  • Validate file types in the Code node to block disallowed files.

Common Issues and Troubleshooting

Issue: Folder search finds no folder and creation fails.

Cause: Wrong parent folder ID or missing drive permission.

Fix: Double-check Google Drive parent folder ID in nodes and verify OAuth credential scopes.

Issue: Uploaded files are empty or damaged.

Cause: Binary data not passed correctly from Code node to upload nodes.

Fix: Ensure Code node outputs binary field named “data” and upload node input is set to “data”.


Pre-Production Checklist

  • Verify Google Drive OAuth credentials are active with correct scope.
  • Test form trigger with sample files and folder names.
  • Confirm folder search returns right folders.
  • Check If node branches based on folder presence properly.
  • Test uploading files to both existing and created folders.

Deployment Guide

After testing, activate workflow to run automatically.

Use Form Trigger’s webhook URL to submit files from your form or app.

Watch workflow runs for errors and fix as needed.


Summary

✓ Saves time by automating many file uploads to Google Drive.

✓ Prevents folder duplication by checking if folder exists.

✓ Uploads files with original file names into correct folders.

→ Result is faster, accurate, organized file storage in Google Drive.


Frequently Asked Questions

Yes, update the parent folder ID inside the Google Drive nodes to change the upload destination.
Yes, every search, folder creation, and file upload counts toward Google Drive API quota.
The workflow uses Google OAuth, which ensures secure access and uploads files directly to the user’s Drive.
Make sure the Code node outputs binary data under field name ‘data’ and the Google Drive upload nodes use ‘data’ as input.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free