Automate Google Drive File Sharing with n8n Workflow

Discover how to automate sharing files publicly from a specific Google Drive folder using n8n. This workflow efficiently generates downloadable links and applies public sharing permissions, saving hours on manual file management.
googleDrive
splitInBatches
code
+5
Workflow Identifier: 1483
NODES in Use: manualTrigger, set, googleDrive, splitInBatches, code, merge, noOp, stickyNote

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 workflow does

This workflow makes all files in a Google Drive folder publicly viewable and creates direct download links for each file. It stops you from manually changing permissions or copying URLs one by one. After running, you get a list of download links ready to share with others.

It saves time and avoids mistakes in sharing files with team members or clients.


Who should use this workflow

This workflow is for people who upload many files to Google Drive folders and want quick public access links. It helps managers, remote teams, or anyone who needs to share multiple Google Drive files without doing it manually.

No coding skill is needed, but basic n8n use is helpful.


Tools and services used

  • n8n: Workflow automation platform.
  • Google Drive API: To list files and change sharing permissions.
  • OAuth2 Credentials: To connect n8n with Google Drive securely.

How the workflow works: Inputs → Process → Outputs

Inputs

  • Google Drive folder ID where files are stored.
  • Valid OAuth2 credentials for Google Drive access.

Process

  • Fetch all files from the specified Google Drive folder.
  • Split files into batches of 50 to avoid API overload.
  • Change each file’s permission to “anyone with the link can view”.
  • Generate direct download URLs using a code node.
  • Combine all file download information into a single list.

Outputs

  • A list of file names paired with direct download links.
  • Files are publicly accessible with correct sharing permissions set.

Beginner step-by-step: How to build this in n8n

1. Importing the workflow

  1. Download the workflow file using the Download button on this page.
  2. Open your n8n editor.
  3. Select “Import from File” and upload the downloaded workflow.

2. Configure credentials and folder ID

  1. Add your Google Drive OAuth2 credentials in n8n if not already set.
  2. Find the Set Folder ID node and enter your Google Drive folder ID (not folder name).

3. Check and test

  1. Run the Manual Execute Workflow node to start the process once.
  2. Verify the output lists download links and file names correctly.
  3. Make sure there are no errors related to permissions or file access.

4. Activate the workflow

  1. Toggle the workflow active switch to run in production.
  2. Optionally, add triggers like HTTP Trigger nodes for automated runs.
  3. For full control, consider self-host n8n.

Common problems and fixes

Permission denied error when changing sharing status

Cause: Your OAuth2 credentials lack rights or the wrong Google Drive account is connected.

Fix: Reauthorize credentials with proper access and make sure the account owns or can edit files.

No files found after listing from folder

Cause: The folder ID is wrong or the folder is empty.

Fix: Verify folder ID by getting it from the folder link, not folder name. Confirm files exist inside.


Customization ideas

  • Use expressions in Set Folder ID node to change folder dynamically.
  • After merging links, add nodes like Google Sheets or Airtable to save download URLs.
  • Add an email node like Gmail to send generated links automatically.
  • Change batch size in Loop Over Items node to tune performance.

Summary of benefits

✓ Saves time by automating sharing Google Drive files publicly.
✓ Avoids permission errors by standardizing file access.
✓ Produces ready-to-use direct download links for sharing.
✓ Handles large folders efficiently in batches.
✓ Easy to activate and customize inside n8n.


Frequently Asked Questions

It uses the Google Drive node with the “share” operation, setting permissions to “anyone with the link can view” for each file.
Yes, it supports Shared Drives using the “supportsAllDrives” option in the Google Drive node.
The Google Drive folder ID string must be used, not the folder name.
This error occurs if OAuth2 credentials lack proper Google Drive permissions or the connected account does not own or have editor rights on the files.

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