n8n

How to Automate n8n Backups to Google Drive with Email and Discord Alerts?

Protect your automation work by saving every workflow to Google Drive on a set schedule and send status alerts to email and chat. Great for teams that need safe copies, quick restore, and clear change history.

Here is how it runs. A scheduler starts daily and a second trigger lets other workflows call it when needed. The flow pulls all workflows from the platform API, then loops through them in batches. It checks a Google Drive folder first. If the folder is empty, it treats the run as the first backup and uploads files. If files already exist, it updates them by name and id. Two small code steps turn each workflow into a JSON file. File names follow a clear pattern using the workflow name and id. After processing, it sends a summary email and a Discord message. A limit node can cap how many items run in one go for safety.

Setup is simple. Connect Google Drive, Gmail, Discord, and the platform API as credentials in n8n Cloud. Paste your target Drive folder link into the Parameters node and set your recipient email address. Adjust the schedule to fit your backup window. Expect steady backups, easy audits, and faster recovery. This fits IT teams, operations leads, and anyone who needs nightly snapshots or on demand backups.

What are the key features?

  • Daily schedule runs at a set hour to create fresh backups
  • Secondary trigger allows on demand runs from other workflows
  • Pulls all workflows using the platform API for full coverage
  • Checks the target Google Drive folder and detects first time backups
  • Creates or updates JSON files using a clear name and id pattern
  • Code steps convert workflow data into file content ready for upload
  • Batch loop processes items safely and supports large sets
  • Sends a success summary by Gmail and a Discord message
  • Limit control caps how many items run to prevent overload
  • Folder URL is set in a Parameters node for easy reconfiguration

What are the benefits?

  • Reduce manual backup time from 60 minutes to 3 minutes per day
  • Automate 100 percent of workflow export and upload steps
  • Improve recovery accuracy by saving clean JSON files with stable names
  • Connect Google Drive, Gmail, Discord, and the platform API in one place
  • Handle hundreds of workflows reliably with batch processing
  • Lower risk of data loss with nightly snapshots and alerts

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Google Drive, Gmail, Discord and n8n. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, open the Google Drive node and create a new Google Drive OAuth2 credential. Follow the on screen steps to grant access to your Drive.
  4. Open the Gmail nodes and create a new Gmail OAuth2 credential. Approve the requested scopes and save the credential.
  5. Open the Discord node and create a Discord Bot credential. Provide your bot token and select or paste the target channel. Make sure the bot has permission to send messages.
  6. Open the Get all Workflows node and create an n8n API credential. Use your n8n base URL and API key from your n8n user settings, then save.
  7. Double click the Parameters node. Paste the target Google Drive folder URL into the directory field. This tells the backup where to store files.
  8. Open the Schedule Trigger and set the day and time for your backup window. Save the node.
  9. Open the Gmail nodes and set your recipient email address for success and error notices. Update the subject lines if needed.
  10. Run a test. Execute the workflow once. Check the Drive folder for new files named with workflow name and id. Verify you receive the email and the Discord message.
  11. If you have many workflows, adjust the Limit node to control how many items process per run. This helps during first time backups.
  12. Troubleshoot common issues: if you see permission errors, reconnect OAuth credentials. If no files appear, confirm the folder URL in the Parameters node. If updates do not apply, verify file names match the name and id pattern.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Discord

Sign up

Free: $0 / mo (no API usage fees; standard rate limits apply)

Gmail

Sign up

No cost: Personal Gmail (Gmail API has no usage-based pricing; quotas apply)

Google Drive

Sign up

Drive API: $0 (no additional cost; quota-limited)

n8n API

Sign up

Community Edition (self-hosted): $0 (public REST API available). Cloud Starter: $20 / mo billed annually ($24 monthly); API unavailable during free trial.

Credits:
Creator: Hochien Chang
YouTube video
YouTube channel
YouTube channel

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.