Automate n8n Workflow Backups to Google Drive with Telegram Alerts

This workflow automates daily backups of your n8n workflows by saving them as JSON files in timestamped Google Drive folders. It also manages retention by deleting older backups and sends Telegram notifications upon completion to keep you updated.
googleDrive
manualTrigger
telegram
+7
Workflow Identifier: 1307
NODES in Use: Manual Trigger, SplitInBatches, Schedule Trigger, Google Drive, Set, n8n, Limit, ConvertToFile, Code, Telegram

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What this workflow does

This workflow automatically backs up n8n workflows as JSON files in Google Drive with folders named by the current date and time.
It deletes backup folders older than seven days to save storage space.
Users get Telegram messages telling them when backups finish, with a link to the saved folder.
This removes manual backup work and stops accidental data loss.


Who should use this workflow

This is for anyone managing many n8n workflows who wants a simple way to save them every day.
It helps people who fear losing workflow data because of mistakes or errors.


Tools and services used

  • n8n: For automation workflow creation and API access to get workflows.
  • Google Drive: To create folders and save workflow JSON backup files.
  • Telegram Bot API: To send notifications when backups complete.

Inputs, processing, and outputs

Inputs:

  • Trigger events from the Manual Trigger or Schedule Trigger in n8n.
  • Authentication credentials for Google Drive and Telegram.
  • n8n API access to fetch up to 200 workflows.

Processing Steps:

  • Create a new Google Drive folder with the current datetime as name.
  • Request all n8n workflows from the API, limited to 200.
  • Split workflows into batches to handle them one by one.
  • Convert each workflow into a JSON file named after the workflow.
  • Upload each JSON file to the created Google Drive folder.
  • Search Google Drive for backup folders named with the n8n backup prefix.
  • Use code to find folders older than seven days for deletion.
  • Delete old folders permanently from Google Drive.
  • Send a Telegram message with backup completion time and folder link.

Outputs:

  • Google Drive folders containing workflow JSON backups named by datetime.
  • Removed old backup folders to keep storage clean.
  • Telegram notifications with backup status and folder link.

Beginner step-by-step: How to run this workflow in n8n

Import and configure the workflow

  1. Download the workflow file using the Download button on this page.
  2. Open n8n and click on “Import from File” in the editor.
  3. Select the downloaded file to load the workflow inside n8n.

Add required credentials

  1. Go to the Credentials section in n8n.
  2. Add Google Drive OAuth2 credentials for folder and file operations.
  3. Add n8n API credentials to allow workflow retrieval.
  4. Add Telegram Bot credentials and set Telegram chat ID in environment variables.

Update IDs and parameters

  1. If needed, update Google Drive folder paths or IDs to match your account.
  2. Make sure the Telegram chat ID is set correctly in environment variables.

Test and activate

  1. Run the workflow using the Manual Trigger node once to test properly.
  2. Check Google Drive for the newly created backup folder with JSON files inside.
  3. Check Telegram for the notification message.
  4. Turn on the workflow activation toggle to automate backups with the scheduled trigger.

For hosting or running this workflow on your own server, consider self-host n8n.


Customization and adjustments

  • You can change how often backups run by editing the Schedule Trigger node timing.
  • Adjust how many old backup folders to keep by changing the number in the Code node that selects folders to delete.
  • Change folder names by editing the Google Drive Folder Creation node’s name field to add time or other text.
  • Add more details to Telegram notifications like workflow count or backup size by changing the Telegram node’s message text.
  • If manual backups only are preferred, disconnect or remove the Schedule Trigger node.

Possible problems and solutions

  • Google Drive folder creation fails: OAuth2 credentials missing, expired, or wrong. Fix by updating credentials and re-authenticating.
  • No workflows found in Get Workflows node: API credentials missing or incorrect. Fix by checking API keys and permissions.
  • No Telegram message received: Bot token or chat ID missing or wrong. Fix by verifying Telegram credentials and environment variables.

Summary

✓ Save all n8n workflows daily as JSON files in easy-to-find Google Drive folders.
✓ Keep Google Drive clean by deleting backup folders older than 7 days automatically.
✓ Get Telegram alerts when backups finish, with instant folder links.
✓ Stop worrying about losing workflows due to mistakes or technical issues.
✓ Run backups automatically on a schedule or manually anytime you want.


Frequently Asked Questions

No. This workflow uses Google Drive nodes. To use Dropbox, replace Google Drive nodes with Dropbox nodes and set up Dropbox credentials.
No extra cost from n8n API usage beyond normal limits. Google Drive and Telegram use their own quotas and rules.
Backups use OAuth2 authentication and encrypted API calls. Keep Google Drive account security strong.
No. It limits backups to 200 workflows for performance. For more, create multiple workflows or adjust limits.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free