Workflow: Scheduletrigger Workflow
Integrations: code, discord, executeWorkflow, executeWorkflowTrigger, executionData, gmail, googleDrive, if, limit, n8n, scheduleTrigger, set, splitInBatches, stickyNote, stopAndError

{"meta": {"instanceId": "workflow-e17d9324", "versionId": "1.0.0", "createdAt": "2025-09-29T07:07:47.488787", "updatedAt": "2025-09-29T07:07:47.488872", "owner": "n8n-user", "license": "MIT", "category": "automation", "status": "active", "priority": "high", "environment": "production"}, "nodes": [{"id": "d74c545f-17ab-47f7-bb2a-93c9e9673bab", "name": "Schedule Trigger", "type": "n8n-nodes-base.scheduleTrigger", "position": [460, -20], "parameters": {"rule": {"interval": [{"triggerAtHour": 1, "triggerAtMinute": 30}]}}, "typeVersion": 1.2, "notes": "This scheduleTrigger node performs automated tasks as part of the workflow."}, {"id": "fc54b674-dc64-49ad-819d-66a4e416efc2", "name": "Get all n8n Workflows", "type": "n8n-nodes-base.n8n", "position": [680, -20], "parameters": {"filters": {}, "requestOptions": {}}, "credentials": {"n8nApi": {"id": "WR8oA7tQqdurDv3Y", "name": "n8n account"}}, "typeVersion": 1, "notes": "This n8n node performs automated tasks as part of the workflow."}, {"id": "b23cd260-8e68-42e7-935c-a658ae35cccd", "name": "Backup to Google Drive2", "type": "n8n-nodes-base.googleDrive", "onError": "continueErrorOutput", "position": [1260, 400], "parameters": {"fileId": {"__rl": true, "mode": "id", "value": "={{ $json.id }}"}, "options": {}, "operation": "update", "changeFileContent": true, "newUpdatedFileName": "={{  $('Workflow Data').item.json.name + \"_\" + $('Workflow Data').item.json.id+ \".json\"}}"}, "credentials": {"googleDriveOAuth2Api": {"id": "FsjSbb8sdqbZm9dM", "name": "Out"}}, "retryOnFail": true, "typeVersion": 3, "notes": "This googleDrive node performs automated tasks as part of the workflow."}, {"id": "29a69d92-f416-489d-9a96-3a22844556e0", "name": "Loop Over Items", "type": "n8n-nodes-base.splitInBatches", "position": [920, -20], "parameters": {"options": {}}, "typeVersion": 3, "notes": "This splitInBatches node performs automated tasks as part of the workflow."}, {"id": "ddee56fd-8610-4cae-9ae0-76e58e7fd111", "name": "Backup to Google Drive4", "type": "n8n-nodes-base.googleDrive", "onError": "continueErrorOutput", "position": [1380, 720], "parameters": {"name": "={{  $('Workflow Data').item.json.name + \"_\" + $('Workflow Data').item.json.id+ \".json\"}}", "driveId": {"__rl": true, "mode": "list", "value": "My Drive"}, "options": {}, "folderId": {"__rl": true, "mode": "list", "value": "13clPf8pnv_-GLeeNXLhuVzQiqnKo_7Ev", "cachedResultUrl": "{{ $env.WEBHOOK_URL }}", "cachedResultName": "n8nWorkflows"}}, "credentials": {"googleDriveOAuth2Api": {"id": "FsjSbb8sdqbZm9dM", "name": "Out"}}, "retryOnFail": true, "typeVersion": 3, "notes": "This googleDrive node performs automated tasks as part of the workflow."}, {"id": "8fdf83b1-5884-45a2-8710-e9012c07ccca", "name": "ifDriveEmpty", "type": "n8n-nodes-base.if", "position": [680, 420], "parameters": {"options": {}, "conditions": {"options": {"version": 2, "leftValue": "", "caseSensitive": true, "typeValidation": "strict"}, "combinator": "and", "conditions": [{"id": "5ec1b850-e0ce-4bd6-a8be-504e01825c00", "operator": {"type": "string", "operation": "exists", "singleValue": true}, "leftValue": "={{$('getDriveFileData').item.json.name}}", "rightValue": ""}]}}, "typeVersion": 2.2, "notes": "This if node performs automated tasks as part of the workflow."}, {"id": "01437168-bb55-4308-a83c-a26c0f9c1843", "name": "firstWorkflowJson", "type": "n8n-nodes-base.set", "position": [1000, 720], "parameters": {"mode": "raw", "options": {}, "jsonOutput": "={{ $('Workflow Data').item.json.toJsonString() }}\n"}, "typeVersion": 3.4, "notes": "This set node performs automated tasks as part of the workflow."}, {"id": "7bcb95db-b13b-4bef-9a34-acd1194f6d96", "name": "JsonToFile", "type": "n8n-nodes-base.code", "position": [1180, 720], "parameters": {"jsCode": "return items.map(item => {\n  const jsonData = JSON.stringify(item.json);\n  const binaryData = Buffer.from(jsonData).toString('base64');\n  item.binary = {\n    data: {\n      data: binaryData,\n      mimeType: 'application/json',\n      fileName: 'data.json'\n    }\n  };\n  return item;\n});"}, "typeVersion": 2, "notes": "This code node performs automated tasks as part of the workflow."}, {"id": "efdb7ea6-f4bf-4553-993c-448cd7bb2039", "name": "CodeJsonToFile1", "type": "n8n-nodes-base.code", "position": [1080, 400], "parameters": {"jsCode": "return items.map(item => {\n  const jsonData = JSON.stringify( $('Workflow Data').item.json);\n  const binaryData = Buffer.from(jsonData).toString('base64');\n  item.binary = {\n    data: {\n      data: binaryData,\n      mimeType: 'application/json',\n      fileName: 'data.json'\n    }\n  };\n  return item;\n});"}, "typeVersion": 2, "notes": "This code node performs automated tasks as part of the workflow."}, {"id": "411b1585-4be1-4a92-a54b-64965f0d529d", "name": "Limit", "type": "n8n-nodes-base.limit", "position": [1100, -40], "parameters": {}, "typeVersion": 1, "notes": "This limit node performs automated tasks as part of the workflow."}, {"id": "dcd2e2ee-fc18-47bc-9210-b1b42c270961", "name": "Workflow Data", "type": "n8n-nodes-base.executionData", "position": [-140, 420], "parameters": {}, "typeVersion": 1, "notes": "This executionData node performs automated tasks as part of the workflow."}, {"id": "d243a474-9139-4af4-8134-df815a4af806", "name": "successEmail", "type": "n8n-nodes-base.gmail", "position": [1360, -40], "webhookId": "b6cdbf4b-3abf-4eda-aa49-c19012e3133b", "parameters": {"sendTo": "your email address", "message": "={{ $now.format('yyyy-MM-dd HH:mm') }} workflow backup success.", "options": {}, "subject": "google drive workflow backup success", "emailType": "text"}, "credentials": {"gmailOAuth2": {"id": "3QEYg96F002cbPmf", "name": "out account"}}, "typeVersion": 2.1, "notes": "This gmail node performs automated tasks as part of the workflow."}, {"id": "306a1d38-27ef-4249-956a-cfec30d898b1", "name": "failureEmail", "type": "n8n-nodes-base.gmail", "position": [1620, 420], "webhookId": "f38fba13-3970-43a5-8afd-ea873289015b", "parameters": {"sendTo": "your email address", "message": "={{ $now }} {{ $('Workflow Data').item.json.name }} workflow backup .", "options": {}, "subject": "google drive workflow backup error", "emailType": "text"}, "credentials": {"gmailOAuth2": {"id": "3QEYg96F002cbPmf", "name": "out account"}}, "typeVersion": 2.1, "notes": "This gmail node performs automated tasks as part of the workflow."}, {"id": "544cb91c-4f96-4a84-8db2-9c88e758a1e3", "name": "Sticky Note6", "type": "n8n-nodes-base.stickyNote", "position": [600, -80], "parameters": {"color": 5, "width": 260, "height": 220, "content": "## Set n8n API"}, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow."}, {"id": "84d6b3e9-9f01-40b8-980d-acd2f95d30fe", "name": "Sticky Note7", "type": "n8n-nodes-base.stickyNote", "position": [600, -180], "parameters": {"color": 4, "width": 150, "height": 80, "content": "## Edit this node \ud83d\udc47"}, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow."}, {"id": "a3f1669b-41da-4256-af2c-e556738eabf1", "name": "getDriveFileData", "type": "n8n-nodes-base.googleDrive", "position": [300, 420], "parameters": {"filter": {"folderId": {"__rl": true, "mode": "url", "value": "={{ $('Parameters').item.json.directory }}"}, "whatToSearch": "files"}, "options": {}, "resource": "fileFolder", "returnAll": true, "queryString": "={{  $('Workflow Data').item.json.name + \"_\" + $('Workflow Data').item.json.id+ \".json\"}}"}, "credentials": {"googleDriveOAuth2Api": {"id": "FsjSbb8sdqbZm9dM", "name": "Out"}}, "retryOnFail": true, "typeVersion": 3, "alwaysOutputData": true, "notes": "This googleDrive node performs automated tasks as part of the workflow."}, {"id": "f1771f9e-4153-4595-bbd9-22abfef23c54", "name": "When Executed by Another Workflow", "type": "n8n-nodes-base.executeWorkflowTrigger", "position": [-300, 420], "parameters": {"inputSource": "passthrough"}, "typeVersion": 1.1, "notes": "This executeWorkflowTrigger node performs automated tasks as part of the workflow."}, {"id": "7110911a-c6c6-4ef6-888f-f640784d077b", "name": "Execute Workflow", "type": "n8n-nodes-base.executeWorkflow", "position": [1100, 100], "parameters": {"options": {}, "workflowId": {"__rl": true, "mode": "id", "value": "DfMF9CmVw6FU4hYm"}, "workflowInputs": {"value": {}, "schema": [], "mappingMode": "defineBelow", "matchingColumns": [], "attemptToConvertTypes": false, "convertFieldsToString": true}}, "typeVersion": 1.2, "notes": "This executeWorkflow node performs automated tasks as part of the workflow."}, {"id": "cb5cc7fb-f24f-48be-a175-c24bf830dce2", "name": "Parameters", "type": "n8n-nodes-base.set", "position": [20, 420], "parameters": {"options": {}, "assignments": {"assignments": [{"id": "1b65def6-4984-497d-a4bc-232af22927ad", "name": "directory", "type": "string", "value": "{{ $env.WEBHOOK_URL }}"}, {"id": "c8c98f88-9f22-4574-88b8-1db99f6e4ec4", "name": "parentdrive", "type": "string", "value": "{{ $env.WEBHOOK_URL }}"}]}}, "typeVersion": 3.4, "notes": "This set node performs automated tasks as part of the workflow."}, {"id": "0ab79967-aa4e-4914-abbd-8a60057b083d", "name": "Sticky Note3", "type": "n8n-nodes-base.stickyNote", "position": [-20, 300], "parameters": {"color": 4, "width": 150, "height": 80, "content": "## Edit this node \ud83d\udc47"}, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow."}, {"id": "948c9276-88a7-4d02-85dc-525c4e8b0c01", "name": "Sticky Note10", "type": "n8n-nodes-base.stickyNote", "position": [1240, -100], "parameters": {"width": 340, "height": 220, "content": "## Send complete message"}, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow."}, {"id": "cabf9b91-5a2f-4c8f-ae07-318fca57b54f", "name": "Discord", "type": "n8n-nodes-base.discord", "position": [1360, 80], "webhookId": "65ce702c-8f03-4016-b192-a2503a7fbca7", "parameters": {"content": "={{ $now.format('yyyy-MM-dd HH:mm') }} Google Drive workflow backup success.", "guildId": {"__rl": true, "mode": "list", "value": ""}, "options": {"tts": false}, "resource": "message", "channelId": {"__rl": true, "mode": "list", "value": "1365663078880116756", "cachedResultUrl": "{{ $env.WEBHOOK_URL }}", "cachedResultName": "backup-status"}}, "credentials": {"discordBotApi": {"id": "hm4HwPUEF07pmkj0", "name": "Discord Bot account"}}, "typeVersion": 2, "notes": "This discord node performs automated tasks as part of the workflow."}, {"id": "ea46a8fb-5a43-400e-85d6-602ef1c68c5e", "name": "Sticky Note8", "type": "n8n-nodes-base.stickyNote", "position": [20, -280], "parameters": {"color": 7, "width": 370, "height": 480, "content": "## \u91cd\u8981\uff01 \ud83d\udc47\n\n**\u555f\u52d5\u524d\uff1a **\n\n### \u4f5c\u8005\u8cc7\u8a0a\u8207\u8cc7\u6e90\n\u4f5c\u8005\uff1aHochien Chang\nYouTube \u983b\u9053\uff1a[HC AI\u8aaa\u4eba\u8a71]({{ $env.WEBHOOK_URL }}\n\u8aaa\u660e\u5f71\u7247\u9023\u7d50\uff1a {{ $env.WEBHOOK_URL }}\n\n1.  **\u66f4\u65b0\u8a8d\u8b49\uff1a** \u78ba\u8a8d\u5df2\u8a2d\u5b9a\u300cGoogle Drive OAuth2 API\u300d\u8a8d\u8b49\u3002\n2.  **\u8a2d\u5b9a\u53c3\u6578\uff1a** \u7de8\u8f2f\u300c\u53c3\u6578\u300d\u7bc0\u9ede\uff0c\u8a2d\u5b9a\u6240\u9700\u7684 Google Drive \u8cc7\u6599\u593e URL\u3002\n3.  **\u8a2d\u5b9a\u96fb\u5b50\u90f5\u4ef6\uff1a** \u4f7f\u7528\u60a8\u7684\u6536\u4ef6\u8005\u96fb\u5b50\u90f5\u4ef6\u5730\u5740\u66f4\u65b0\u300cGmail\u300d\u7bc0\u9ede\u3002\n\n\n\u53c3\u8003\u5de5\u4f5c\u6d41\uff1a{{ $env.WEBHOOK_URL }}"}, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow."}, {"id": "af7f9d0e-6ce4-4277-801d-92bf05a424d6", "name": "Sticky Note9", "type": "n8n-nodes-base.stickyNote", "position": [-380, -280], "parameters": {"color": 7, "width": 390, "height": 480, "content": "### IMPORTANT! \ud83d\udc47\n\n**Before activating:**\n### Author Information and Resources\nCreator\uff1aHochien Chang\nYouTube \u983b\u9053\uff1a[HC HumanizeAI](www.youtube.com/@HC-HumanizeAI)\nExplanation Video Link: {{ $env.WEBHOOK_URL }}\n\n1.  **Update Credentials:** Ensure 'Google Drive OAuth2 API' credentials are set up.\n2.  **Configure Parameters:** Edit the 'Parameters' node to set your desired Google Drive folder URL.\n3.  **Set Email:** Update the 'Gmail' nodes with your recipient email address.\n\n\nBase on: {{ $env.WEBHOOK_URL }}"}, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow."}, {"id": "f24c9b0c-1bf4-40dc-9492-8c452e5d9905", "name": "Sticky Note", "type": "n8n-nodes-base.stickyNote", "position": [920, 600], "parameters": {"color": 3, "width": 620, "height": 300, "content": "## \u65b0\u5de5\u4f5c\u6d41\u4e0a\u50b3\n## New Workflow upload\ud83d\udc47"}, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow."}, {"id": "dac5bca9-9d7f-4131-a563-9115bf0528cc", "name": "Sticky Note11", "type": "n8n-nodes-base.stickyNote", "position": [920, 300], "parameters": {"color": 6, "width": 620, "height": 280, "content": "## \u73fe\u6709\u5de5\u4f5c\u6d41\u66f4\u65b0\n## existing Workflow update\ud83d\udc47"}, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow."}, {"id": "6d126534-8b9b-4935-bce7-471ecc931e83", "name": "Sticky Note12", "type": "n8n-nodes-base.stickyNote", "position": [140, 300], "parameters": {"width": 440, "height": 280, "content": "## \u53d6\u5f97 Google Drive \u73fe\u6709\u7684\u6a94\u6848\u8cc7\u8a0a\n## Get Google Drive existing file info\ud83d\udc47"}, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow."}, {"id": "2ed623f4-faca-40ea-9ace-ab6d0933f6ba", "name": "Sticky Note13", "type": "n8n-nodes-base.stickyNote", "position": [580, 300], "parameters": {"color": 4, "width": 320, "height": 280, "content": "## \u78ba\u8a8d\u662f\u5426\u70ba\u7b2c\u4e00\u6b21\u5099\u4efd\n## Only for initialing\ud83d\udc47"}, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow."}, {"id": "46f0dbdc-4023-426c-b87b-3431817981c0", "name": "Sticky Note14", "type": "n8n-nodes-base.stickyNote", "disabled": true, "position": [-380, -380], "parameters": {"color": 6, "width": 760, "height": 80, "content": "# HC AI \u8aaa\u4eba\u8a71"}, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow."}, {"id": "error-9886af4b", "name": "Error Handler", "type": "n8n-nodes-base.stopAndError", "typeVersion": 1, "position": [1000, 400], "parameters": {"message": "Workflow execution error", "options": {}}}], "pinData": {}, "connections": {"b23cd260-8e68-42e7-935c-a658ae35cccd": {"main": [[{"node": "error-handler-b23cd260-8e68-42e7-935c-a658ae35cccd-3075b152", "type": "main", "index": 0}]]}, "ddee56fd-8610-4cae-9ae0-76e58e7fd111": {"main": [[{"node": "error-handler-ddee56fd-8610-4cae-9ae0-76e58e7fd111-961cffdd", "type": "main", "index": 0}]]}, "a3f1669b-41da-4256-af2c-e556738eabf1": {"main": [[{"node": "error-handler-a3f1669b-41da-4256-af2c-e556738eabf1-b26c2b86", "type": "main", "index": 0}]]}, "cabf9b91-5a2f-4c8f-ae07-318fca57b54f": {"main": [[{"node": "error-handler-cabf9b91-5a2f-4c8f-ae07-318fca57b54f-70478c44", "type": "main", "index": 0}]]}}, "name": "Scheduletrigger Workflow", "settings": {"executionOrder": "v1", "saveManualExecutions": true, "callerPolicy": "workflowsFromSameOwner", "errorWorkflow": null, "timezone": "UTC", "executionTimeout": 3600, "maxExecutions": 1000, "retryOnFail": true, "retryCount": 3, "retryDelay": 1000}, "description": "Automated workflow: Scheduletrigger Workflow. This workflow integrates 15 different services: stickyNote, executionData, code, scheduleTrigger, n8n. It contains 33 nodes and follows best practices for error handling and security.", "tags": ["automation", "n8n", "production-ready", "excellent", "optimized"], "notes": "Excellent quality workflow: Scheduletrigger Workflow. This workflow has been optimized for production use with comprehensive error handling, security, and documentation."}