Use this powerful n8n workflow to automatically backup and delete inactive n8n templates. Clean your instance, save backups to Google Drive, and manage your n8n nodes efficiently.
Download this n8n workflow template and start using it instantly.
n8n administrators managing self-hosted or large n8n instances.
Users who frequently retire old n8n templates but require archival copies.
Anyone needing a centralized, documented process for managing the lifecycle of an n8n workflow.
DevOps teams utilizing n8n for system management and needing cleanup automation.
Managing a large collection of n8n workflows can lead to clutter, potentially impacting performance and increasing administrative overhead. This robust n8n workflow template solves this problem by providing a secure and automated process for retiring workflows. When triggered, the automation ensures that the complete JSON definition of the target n8n workflow is backed up to Google Drive before it is permanently deleted from the n8n instance using the official n8n API.
This system transforms workflow management from a manual, error-prone task into a streamlined, automated process. Every step, from the initial n8n trigger to the final deletion, is tracked and confirmed with a Telegram notification, ensuring data preservation and maximizing the efficiency of your n8n environment. This is a critical tool for maintaining a clean and optimized n8n setup.
This automation is initiated by an easily accessible form, making it simple for any user to retire an old n8n workflow.
.json file, ready for cloud storage.To deploy and utilize this n8n workflow template, follow these steps:
https://your-n8n-instance.com/api/v1). This is crucial for controlling the n8n workflow lifecycle.chatId in the 'Send a text message' n8n node to receive notifications. On form submission (n8n trigger):
Function: Serves as the interactive n8n trigger, collecting the necessary input (the full workflow URL) from the user.
Key Configuration: Configured to accept a single text field labeled 'Paste the full workflow URL below.'
Get a Workflow (n8n node):
Function: Communicates with the n8n API to retrieve the full JSON schema of the specified n8n workflow before deletion.
Key Configuration: Operation set to Get; Workflow ID is dynamically set using the URL input from the form.
JSON to File (Code n8n node):
Function: Converts the raw JSON data of the n8n workflow into a binary buffer with the MIME type application/json, preparing it for file storage. It dynamically creates a safe filename.
Key Configuration: Uses JavaScript to stringify the workflow JSON and prepare binary data.
Upload Workflow (Google Drive n8n node):
Function: Executes the backup action by uploading the binary workflow file to the designated Google Drive folder.
Key Configuration: Uses binary property data; Folder ID is a static ID referencing the backup location.
Delete a Workflow (n8n node):
Function: Performs the destructive action, securely deleting the specified n8n workflow from the instance via the API.
Key Configuration: Operation set to Delete; Workflow ID is referenced from the data gathered by the 'Get a Workflow' n8n node.
Send a text message (Telegram n8n node):
Function: Provides confirmation and audit trail by notifying the administrator about the completed backup and deletion of the n8n workflow.
Key Configuration: Dynamically includes the workflow name and ID in the success message.
Set up an automated n8n workflow backup system. This n8n templates guide shows how to save all your live n8n workflows to Google Drive every 4 hours using the n8n node and internal API, complete with backup rotation.

Secure your automation logic by automatically backing up all your configured n8n workflow assets to a private Gitea repository. This n8n workflow ensures version control.

Use this robust n8n workflow to automatically backup Squarespace header and footer code injections to GitHub on a recurring schedule. Secure your custom code with these n8n templates.

A comprehensive n8n workflow to automate daily backups of all your n8n workflows to a Bitbucket repository, ensuring version control and rate limit compliance.

Use this robust n8n workflow to automatically backup all your existing n8n workflow designs daily to Google Drive. This n8n template ensures essential system redundancy and disaster recovery.

👋 Hi! I'm Arlin - a QA Engineer with 2 years of experience and a background in Dart & Flutter for mobile app development. ⚙️ I'm passionate about automation and love building efficient workflows using n8n. 📬 Reach out for any help with custom workflows







































