This workflow corresponds to n8n.io template #13260 — we link there as the canonical source.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "JZ8C3IFRtHrntshw",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Scheduled Backup Automation \u2013 Mailgun & Box",
"tags": [],
"nodes": [
{
"id": "4554d1e3-9e79-4b68-a7ff-b25bdbe5c7cc",
"name": "Backup Webhook Trigger",
"type": "n8n-nodes-base.webhook",
"position": [
-768,
208
],
"parameters": {
"path": "scheduled-backup",
"options": {},
"httpMethod": "POST",
"responseMode": "lastNode"
},
"typeVersion": 1
},
{
"id": "aeedcfc7-3703-4ff2-84eb-5e67640a918d",
"name": "Set Default Backup Config",
"type": "n8n-nodes-base.set",
"position": [
-560,
208
],
"parameters": {
"mode": "keep",
"options": {}
},
"typeVersion": 3
},
{
"id": "df9066be-644c-41d9-b783-7d312012b544",
"name": "Create Backup Folder",
"type": "n8n-nodes-base.box",
"position": [
-352,
208
],
"parameters": {
"operation": "createFolder"
},
"typeVersion": 1
},
{
"id": "832370ef-c438-4d11-aee4-c8de0bca9e1e",
"name": "Prepare Backup Items",
"type": "n8n-nodes-base.code",
"position": [
-112,
208
],
"parameters": {
"jsCode": "// create one item per backup target and attach folderId\nconst folderId = $node[\"Create Backup Folder\"].json[\"id\"];\nconst backups = $node[\"Set Default Backup Config\"].json[\"backups\"];\nreturn backups.map(b => ({ json: { ...b, folderId } }));"
},
"typeVersion": 2
},
{
"id": "4d0d0800-82fc-43a4-af24-871c0087851e",
"name": "Split Backups",
"type": "n8n-nodes-base.splitInBatches",
"position": [
128,
208
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "cd7e3bce-aa42-491b-b106-e0c58c9ffbae",
"name": "Export Backup Data",
"type": "n8n-nodes-base.httpRequest",
"position": [
336,
208
],
"parameters": {
"url": "={{ $json.exportUrl }}",
"options": {}
},
"typeVersion": 4
},
{
"id": "f6471164-eb66-45d8-91c2-5bca91f6687c",
"name": "Was Export Successful?",
"type": "n8n-nodes-base.if",
"position": [
560,
256
],
"parameters": {
"options": {},
"conditions": {
"number": [
{
"value1": "={{ $json.statusCode }}",
"value2": 200,
"operation": "equal"
}
]
}
},
"typeVersion": 2
},
{
"id": "1d6d8b16-6b7a-44cf-a474-26b63ff737b7",
"name": "Compress Export",
"type": "n8n-nodes-base.code",
"position": [
784,
96
],
"parameters": {
"jsCode": "const zlib = require('zlib');\nreturn $input.all().map(item => {\n const binKey = Object.keys(item.binary)[0];\n const compressed = zlib.gzipSync(Buffer.from(item.binary[binKey].data, 'base64'));\n return {\n json: {\n name: item.json.name,\n folderId: item.json.folderId\n },\n binary: {\n data: {\n data: compressed.toString('base64'),\n mimeType: 'application/gzip',\n fileName: `${item.json.name}-${new Date().toISOString()}.gz`\n }\n }\n };\n});"
},
"typeVersion": 2
},
{
"id": "3168f8bd-b072-4633-9065-63800b0052d6",
"name": "Prepare File for Box",
"type": "n8n-nodes-base.moveBinaryData",
"position": [
976,
96
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "c811aed6-a74b-455d-bcc5-9dd468e047eb",
"name": "Upload to Box",
"type": "n8n-nodes-base.box",
"position": [
1264,
112
],
"parameters": {},
"typeVersion": 1
},
{
"id": "caa4fd8b-03f9-4eef-9538-9ebb64f555e7",
"name": "Was Upload Successful?",
"type": "n8n-nodes-base.if",
"position": [
1488,
48
],
"parameters": {
"options": {},
"conditions": {
"string": [
{
"value1": "={{ $json.id }}",
"operation": "isEmpty"
}
]
}
},
"typeVersion": 2
},
{
"id": "46974add-e908-4e50-9328-39304a56f266",
"name": "Compose Success Email",
"type": "n8n-nodes-base.set",
"position": [
1760,
16
],
"parameters": {
"mode": "add",
"options": {}
},
"typeVersion": 3
},
{
"id": "15d4e5b4-edef-4018-8edf-0e21fd1cbfed",
"name": "Send Success Notification",
"type": "n8n-nodes-base.mailgun",
"position": [
2016,
16
],
"parameters": {
"subject": "={{ $json.emailSubject }}",
"toEmail": "admin@example.com",
"fromEmail": "user@example.com"
},
"typeVersion": 1
},
{
"id": "c537b07e-06a7-4906-9ac8-57955aa9fbad",
"name": "Compose Failure Email",
"type": "n8n-nodes-base.set",
"position": [
1696,
320
],
"parameters": {
"mode": "add",
"options": {}
},
"typeVersion": 3
},
{
"id": "b1c70504-6bb3-4e37-af0a-64d39b7e01d0",
"name": "Send Failure Notification",
"type": "n8n-nodes-base.mailgun",
"position": [
1968,
320
],
"parameters": {
"subject": "={{ $json.emailSubject }}",
"toEmail": "admin@example.com",
"fromEmail": "user@example.com"
},
"typeVersion": 1
},
{
"id": "eee93b96-50bf-4f8f-b7ec-9a021ce1cf36",
"name": "Workflow Overview",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1408,
-192
],
"parameters": {
"width": 550,
"height": 738,
"content": "## How it works\nThis workflow automates multi-asset backups on demand or from external schedulers. A Webhook trigger receives a POST request that optionally defines which resources to back up. Default objects are added via a Set node and a dated folder is immediately created in Box to hold the day\u2019s backups. Each backup definition is processed in sequence: an HTTP request pulls the latest export, the data stream is compressed to a GZIP archive in a Code node, then safely uploaded to the new Box folder. Conditional IF nodes verify both the export and the upload. Depending on the outcome, the workflow assembles a success or failure message and dispatches it through Mailgun.\n\n## Setup steps\n1. Create Box API credentials and add them to the Box nodes.\n2. Create Mailgun API credentials and attach them to both Mailgun nodes.\n3. Replace the sample export URLs in the Set node with your real endpoints.\n4. Whitelist your server\u2019s IP addresses in the services you are exporting from.\n5. Point your external scheduler (cron, CI/CD, etc.) to POST to the webhook URL.\n6. Test with a single small backup to confirm permissions and folder creation.\n7. Monitor Mailgun logs to ensure notifications are received."
},
"typeVersion": 1
},
{
"id": "875b1908-f91e-4ea6-a01f-193509d939f1",
"name": "Trigger & Prep Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-832,
-160
],
"parameters": {
"color": 7,
"width": 898,
"height": 654,
"content": "## Trigger & Preparation\nThis cluster receives the incoming request that kicks off each backup cycle. The Webhook node allows external schedulers such as cron jobs, CI/CD pipelines, or other services to trigger the workflow with a simple POST call. A Set node then merges the incoming payload with sensible defaults, ensuring that at least three core assets\u2014database, file storage, and configuration\u2014are always backed up. Immediately afterward a Box folder is generated; its name is derived from the current date so every run produces a clean, chronological directory. The Code node converts the backup list into individual items while injecting the newly minted folder ID into each one, guaranteeing that every generated archive knows exactly where it belongs. This modular structure simplifies later maintenance: modify backup targets in a single place or override them dynamically via the trigger payload."
},
"typeVersion": 1
},
{
"id": "12fcdc91-0454-451a-a3cf-f660f8755e87",
"name": "Compression & Storage Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
64,
-160
],
"parameters": {
"color": 7,
"width": 1138,
"height": 654,
"content": "## Compression & Storage\nAfter each backup definition reaches the Split node, an HTTP Request pulls the raw export stream or file from your service of choice. The first IF gate checks for a 200 status code to ensure a valid payload. When successful, the Code node leverages Node.js\u2019 built-in zlib library to wrap the export in a GZIP archive, append a timestamped filename, and attach it as binary data. The Move Binary Data node re-labels the binary property to the name expected by Box, preventing upload errors. Finally, the archive is pushed to the date-stamped Box folder. A second IF gate validates the presence of a returned file ID so the workflow can reliably differentiate between a true upload and an API hiccup. This entire leg keeps your storage platform organised, compressed, and tamper-evident."
},
"typeVersion": 1
},
{
"id": "e669d7c0-5786-4c70-b692-91d8c31bb3ad",
"name": "Notification & Reporting Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
1216,
-160
],
"parameters": {
"color": 7,
"width": 1138,
"height": 670,
"content": "## Notification & Reporting\nClear visibility is critical for any backup strategy. Once each asset has attempted to upload, the workflow assembles a concise status email. Success paths craft a green-light subject line that includes the asset name and timestamp; failure paths flag the problem and pinpoint whether the export or upload step failed. Both outcomes flow into separate Mailgun nodes that share a common credential but send different subject lines and bodies. Because each asset travels through the loop individually, you get one email per backup item\u2014making it easy to spot partial failures. You can further customise these nodes to aggregate reports, attach logs, or alert additional stakeholders, ensuring the right people know when backups complete or when something needs attention."
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "f724815a-3620-4e25-9ed2-17edbec9e902",
"connections": {
"Split Backups": {
"main": [
[
{
"node": "Export Backup Data",
"type": "main",
"index": 0
}
]
]
},
"Upload to Box": {
"main": [
[
{
"node": "Was Upload Successful?",
"type": "main",
"index": 0
}
]
]
},
"Compress Export": {
"main": [
[
{
"node": "Prepare File for Box",
"type": "main",
"index": 0
}
]
]
},
"Export Backup Data": {
"main": [
[
{
"node": "Was Export Successful?",
"type": "main",
"index": 0
}
]
]
},
"Create Backup Folder": {
"main": [
[
{
"node": "Prepare Backup Items",
"type": "main",
"index": 0
}
]
]
},
"Prepare Backup Items": {
"main": [
[
{
"node": "Split Backups",
"type": "main",
"index": 0
}
]
]
},
"Prepare File for Box": {
"main": [
[
{
"node": "Upload to Box",
"type": "main",
"index": 0
}
]
]
},
"Compose Failure Email": {
"main": [
[
{
"node": "Send Failure Notification",
"type": "main",
"index": 0
}
]
]
},
"Compose Success Email": {
"main": [
[
{
"node": "Send Success Notification",
"type": "main",
"index": 0
}
]
]
},
"Backup Webhook Trigger": {
"main": [
[
{
"node": "Set Default Backup Config",
"type": "main",
"index": 0
}
]
]
},
"Was Export Successful?": {
"main": [
[
{
"node": "Compress Export",
"type": "main",
"index": 0
}
],
[
{
"node": "Compose Failure Email",
"type": "main",
"index": 0
}
]
]
},
"Was Upload Successful?": {
"main": [
[
{
"node": "Compose Success Email",
"type": "main",
"index": 0
}
],
[
{
"node": "Compose Failure Email",
"type": "main",
"index": 0
}
]
]
},
"Set Default Backup Config": {
"main": [
[
{
"node": "Create Backup Folder",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow automatically schedules, packages, and uploads backups of your databases, files, or configuration exports to Box cloud storage, then sends a completion email via Mailgun. It is ideal for small-to-medium businesses or solo developers who want hands-off, verifiable…
Source: https://n8n.io/workflows/13260/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Automate WhatsApp communication for recruitment agencies with an interactive, structured customer experience. This workflow handles pricing inquiries, request submissions, tracking, complaints, and hu
This template turns Podium's conversation inbox into a full sales CRM with a custom funnel, AI message classification, automated drip follow-ups, daily admin reports, and a live Kanban dashboard. Six
Suspicious_login_detection. Uses postgres, httpRequest, noOp, html. Webhook trigger; 43 nodes.
This n8n workflow is designed for security monitoring and incident response when suspicious login events are detected. It can be initiated either manually from within the n8n UI for testing or automat
Echo Brand Voice Analysis (Processor) - TASK-074 Dec 10 Fix. Uses formTrigger, httpRequest, executeWorkflowTrigger, moveBinaryData. Event-driven trigger; 40 nodes.