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 mor...
Template notes
π 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