Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Code, Git & Developer Tools

Code, Git & Developer Tools

Back Up n8n Workflows to Google Drive as JSON

On a schedule or manual run, it creates a dated Google Drive folder, exports every n8n workflow through the n8n API and uploads each as a JSON file.

What it does

# 🔄 Workflow Backup for n8n → Google Drive An automated system to back up all your n8n workflows and store them as .json files in Google Drive. Perfect for creators, teams, and agencies who want to protect their work without manual effort. --- ## ✨ What this workflow does - Creates a new folder in Google Drive named Workflow Backups [date] - Fetches all workflows from your n8n instance via the n8n API - Converts each workflow into a .json file - Uploads the files to the created backup folder - (Optionally) Deletes old backup folders to keep things tidy - Can run manually or automatically (e.g., weekly) --- ## 🛠 Requirements - A Google account with access to Google Drive - Connected Google Drive OAuth2 credentials in n8n - Active n8n API credentials - Enabled trigger: Manual or Schedule --- ## ⚙️ Installation Instructions 1. Import the workflow (Workflow_Backup_copy.json) into your n8n instance 2. Set up credentials: - Replace Google demo with your own Google Drive OAuth2 in the following nodes: - Create new folder - Get folders - Upload workflow - delete folder - Replace n8n demo with your n8n API credentials in Get n8n workflow 3. Replace the folder ID in the Create new folder node with the target backup folder on your Drive (folderId) 4. Optional: Configure Schedule Trigger to run weekly or at your preferred interval --- ## 📦 Workflow Structure Manual/Schedule Trigger ↓ Create new folder (Google Drive) ↓ Get n8n workflows (via API) ↓ Loop through workflows ↓ Convert to .json files ↓ Upload to Drive ↓ (Optional) Delete old backup folders --- ## ✅ Tips - Add logic to retain only the latest X backups (e.g., last 3). - The workflow can run fully hands-free once scheduled. - Want to store files elsewhere? Swap out the upload node for Dropbox, S3, etc.

The steps

  1. Convert to File
  2. Schedule Trigger
  3. Filter
  4. delete folder
  5. Get folders
  6. Manual trigger
  7. Create new folder
  8. Loop
  9. Upload workflow
  10. Limit
  11. Get n8n workflow

Similar automations