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
Automate n8n backups to Google Drive

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

Learn how to Build this Workflow with AI:

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.


Automate n8n backups to Google Drive

Visit through Desktop to Interact with the Workflow.

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.
Author
Written By
Ritu Sanjali

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.