This workflow follows the Google Drive → Google Sheets recipe pattern — see all workflows that pair these two integrations.
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 →
{
"name": "WF05-\ubb38\uc11c\ub0b4\ubcf4\ub0b4\uae30",
"id": "wf05ExportDoc",
"description": "\ud2b9\ud5c8 \uba85\uc138\uc11c DOCX/PDF/Markdown \ubb38\uc11c \uc0dd\uc131 \ubc0f \ub2e4\uc6b4\ub85c\ub4dc \uc6cc\ud06c\ud50c\ub85c\uc6b0 - Google Drive Export \ud65c\uc6a9",
"active": false,
"nodes": [
{
"id": "webhook-trigger",
"name": "\ub0b4\ubcf4\ub0b4\uae30 \uc694\uccad Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
0,
0
],
"parameters": {
"httpMethod": "POST",
"path": "wf05-export-document",
"responseMode": "responseNode"
}
},
{
"id": "parse-request",
"name": "\uc694\uccad \ud30c\uc2f1",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
220,
0
],
"parameters": {
"jsCode": "const body = $input.first().json.body;\nreturn {\n patentId: body.patentId,\n format: body.format || 'docx',\n includeDrawings: body.includeDrawings ?? true,\n includeMetadata: body.includeMetadata ?? true,\n watermark: body.watermark ?? false,\n template: body.template || 'standard'\n};"
}
},
{
"id": "get-patent-data",
"name": "Google Sheets \ud2b9\ud5c8 \ub370\uc774\ud130 \uc870\ud68c",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.5,
"position": [
440,
0
],
"parameters": {
"operation": "read",
"documentId": {
"__rl": true,
"value": "={{ $vars.GOOGLE_SHEETS_TRACKING_ID }}",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "\uc81c\ucd9c\uc774\ub825",
"mode": "name"
},
"options": {}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"id": "filter-patent",
"name": "\ud2b9\ud5c8 ID \ud544\ud130\ub9c1",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
660,
0
],
"parameters": {
"jsCode": "const patentId = $('\uc694\uccad \ud30c\uc2f1').item.json.patentId;\nconst allItems = $input.all();\n\n// Patent ID\ub85c \ud544\ud130\ub9c1\nconst matchingItem = allItems.find(item => \n item.json['Patent ID'] === patentId || \n item.json['patent_id'] === patentId ||\n item.json['patentId'] === patentId\n);\n\nif (!matchingItem) {\n throw new Error(`Patent not found: ${patentId}`);\n}\n\nreturn {\n patentId: patentId,\n title: matchingItem.json['\ubc1c\uba85\uc758 \uba85\uce6d'] || matchingItem.json['title'] || '\ud2b9\ud5c8 \uba85\uc138\uc11c',\n fileId: matchingItem.json['\uba85\uc138\uc11c \ud30c\uc77c ID'] || matchingItem.json['fileId'],\n status: matchingItem.json['\uc0c1\ud0dc'] || matchingItem.json['status'],\n format: $('\uc694\uccad \ud30c\uc2f1').item.json.format,\n includeMetadata: $('\uc694\uccad \ud30c\uc2f1').item.json.includeMetadata\n};"
}
},
{
"id": "validate-file-id",
"name": "\ud30c\uc77c ID \uac80\uc99d",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
880,
0
],
"parameters": {
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"leftValue": "={{ $json.fileId }}",
"rightValue": "",
"operator": {
"type": "string",
"operation": "notEmpty"
}
}
]
}
}
},
{
"id": "error-no-file",
"name": "\ud30c\uc77c \uc5c6\uc74c \uc5d0\ub7ec",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
1100,
150
],
"parameters": {
"respondWith": "json",
"responseBody": "={\n \"success\": false,\n \"error\": \"FILE_NOT_FOUND\",\n \"message\": \"\uba85\uc138\uc11c \ud30c\uc77c\uc774 \uc544\uc9c1 \uc0dd\uc131\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4. \uba3c\uc800 WF03\uc744 \ud1b5\ud574 \uba85\uc138\uc11c\ub97c \uc0dd\uc131\ud574\uc8fc\uc138\uc694.\",\n \"patentId\": \"{{ $json.patentId }}\"\n}",
"options": {
"responseCode": 404
}
}
},
{
"id": "format-router",
"name": "\ucd9c\ub825 \ud615\uc2dd \ub77c\uc6b0\ud130",
"type": "n8n-nodes-base.switch",
"typeVersion": 3,
"position": [
1100,
-100
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "docx",
"conditions": {
"conditions": [
{
"leftValue": "={{ $json.format }}",
"rightValue": "docx",
"operator": {
"type": "string",
"operation": "equals"
}
}
]
}
},
{
"outputKey": "pdf",
"conditions": {
"conditions": [
{
"leftValue": "={{ $json.format }}",
"rightValue": "pdf",
"operator": {
"type": "string",
"operation": "equals"
}
}
]
}
},
{
"outputKey": "markdown",
"conditions": {
"conditions": [
{
"leftValue": "={{ $json.format }}",
"rightValue": "markdown",
"operator": {
"type": "string",
"operation": "equals"
}
}
]
}
},
{
"outputKey": "hwp",
"conditions": {
"conditions": [
{
"leftValue": "={{ $json.format }}",
"rightValue": "hwp",
"operator": {
"type": "string",
"operation": "equals"
}
}
]
}
}
]
}
}
},
{
"id": "export-docx",
"name": "DOCX \ub0b4\ubcf4\ub0b4\uae30",
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
1320,
-250
],
"parameters": {
"operation": "download",
"fileId": {
"__rl": true,
"value": "={{ $json.fileId }}",
"mode": "id"
},
"options": {
"googleFileConversion": {
"conversion": {
"docsToFormat": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
}
},
"fileName": "={{ $json.patentId }}_\uba85\uc138\uc11c.docx"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"id": "export-pdf",
"name": "PDF \ub0b4\ubcf4\ub0b4\uae30",
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
1320,
-100
],
"parameters": {
"operation": "download",
"fileId": {
"__rl": true,
"value": "={{ $json.fileId }}",
"mode": "id"
},
"options": {
"googleFileConversion": {
"conversion": {
"docsToFormat": "application/pdf"
}
},
"fileName": "={{ $json.patentId }}_\uba85\uc138\uc11c.pdf"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"id": "export-text",
"name": "\ud14d\uc2a4\ud2b8 \ub0b4\ubcf4\ub0b4\uae30",
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
1320,
50
],
"parameters": {
"operation": "download",
"fileId": {
"__rl": true,
"value": "={{ $json.fileId }}",
"mode": "id"
},
"options": {
"googleFileConversion": {
"conversion": {
"docsToFormat": "text/plain"
}
},
"fileName": "={{ $json.patentId }}_\uba85\uc138\uc11c.txt"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"id": "convert-to-markdown",
"name": "Markdown \ubcc0\ud658",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1540,
50
],
"parameters": {
"jsCode": "// \ud14d\uc2a4\ud2b8\ub97c Markdown \ud615\uc2dd\uc73c\ub85c \ubcc0\ud658\nconst binaryData = $input.first().binary;\nconst patentId = $('\ud2b9\ud5c8 ID \ud544\ud130\ub9c1').item.json.patentId;\nconst title = $('\ud2b9\ud5c8 ID \ud544\ud130\ub9c1').item.json.title;\n\nlet textContent = '';\n\n// \ubc14\uc774\ub108\ub9ac \ub370\uc774\ud130\uc5d0\uc11c \ud14d\uc2a4\ud2b8 \ucd94\ucd9c\nif (binaryData && binaryData.data) {\n const buffer = Buffer.from(binaryData.data.data, 'base64');\n textContent = buffer.toString('utf-8');\n} else {\n textContent = '# ' + title + '\\n\\n\ub0b4\uc6a9\uc744 \ubd88\ub7ec\uc62c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.';\n}\n\n// Markdown \ud615\uc2dd\uc73c\ub85c \ud3ec\ub9f7\ud305\nconst markdownContent = `# ${title}\\n\\n${textContent}`;\n\n// \ubc14\uc774\ub108\ub9ac \ub370\uc774\ud130\ub85c \ubc18\ud658\nconst outputBuffer = Buffer.from(markdownContent, 'utf-8');\n\nreturn {\n json: {\n patentId: patentId,\n filename: `${patentId}_\uba85\uc138\uc11c.md`,\n mimeType: 'text/markdown'\n },\n binary: {\n data: {\n data: outputBuffer.toString('base64'),\n mimeType: 'text/markdown',\n fileName: `${patentId}_\uba85\uc138\uc11c.md`\n }\n }\n};"
}
},
{
"id": "hwp-not-supported",
"name": "HWP \ubbf8\uc9c0\uc6d0 \uc751\ub2f5",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
1320,
200
],
"parameters": {
"respondWith": "json",
"responseBody": "={\n \"success\": false,\n \"error\": \"FORMAT_NOT_SUPPORTED\",\n \"message\": \"HWP \ud615\uc2dd\uc740 \ud604\uc7ac \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. DOCX \ub610\ub294 PDF \ud615\uc2dd\uc744 \uc0ac\uc6a9\ud574\uc8fc\uc138\uc694.\",\n \"supportedFormats\": [\"docx\", \"pdf\", \"markdown\"]\n}",
"options": {
"responseCode": 400
}
}
},
{
"id": "set-docx-metadata",
"name": "DOCX \uba54\ud0c0\ub370\uc774\ud130 \uc124\uc815",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1540,
-250
],
"parameters": {
"mode": "manual",
"duplicateItem": false,
"assignments": {
"assignments": [
{
"id": "filename",
"name": "filename",
"value": "={{ $('\ud2b9\ud5c8 ID \ud544\ud130\ub9c1').item.json.patentId }}_\uba85\uc138\uc11c.docx",
"type": "string"
},
{
"id": "mimeType",
"name": "mimeType",
"value": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"type": "string"
},
{
"id": "patentId",
"name": "patentId",
"value": "={{ $('\ud2b9\ud5c8 ID \ud544\ud130\ub9c1').item.json.patentId }}",
"type": "string"
}
]
},
"includeOtherFields": true
}
},
{
"id": "set-pdf-metadata",
"name": "PDF \uba54\ud0c0\ub370\uc774\ud130 \uc124\uc815",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1540,
-100
],
"parameters": {
"mode": "manual",
"duplicateItem": false,
"assignments": {
"assignments": [
{
"id": "filename",
"name": "filename",
"value": "={{ $('\ud2b9\ud5c8 ID \ud544\ud130\ub9c1').item.json.patentId }}_\uba85\uc138\uc11c.pdf",
"type": "string"
},
{
"id": "mimeType",
"name": "mimeType",
"value": "application/pdf",
"type": "string"
},
{
"id": "patentId",
"name": "patentId",
"value": "={{ $('\ud2b9\ud5c8 ID \ud544\ud130\ub9c1').item.json.patentId }}",
"type": "string"
}
]
},
"includeOtherFields": true
}
},
{
"id": "merge-formats",
"name": "\uacb0\uacfc \ubcd1\ud569",
"type": "n8n-nodes-base.merge",
"typeVersion": 3,
"position": [
1760,
-100
],
"parameters": {
"mode": "chooseBranch",
"output": "all"
}
},
{
"id": "upload-to-exports",
"name": "Exports \ud3f4\ub354\uc5d0 \uc5c5\ub85c\ub4dc",
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
1980,
-100
],
"parameters": {
"operation": "upload",
"folderId": {
"__rl": true,
"value": "={{ $vars.GOOGLE_DRIVE_EXPORTS_FOLDER_ID }}",
"mode": "id"
},
"name": "={{ $json.filename }}",
"inputDataFieldName": "data"
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"id": "prepare-success-response",
"name": "\uc131\uacf5 \uc751\ub2f5 \uc900\ube44",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
2200,
-100
],
"parameters": {
"mode": "raw",
"jsonOutput": "={\n \"success\": true,\n \"downloadUrl\": \"{{ $json.webContentLink }}\",\n \"driveUrl\": \"{{ $json.webViewLink }}\",\n \"fileId\": \"{{ $json.id }}\",\n \"filename\": \"{{ $('\uacb0\uacfc \ubcd1\ud569').item.json.filename }}\",\n \"format\": \"{{ $('\uc694\uccad \ud30c\uc2f1').item.json.format }}\",\n \"message\": \"\ubb38\uc11c\uac00 \uc131\uacf5\uc801\uc73c\ub85c \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4.\"\n}"
}
},
{
"id": "respond-success",
"name": "\uc131\uacf5 \uc751\ub2f5",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
2420,
-100
],
"parameters": {
"respondWith": "json",
"responseBody": "={{ $json }}"
}
}
],
"connections": {
"\ub0b4\ubcf4\ub0b4\uae30 \uc694\uccad Webhook": {
"main": [
[
{
"node": "\uc694\uccad \ud30c\uc2f1",
"type": "main",
"index": 0
}
]
]
},
"\uc694\uccad \ud30c\uc2f1": {
"main": [
[
{
"node": "Google Sheets \ud2b9\ud5c8 \ub370\uc774\ud130 \uc870\ud68c",
"type": "main",
"index": 0
}
]
]
},
"Google Sheets \ud2b9\ud5c8 \ub370\uc774\ud130 \uc870\ud68c": {
"main": [
[
{
"node": "\ud2b9\ud5c8 ID \ud544\ud130\ub9c1",
"type": "main",
"index": 0
}
]
]
},
"\ud2b9\ud5c8 ID \ud544\ud130\ub9c1": {
"main": [
[
{
"node": "\ud30c\uc77c ID \uac80\uc99d",
"type": "main",
"index": 0
}
]
]
},
"\ud30c\uc77c ID \uac80\uc99d": {
"main": [
[
{
"node": "\ucd9c\ub825 \ud615\uc2dd \ub77c\uc6b0\ud130",
"type": "main",
"index": 0
}
],
[
{
"node": "\ud30c\uc77c \uc5c6\uc74c \uc5d0\ub7ec",
"type": "main",
"index": 0
}
]
]
},
"\ucd9c\ub825 \ud615\uc2dd \ub77c\uc6b0\ud130": {
"main": [
[
{
"node": "DOCX \ub0b4\ubcf4\ub0b4\uae30",
"type": "main",
"index": 0
}
],
[
{
"node": "PDF \ub0b4\ubcf4\ub0b4\uae30",
"type": "main",
"index": 0
}
],
[
{
"node": "\ud14d\uc2a4\ud2b8 \ub0b4\ubcf4\ub0b4\uae30",
"type": "main",
"index": 0
}
],
[
{
"node": "HWP \ubbf8\uc9c0\uc6d0 \uc751\ub2f5",
"type": "main",
"index": 0
}
]
]
},
"DOCX \ub0b4\ubcf4\ub0b4\uae30": {
"main": [
[
{
"node": "DOCX \uba54\ud0c0\ub370\uc774\ud130 \uc124\uc815",
"type": "main",
"index": 0
}
]
]
},
"PDF \ub0b4\ubcf4\ub0b4\uae30": {
"main": [
[
{
"node": "PDF \uba54\ud0c0\ub370\uc774\ud130 \uc124\uc815",
"type": "main",
"index": 0
}
]
]
},
"\ud14d\uc2a4\ud2b8 \ub0b4\ubcf4\ub0b4\uae30": {
"main": [
[
{
"node": "Markdown \ubcc0\ud658",
"type": "main",
"index": 0
}
]
]
},
"DOCX \uba54\ud0c0\ub370\uc774\ud130 \uc124\uc815": {
"main": [
[
{
"node": "\uacb0\uacfc \ubcd1\ud569",
"type": "main",
"index": 0
}
]
]
},
"PDF \uba54\ud0c0\ub370\uc774\ud130 \uc124\uc815": {
"main": [
[
{
"node": "\uacb0\uacfc \ubcd1\ud569",
"type": "main",
"index": 1
}
]
]
},
"Markdown \ubcc0\ud658": {
"main": [
[
{
"node": "\uacb0\uacfc \ubcd1\ud569",
"type": "main",
"index": 2
}
]
]
},
"\uacb0\uacfc \ubcd1\ud569": {
"main": [
[
{
"node": "Exports \ud3f4\ub354\uc5d0 \uc5c5\ub85c\ub4dc",
"type": "main",
"index": 0
}
]
]
},
"Exports \ud3f4\ub354\uc5d0 \uc5c5\ub85c\ub4dc": {
"main": [
[
{
"node": "\uc131\uacf5 \uc751\ub2f5 \uc900\ube44",
"type": "main",
"index": 0
}
]
]
},
"\uc131\uacf5 \uc751\ub2f5 \uc900\ube44": {
"main": [
[
{
"node": "\uc131\uacf5 \uc751\ub2f5",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"meta": {
"version": "2.0.0",
"created": "2026-01-15",
"updated": "2026-01-16",
"project": "MAIPatent",
"workflow_sequence": 5,
"supported_formats": [
"docx",
"pdf",
"markdown"
],
"unsupported_formats": [
"hwp"
],
"implementation_notes": [
"Google Drive Export API\ub97c \ud65c\uc6a9\ud558\uc5ec Google Docs \ubb38\uc11c\ub97c DOCX/PDF\ub85c \ubcc0\ud658",
"\uc2e4\uc81c \ubc14\uc774\ub108\ub9ac \ud30c\uc77c \uc0dd\uc131 - Mock \ub370\uc774\ud130 \uc544\ub2d8",
"HWP \ud615\uc2dd\uc740 Google API\uc5d0\uc11c \uc9c0\uc6d0\ud558\uc9c0 \uc54a\uc544 \ubbf8\uc9c0\uc6d0 \ucc98\ub9ac",
"Exports \ud3f4\ub354\uc5d0 \ud30c\uc77c \uc800\uc7a5 \ud6c4 \ub2e4\uc6b4\ub85c\ub4dc URL \ubc18\ud658"
],
"dependencies": {
"google_drive_oauth": "Google Drive API v3 with OAuth2",
"google_sheets_oauth": "Google Sheets API v4 with OAuth2"
},
"error_handling": {
"file_not_found": "404 - \uba85\uc138\uc11c \ud30c\uc77c \ubbf8\uc874\uc7ac \uc2dc \uc548\ub0b4 \uba54\uc2dc\uc9c0",
"unsupported_format": "400 - HWP \uc694\uccad \uc2dc \uc9c0\uc6d0 \ud615\uc2dd \uc548\ub0b4"
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googleDriveOAuth2ApigoogleSheetsOAuth2Api
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
WF05-문서내보내기. Uses googleSheets, googleDrive. Webhook trigger; 18 nodes.
Source: https://github.com/jini92/MAIPatent/blob/c9040f7443cbcd6380a646aa203f93d3b4f15767/workflows/WF05-document-export.json — 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.
Resume Screening & Behavioral Interviews with Gemini, Elevenlabs, & Notion ATS copy. Uses googleDrive, httpRequest, notion, formTrigger. Webhook trigger; 67 nodes.
Transform your n8n instance management with this advanced automation system featuring artificial intelligence-driven workflow selection. This template provides comprehensive maintenance operations wit
Convalidaciones Académicas - Estructura Base. Uses googleSheets, emailSend, googleDrive, httpRequest. Webhook trigger; 35 nodes.
TrackCollect. Uses googleSheets, httpRequest, @n-octo-n/n8n-nodes-json-database, moveBinaryData. Webhook trigger; 31 nodes.
FlowV4. Uses googleSheets, emailSend, googleDrive, httpRequest. Webhook trigger; 31 nodes.