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
- Download the workflow file using the Download button on this page.
- Open your n8n editor.
- Select “Import from File” and upload the downloaded workflow.
2. Configure credentials and folder ID
- Add your Google Drive OAuth2 credentials in n8n if not already set.
- Find the Set Folder ID node and enter your Google Drive folder ID (not folder name).
3. Check and test
- Run the Manual Execute Workflow node to start the process once.
- Verify the output lists download links and file names correctly.
- Make sure there are no errors related to permissions or file access.
4. Activate the workflow
- Toggle the workflow active switch to run in production.
- Optionally, add triggers like HTTP Trigger nodes for automated runs.
- 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.
