Skip to content

Instantly share code, notes, and snippets.

@kaochenlong
Last active October 9, 2025 00:34
Show Gist options
  • Select an option

  • Save kaochenlong/497300c51695b691edc409a2f77f83c0 to your computer and use it in GitHub Desktop.

Select an option

Save kaochenlong/497300c51695b691edc409a2f77f83c0 to your computer and use it in GitHub Desktop.
Form with file upload
{
"nodes": [
{
"parameters": {
"formTitle": "照片上傳",
"formDescription": "上傳上傳上傳上傳上傳趕快上傳!",
"formFields": {
"values": [
{
"fieldLabel": "photo",
"fieldType": "file",
"multipleFiles": false,
"acceptFileTypes": ".jpg, .png",
"requiredField": true
}
]
},
"options": {
"appendAttribution": false,
"buttonLabel": "上傳"
}
},
"type": "n8n-nodes-base.formTrigger",
"typeVersion": 2.3,
"position": [
16,
-64
],
"id": "09e327d7-7e3f-49a7-9b26-7df62c397b01",
"name": "On form submission",
"webhookId": "d379fe92-a95c-4ada-ba19-fbd25ae09a08"
},
{
"parameters": {
"inputDataFieldName": "=photo",
"name": "={{ $execution.id }}-{{ $binary.photo.fileName }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"folderId": {
"__rl": true,
"value": "1r3ZlOMqqhBjA7FyW4tF8Bgwk71w75jtS",
"mode": "list",
"cachedResultName": "測試上傳用",
"cachedResultUrl": "https://drive.google.com/drive/folders/1r3ZlOMqqhBjA7FyW4tF8Bgwk71w75jtS"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
240,
-64
],
"id": "90544c5b-be57-4792-99f4-dfec8922e7a9",
"name": "Upload file",
"credentials": {
"googleDriveOAuth2Api": {
"id": "kxzZUuaFbhZylPJc",
"name": "Google Drive (hello.n8n)"
}
}
},
{
"parameters": {
"operation": "completion",
"completionTitle": "上傳成功!",
"options": {}
},
"type": "n8n-nodes-base.form",
"typeVersion": 2.3,
"position": [
448,
-64
],
"id": "9bd02f63-ab8a-4f05-9775-dd4b9c69a2c5",
"name": "Form",
"webhookId": "583f4d4a-afcc-4351-8710-5ae32b14777b"
}
],
"connections": {
"On form submission": {
"main": [
[
{
"node": "Upload file",
"type": "main",
"index": 0
}
]
]
},
"Upload file": {
"main": [
[
{
"node": "Form",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "a4125682c20e4885d54c90e728387d401957cac8b9d73202358c5f56444d368b"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment