8
n8n 中文网amn8n.com

使用Google Drive和DeepL将文档翻译成多种语言

高级

这是一个Document Extraction, Multimodal AI领域的自动化工作流,包含 32 个节点。主要使用 If, Set, Code, DeepL, Gmail 等节点。 使用Google Drive和DeepL将文档翻译成多种语言

前置要求
  • Google 账号和 Gmail API 凭证
  • Notion API Key
  • Google Drive API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "E9uHD7LTZmehWToP",
  "meta": {
    "instanceId": "062f0e1ec3617ffb26cbc1b3c3518f28f3e57f08ddc210c471f532bb0bd6cf07"
  },
  "name": "使用 Google Drive 和 DeepL 将文档翻译成多种语言",
  "tags": [],
  "nodes": [
    {
      "id": "83cdf376-b378-4a69-926d-29790f0c5053",
      "name": "Google Drive 触发器",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        384,
        240
      ],
      "parameters": {
        "event": "fileCreated",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_SOURCE_FOLDER_ID_HERE"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5a1fd22d-b09a-4bfc-8260-557ea3ccf7c1",
      "name": "配置(在此编辑)",
      "type": "n8n-nodes-base.set",
      "notes": "翻訳先言語、フォルダID、通知先メールアドレスをここで設定",
      "position": [
        608,
        320
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "source_folder_id",
              "name": "sourceFolderId",
              "type": "string",
              "value": "YOUR_SOURCE_FOLDER_ID_HERE"
            },
            {
              "id": "destination_folder_id",
              "name": "destinationFolderId",
              "type": "string",
              "value": "YOUR_DESTINATION_FOLDER_ID_HERE"
            },
            {
              "id": "target_languages",
              "name": "targetLanguages",
              "type": "array",
              "value": "=[\"EN\", \"ZH\", \"KO\", \"ES\", \"FR\", \"DE\"]"
            },
            {
              "id": "notification_email",
              "name": "notificationEmail",
              "type": "string",
              "value": "your-email@example.com"
            },
            {
              "id": "enable_notion",
              "name": "enableNotion",
              "type": "boolean",
              "value": "=false"
            },
            {
              "id": "notion_database_id",
              "name": "notionDatabaseId",
              "type": "string",
              "value": "YOUR_NOTION_DATABASE_ID_HERE"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "ae46edbf-2890-46e1-b771-96e3b869b95e",
      "name": "检测文件格式",
      "type": "n8n-nodes-base.switch",
      "position": [
        1040,
        224
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "PDF",
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "pdf_check",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.mimeType }}",
                    "rightValue": "application/pdf"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "DOCX",
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "or",
                "conditions": [
                  {
                    "id": "docx_check",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.mimeType }}",
                    "rightValue": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
                  },
                  {
                    "id": "gdoc_check",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.mimeType }}",
                    "rightValue": "application/vnd.google-apps.document"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "TXT",
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "txt_check",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.mimeType }}",
                    "rightValue": "text/plain"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Markdown",
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "or",
                "conditions": [
                  {
                    "id": "md_check",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.mimeType }}",
                    "rightValue": "text/markdown"
                  },
                  {
                    "id": "md_ext_check",
                    "operator": {
                      "type": "string",
                      "operation": "endsWith"
                    },
                    "leftValue": "={{ $json.name }}",
                    "rightValue": ".md"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "2c694bdd-9d2c-4812-998f-ec9f02840a03",
      "name": "下载 PDF",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1280,
        96
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {
          "googleFileConversion": {
            "conversion": {}
          }
        },
        "operation": "download"
      },
      "typeVersion": 3
    },
    {
      "id": "bc2dbb61-1fa5-47f9-a31c-64271a3c2566",
      "name": "下载 DOCX",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1280,
        240
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {
          "googleFileConversion": {
            "conversion": {}
          }
        },
        "operation": "download"
      },
      "typeVersion": 3
    },
    {
      "id": "4a72a576-533f-4ebb-bacf-1bb320e3fb37",
      "name": "下载 TXT",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1280,
        384
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {},
        "operation": "download"
      },
      "typeVersion": 3
    },
    {
      "id": "9aee4e13-7167-4ec3-a58e-2cb4335304a1",
      "name": "下载 Markdown",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1280,
        544
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {},
        "operation": "download"
      },
      "typeVersion": 3
    },
    {
      "id": "acce4e6b-5e61-47e2-bce0-9ab7e3ada23e",
      "name": "从 PDF 提取文本",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1504,
        96
      ],
      "parameters": {
        "options": {},
        "operation": "pdf"
      },
      "typeVersion": 1
    },
    {
      "id": "b53b7314-5093-48ef-abf8-5dcf95671b03",
      "name": "从 DOCX 提取文本",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1504,
        240
      ],
      "parameters": {
        "options": {},
        "operation": "text",
        "destinationKey": "text"
      },
      "typeVersion": 1
    },
    {
      "id": "a5a5fb92-b2d0-4e54-90d8-ea3b8774e9ea",
      "name": "格式化文本数据",
      "type": "n8n-nodes-base.set",
      "position": [
        1728,
        240
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "extracted_text",
              "name": "extractedText",
              "type": "string",
              "value": "YOUR_FOLDER_ID_HERE"
            },
            {
              "id": "original_filename",
              "name": "originalFilename",
              "type": "string",
              "value": "YOUR_FOLDER_ID_HERE"
            },
            {
              "id": "file_extension",
              "name": "fileExtension",
              "type": "string",
              "value": "YOUR_FOLDER_ID_HERE"
            },
            {
              "id": "da59a266-c54d-4465-8861-e0a9a0653c58",
              "name": "targetLanguages",
              "type": "array",
              "value": "YOUR_FOLDER_ID_HERE"
            },
            {
              "id": "a89d12ba-2143-483a-95b2-3478e4b9aa98",
              "name": "destinationFolderId",
              "type": "string",
              "value": "YOUR_FOLDER_ID_HERE"
            },
            {
              "id": "d3252026-1b16-4ebd-a3d0-8c69bc4c8cbb",
              "name": "notificationEmail",
              "type": "string",
              "value": "YOUR_FOLDER_ID_HERE"
            },
            {
              "id": "e75b9594-07de-456d-84ca-305b051a0574",
              "name": "enableNotion",
              "type": "boolean",
              "value": "YOUR_FOLDER_ID_HERE"
            },
            {
              "id": "a79fefa4-8682-4919-b3ed-b2d4c07fdf4c",
              "name": "notionDatabaseId",
              "type": "string",
              "value": "YOUR_FOLDER_ID_HERE"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.3
    },
    {
      "id": "558fedb8-9449-45cc-a33c-d55801b585e2",
      "name": "按语言拆分",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1936,
        240
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "=targetLanguages"
      },
      "typeVersion": 1,
      "alwaysOutputData": false
    },
    {
      "id": "dae4d4f7-9246-4797-bb73-52aea5aef0aa",
      "name": "生成文件名",
      "type": "n8n-nodes-base.set",
      "position": [
        2384,
        224
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "translated_text",
              "name": "translatedText",
              "type": "string",
              "value": "={{ $json.text }}"
            },
            {
              "id": "language_code",
              "name": "languageCode",
              "type": "string",
              "value": "YOUR_FOLDER_ID_HERE"
            },
            {
              "id": "new_filename",
              "name": "newFilename",
              "type": "string",
              "value": "YOUR_FOLDER_ID_HERE"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "2b2331bc-4f3f-4cee-9fa0-0a5c33ace38f",
      "name": "创建翻译文件",
      "type": "n8n-nodes-base.writeBinaryFile",
      "position": [
        2816,
        224
      ],
      "parameters": {
        "options": {},
        "fileName": "={{ $json.newFilename }}",
        "dataPropertyName": "=data"
      },
      "typeVersion": 1
    },
    {
      "id": "4d893749-ce0a-404c-ad21-aef61c3183dd",
      "name": "保存到 Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        3040,
        224
      ],
      "parameters": {
        "name": "={{ $json.newFilename }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_FOLDER_ID_HERE"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_FOLDER_ID_HERE",
          "cachedResultName": "翻訳済み"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "de276bf8-db41-4ee9-89a8-12a7a986fdd4",
      "name": "检查是否启用 Notion",
      "type": "n8n-nodes-base.if",
      "position": [
        3264,
        224
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "notion_enabled",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.enableNotion }}",
              "rightValue": true
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "c1498c5a-fd1a-4d61-a5e5-5433cc88dabc",
      "name": "在 Notion 中记录",
      "type": "n8n-nodes-base.notion",
      "position": [
        3488,
        96
      ],
      "parameters": {
        "title": "={{ $json.originalFilename }}",
        "options": {},
        "resource": "databasePage",
        "databaseId": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_FOLDER_ID_HERE"
        },
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "=={{ $json.originalFilename }}"
            },
            {
              "key": "=={{ $json.languageCode }}"
            },
            {
              "key": "=={{ $now.toISO() }}"
            },
            {
              "key": "=={{ $json.webViewLink }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ae061349-3976-44bb-81f8-a7ae53b283f9",
      "name": "合并结果",
      "type": "n8n-nodes-base.merge",
      "position": [
        3744,
        224
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combinationMode": "mergeByPosition"
      },
      "typeVersion": 2.1
    },
    {
      "id": "bce4bc57-8a20-4b53-b470-c8fe0df34d33",
      "name": "聚合翻译结果",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        3936,
        224
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "a4898c8f-8fdc-4374-b8e4-eb0e1870bdb1",
      "name": "准备通知",
      "type": "n8n-nodes-base.set",
      "position": [
        4128,
        224
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "summary",
              "name": "summary",
              "type": "object",
              "value": {
                "timestamp": "={{ $now.toISO() }}",
                "originalFile": "={{ $('テキスト整形').item.json.originalFilename }}",
                "totalTranslations": "={{ $('設定(ここを編集)').item.json.targetLanguages.length }}",
                "translatedLanguages": "={{ $('設定(ここを編集)').item.json.targetLanguages }}"
              }
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "afb71078-f6ce-487d-b096-11bafbbfa533",
      "name": "发送 Gmail 通知",
      "type": "n8n-nodes-base.gmail",
      "position": [
        4320,
        224
      ],
      "webhookId": "42da0974-1b42-48b9-be7c-eef321c1a0b4",
      "parameters": {
        "sendTo": "=変更後: {{ $('設定(ここを編集)').item.json.notificationEmail }}",
        "message": "=<h2>🎉 翻訳が完了しました!</h2>\n\n<p><strong>元ファイル:</strong> {{ $('通知内容準備').item.json.summary.originalFile }}</p>\n<p><strong>翻訳した言語:</strong> {{ $('通知内容準備').item.json.summary.translatedLanguages.join(', ') }}</p>\n<p><strong>合計翻訳数:</strong> {{ $('通知内容準備').item.json.summary.totalTranslations }}件</p>\n<p><strong>翻訳日時:</strong> {{ $('通知内容準備').item.json.summary.timestamp }}</p>\n\n<p>翻訳済みファイルはGoogle Driveの指定フォルダに保存されています。</p>",
        "options": {},
        "subject": "翻訳完了: {{ $json.summary.originalFile }}"
      },
      "typeVersion": 2.1
    },
    {
      "id": "982fd89f-4ad5-4f95-b8fd-4e3bb3834067",
      "name": "错误处理器",
      "type": "n8n-nodes-base.code",
      "disabled": true,
      "position": [
        2384,
        384
      ],
      "parameters": {
        "jsCode": "// エラーハンドリングとログ記録\nconst errorInfo = {\n  timestamp: new Date().toISOString(),\n  error: $input.item.json.error || 'Unknown error',\n  fileName: $('Google Drive Trigger').item.json.name,\n  step: $node.name\n};\n\nconsole.error('Translation workflow error:', errorInfo);\n\nreturn { json: errorInfo };"
      },
      "typeVersion": 2
    },
    {
      "id": "347d3afa-5afc-47be-a5f1-d2e157016368",
      "name": "发送错误通知",
      "type": "n8n-nodes-base.gmail",
      "disabled": true,
      "position": [
        2608,
        384
      ],
      "webhookId": "7f553df2-d150-42df-b406-58e914f97ea2",
      "parameters": {
        "sendTo": "={{ $('設定(ここを編集)').item.json.notificationEmail }}",
        "message": "翻訳処理中にエラーが発生しました。\n\nファイル: {{ $json.fileName }}\nエラー内容: {{ $json.error }}\n発生時刻: {{ $json.timestamp }}",
        "options": {},
        "subject": "❌ 翻訳エラー発生",
        "emailType": "text"
      },
      "typeVersion": 2.1
    },
    {
      "id": "c90b4bcf-596d-46e5-b699-8c674240d07b",
      "name": "翻译语言",
      "type": "n8n-nodes-base.deepL",
      "position": [
        2160,
        240
      ],
      "parameters": {
        "text": "={{ $('テキスト整形').item.json.extractedText }}",
        "translateTo": "={{ $json.targetLanguages }}",
        "additionalFields": {}
      },
      "typeVersion": 1
    },
    {
      "id": "71df147c-e32b-482d-b566-d571b278fb2f",
      "name": "合并配置",
      "type": "n8n-nodes-base.merge",
      "position": [
        816,
        256
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combinationMode": "mergeByPosition"
      },
      "typeVersion": 2.1
    },
    {
      "id": "d5caf454-8f37-4f92-a475-7f5739c9c138",
      "name": "读取 Markdown 文件",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1504,
        576
      ],
      "parameters": {
        "options": {},
        "operation": "text",
        "destinationKey": "text"
      },
      "typeVersion": 1
    },
    {
      "id": "d5c8bef8-7b69-4e79-beae-a7e5184e1069",
      "name": "读取 TXT 文件",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1504,
        416
      ],
      "parameters": {
        "options": {},
        "operation": "text",
        "destinationKey": "text"
      },
      "typeVersion": 1
    },
    {
      "id": "6b2e9567-aabb-4935-b712-ed697da1ec2b",
      "name": "JavaScript 代码",
      "type": "n8n-nodes-base.code",
      "position": [
        2592,
        224
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "// テキストをバイナリに変換\nconst text = $input.item.json.translatedText;\nconst fileName = $input.item.json.newFilename;\nconst buffer = Buffer.from(text, 'utf-8');\n\n// JSONデータとバイナリデータの両方を返す\nreturn {\n  json: {\n    ...$input.item.json,  // すべてのJSONフィールドを引き継ぐ\n    newFilename: fileName,\n    translatedText: text\n  },\n  binary: {\n    data: {\n      data: buffer,\n      mimeType: 'text/plain',\n      fileName: fileName\n    }\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "8a5557f5-95cf-424d-9e1f-39ce96de98a7",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "# 🌍 Multi-Language Document Translation Workflow\n\n## What this workflow does:\nAutomatically translates documents uploaded to Google Drive into multiple languages using DeepL API.\n\n## Supported file types:\n✅ PDF\n✅ DOCX (Microsoft Word)\n✅ Google Docs\n✅ TXT\n✅ Markdown (.md)\n\n## How to set up:\n1. **Edit the \"Configuration (Edit Here)\" node** (yellow node below)\n   - Set your Google Drive folder IDs\n   - Choose target languages\n   - Set your notification email\n\n2. **Add credentials** for:\n   - Google Drive OAuth2\n   - DeepL API\n   - Gmail OAuth2\n   - Notion API (optional)\n\n3. **Activate the workflow** and upload a file!\n\n## Default target languages:\nEN, ZH, KO, ES, FR, DE (can be customized)\n\n## Output:\nTranslated files saved with language codes:\n- document_en.pdf\n- document_zh.pdf\n- document_ko.pdf\netc.\n\n## Note:\nDeepL free tier: 500,000 characters/month",
      "position": [
        -256,
        -272
      ],
      "parameters": {
        "width": 560,
        "height": 1064,
        "content": "# 🌍 多语言文档翻译工作流"
      },
      "typeVersion": 1
    },
    {
      "id": "348dcb93-7d41-4749-b6c2-ef5a58e024d8",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "## 1️⃣ Configuration\n\n**EDIT THIS NODE** to customize:\n- Source folder ID (where to monitor)\n- Destination folder ID (where to save)\n- Target languages (default: 6 languages)\n- Notification email\n- Notion integration (optional)\n\nAll settings are in one place for easy setup!",
      "position": [
        896,
        -64
      ],
      "parameters": {
        "color": 7,
        "width": 380,
        "height": 256,
        "content": "## 2️⃣ 文件格式检测与文本提取"
      },
      "typeVersion": 1
    },
    {
      "id": "0a1a8c7c-2e8f-49df-95e7-6e1be44e45a4",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "## 2️⃣ File Format Detection & Text Extraction\n\nDetects file type (PDF/DOCX/TXT/MD) and routes to appropriate extraction method.\n\nEach format requires different extraction logic:\n- PDF: OCR-enabled text extraction\n- DOCX: Structure-aware parsing\n- TXT/MD: Direct text reading",
      "position": [
        480,
        480
      ],
      "parameters": {
        "color": 7,
        "width": 328,
        "height": 200,
        "content": "## 1️⃣ 配置"
      },
      "typeVersion": 1
    },
    {
      "id": "a6351ae3-f679-4135-b53c-06f631abe384",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "## 3️⃣ Translation Loop\n\nSplits into one item per language, then FOR EACH:\n1. Translates text with DeepL API\n2. Generates filename with language code\n3. Creates binary file\n4. Uploads to Google Drive\n\nThis loop runs for all target languages in parallel.",
      "position": [
        1776,
        -32
      ],
      "parameters": {
        "color": 7,
        "width": 440,
        "height": 232,
        "content": "## 3️⃣ 翻译循环"
      },
      "typeVersion": 1
    },
    {
      "id": "f2fd7b4b-e246-4cef-b3d9-bad0832e4a30",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "## 4️⃣ Completion & Notification\n\nAfter all translations complete:\n1. Aggregates all results\n2. Prepares summary data\n3. Sends email notification\n\nOptional: Records translation history in Notion database for tracking.",
      "position": [
        3856,
        -32
      ],
      "parameters": {
        "color": 7,
        "width": 380,
        "height": 216,
        "content": "## 4️⃣ 完成与通知"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "5c4c2ad3-9250-46a9-99cd-1b44a4a68c14",
  "connections": {
    "Download PDF": {
      "main": [
        [
          {
            "node": "Extract Text from PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download TXT": {
      "main": [
        [
          {
            "node": "Read TXT File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download DOCX": {
      "main": [
        [
          {
            "node": "Extract Text from DOCX",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Handler": {
      "main": [
        [
          {
            "node": "Send Error Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Results": {
      "main": [
        [
          {
            "node": "Aggregate Translations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read TXT File": {
      "main": [
        [
          {
            "node": "Format Text Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Text Data": {
      "main": [
        [
          {
            "node": "Split by Language",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Record in Notion": {
      "main": [
        [
          {
            "node": "Merge Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Markdown": {
      "main": [
        [
          {
            "node": "Read Markdown File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Filename": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split by Language": {
      "main": [
        [
          {
            "node": "Translate a language",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Create Translated File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Detect File Format": {
      "main": [
        [
          {
            "node": "Download PDF",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Download DOCX",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Download TXT",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Download Markdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Markdown File": {
      "main": [
        [
          {
            "node": "Format Text Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Configuration": {
      "main": [
        [
          {
            "node": "Detect File Format",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive Trigger": {
      "main": [
        [
          {
            "node": "Merge Configuration",
            "type": "main",
            "index": 0
          },
          {
            "node": "Configuration (Edit Here)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Notification": {
      "main": [
        [
          {
            "node": "Send Gmail Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save to Google Drive": {
      "main": [
        [
          {
            "node": "Check if Notion Enabled",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Translate a language": {
      "main": [
        [
          {
            "node": "Generate Filename",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Text from PDF": {
      "main": [
        [
          {
            "node": "Format Text Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Translations": {
      "main": [
        [
          {
            "node": "Prepare Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Translated File": {
      "main": [
        [
          {
            "node": "Save to Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Text from DOCX": {
      "main": [
        [
          {
            "node": "Format Text Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Notion Enabled": {
      "main": [
        [
          {
            "node": "Record in Notion",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge Results",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Configuration (Edit Here)": {
      "main": [
        [
          {
            "node": "Merge Configuration",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 文档提取, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量32
分类2
节点类型15
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

外部链接
在 n8n.io 查看

分享此工作流