Templates / Create Google Drive folders by path

Create Google Drive folders by path

Ready for 3.0

by Xavier · 2,179 views · created 2025-04-25 · File Management

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 11 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects Google Drive.

How it runs

Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).

  1. Dummy input data (Edit Fields (Set)): sets 2 fields: google_drive_folder_id, desired_path
  2. Split the desired path (Code): runs custom JavaScript code
  3. Create desired path (Code): runs custom JavaScript code
  4. Check if top folder exists (Google Drive): work with file folder
  5. If: checks a condition and branches into true / false
  6. Create new subfolder (Google Drive): work with folder
  7. Set parameters for next run (Code): runs custom JavaScript code
  8. If: checks a condition and branches into true / false
  9. Return the ID of the last folder (Edit Fields (Set)): sets 1 field: google_drive_folder_id

Services it uses

Google Drive

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 (6)

From the author

This workflow creates nested Google Drive folders from a path string (like Projects/Clients/Reports). It automatically handles the necessary folder lookups and creation steps required by Google Drive, then outputs the final folder's ID for immediate use. How…

Excerpt from Xavier's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.