Skip to main content

Backup and delete workflows to Google Drive with n8n API and form trigger

Workflow preview

Workflow preview
100%
Backup and delete workflows to Google Drive with n8n API and form trigger preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Description: Effortlessly delete unused or inactive workflows from your n8n instance while automatically backing them up as .json files into your Google Drive. Keep your instance clean, fast, an...

Best for

  • DevOps automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.formtrigger, n8n-nodes-base.telegram, n8n-nodes-base.stickynote, n8n-nodes-base.googledrive, n8n-nodes-base.n8n, n8n-nodes-base.code

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Arlin Perez.

Original n8n.io source

1.1 Workflow description

Title
Backup and delete workflows to Google Drive with n8n API and form trigger
Workflow name
Backup and delete workflows to Google Drive with n8n API and form trigger

๐Ÿ” Description:

Effortlessly delete unused or inactive workflows from your n8n instance while automatically backing them up as .json files into your Google Drive. Keep your instance clean, fast, and organized โ€” no more clutter slowing you down. This workflow is ideal for users managing large self-hosted n8n setups, or anyone who wants to maintain optimal performance while preserving full workflow backups.

โœ… What it does:

  • Accepts a full n8n Workflow URL via a form
  • Retrieves workflow info automatically
  • Converts the workflowโ€™s full JSON definition into a file
  • Uploads that file to Google Drive
  • Deletes the workflow safely using the official n8n API
  • Sends a Telegram notification confirming backup and deletion

โš™๏ธ How it works:

๐Ÿ“ Form โ€“ Collects the full workflow URL from the user ๐Ÿ” n8n Node (Get Workflow) โ€“ Uses the URL to fetch workflow details ๐Ÿ“ฆ Code Node ("JSON to File") โ€“ Converts the workflow JSON into a properly formatted .json file with UTF-8 encoding, ready to be uploaded to Google Drive. โ˜๏ธ Google Drive Upload โ€“ Uploads the .json backup file to your selected Drive folder ๐Ÿ—‘๏ธ n8n Node (Delete Workflow) โ€“ Deletes the workflow from your instance using its ID ๐Ÿ“ฌ Telegram Notification โ€“ Notifies you that the workflow was backed up and deleted, showing title, ID, and date

๐Ÿ“‹ Requirements:

  • Google Drive connected to your n8n account
  • Telegram Bot connected to n8n
  • An n8n instance with API access (self-hosted or Cloud)
  • Your n8n API Key (Create one in the settings)

๐Ÿ› ๏ธ How to Set Up:

โœ… Add your Google Drive credentials โœ… Add your Telegram Bot credentials

๐Ÿงพ In the โ€œJSON to Fileโ€ Code node, no additional setup is required โ€” it automatically converts the workflow JSON into a downloadable .json file using the correct encoding and filename format.

โ˜๏ธ In the Google Drive node: Binary Property: data Folder ID: your target folder in Google Drive

๐Ÿ”‘ Create a new credential for the n8n node using: API Key: your personal n8n API key Base URL: your full n8n instance API path (e.g. https://your-n8n-instance.com/api/v1) โš™๏ธ Use this credential in both the Get Workflow and Delete Workflow n8n nodes

๐Ÿ“ฌ In the Telegram node, use this message template: ๐Ÿ—‘๏ธ Workflow "{{ $json.name }}" (ID: {{ $json.id }}) was backed up to Google Drive and deleted from n8n. ๐Ÿ“… {{ $now }}

๐Ÿ”’ Important: This workflow backs up the entire workflow data to Google Drive. Please be careful with the permissions of your Google Drive folder and avoid sharing it publicly, as the backups may contain sensitive information. Ensuring proper security and access control is essential to protect your data.

๐Ÿš€ Activate the workflow and you're ready to safely back up and remove workflows from your n8n instance

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - On form submission

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.2

Block 2 - Send a text message

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 3 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Upload Workflow

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 10 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Delete a Workflow

Type / Role
n8n-nodes-base.n8n - n8n
Config choices
Version 1

Block 12 - Get a Workflow

Type / Role
n8n-nodes-base.n8n - n8n
Config choices
Version 1

Block 13 - JSON to File

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

3. Summary Table

Workflow Backup and delete workflows to Google Drive with n8n API and form trigger
Complexity intermediate
Nodes 13
Categories DevOps
Author Arlin Perez
Published 31 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6751/6751.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Backup and delete workflows to Google Drive with n8n API and form trigger do?

Description: Effortlessly delete unused or inactive workflows from your n8n instance while automatically backing them up as .json files into your Google Drive. Keep your instance clean, fast, an...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your DevOps use case.