{"id":"equpgc3Z1IaUej8M","meta":{"instanceId":"b91e510ebae4127f953fd2f5f8d40d58ca1e71c746d4500c12ae86aad04c1502"},"name":"GPT-4o Multilingual Chinese Content Translation and Audio Generation","tags":[],"nodes":[{"id":"b4f0c01c-98d2-4e58-bb0a-d15139315307","name":"Webhook Trigger","type":"n8n-nodes-base.webhook","position":[960,480],"webhookId":"b09259bf-34ba-40c8-83e4-234747ec417b","parameters":{"path":"translate-audio","options":{},"httpMethod":"POST","responseMode":"lastNode"},"typeVersion":2.1},{"id":"1992b40b-3a23-4965-a7fb-cc21f65adef8","name":"Workflow Configuration","type":"n8n-nodes-base.set","position":[1184,480],"parameters":{"options":{},"assignments":{"assignments":[{"id":"id-1","name":"chineseContent","type":"string","value":"={{ $json.chineseContent }}"},{"id":"id-2","name":"targetLanguages","type":"string","value":"={{ $json.targetLanguages }}"},{"id":"id-3","name":"elevenLabsApiKey","type":"string","value":"<__PLACEHOLDER_VALUE__ElevenLabs API Key__>"},{"id":"id-4","name":"voiceId","type":"string","value":"<__PLACEHOLDER_VALUE__ElevenLabs Voice ID__>"}]},"includeOtherFields":true},"typeVersion":3.4},{"id":"39e57327-e8ac-40aa-aff0-49f204cbe9e4","name":"Split Languages","type":"n8n-nodes-base.splitOut","position":[1408,480],"parameters":{"include":"allOtherFields","options":{},"fieldToSplitOut":"targetLanguages"},"typeVersion":1},{"id":"1d80a156-449d-4d90-b213-cb73059785c6","name":"Translation Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[1632,480],"parameters":{"text":"=Chinese content to translate: {{ $json.chineseContent }}\n\nTarget language: {{ $json.targetLanguages }}","options":{"systemMessage":"You are a professional translator specializing in Chinese to multilingual translation.\n\nYour task is to:\n1. Carefully read the Chinese content provided\n2. Translate it into the requested target language with high accuracy and fluency\n3. Ensure the translation sounds natural and culturally appropriate\n4. Maintain the tone and style of the original content\n5. Return the translated text in the specified JSON format\n\nProvide translations that are ready for professional use, including audio narration."},"promptType":"define","hasOutputParser":true},"typeVersion":3.1},{"id":"8905be94-73c6-45de-be91-a27301122fe4","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[1632,704],"parameters":{"model":{"__rl":true,"mode":"id","value":"gpt-4o"},"options":{},"builtInTools":{}},"credentials":{"openAiApi":{"id":"mv2ECvRtbAK63G2g","name":"OpenAi account"}},"typeVersion":1.3},{"id":"449105e5-54da-450c-8a29-cd74e779f2b9","name":"Structured Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[1808,720],"parameters":{"schemaType":"manual","inputSchema":"{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"translatedText\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"description\": \"The translated text in the target language\"\n\t\t},\n\t\t\"targetLanguage\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"description\": \"The language the text was translated to\"\n\t\t}\n\t}\n}"},"typeVersion":1.3},{"id":"9ed8fe1f-165e-4e3d-bbb2-6038d01fafaf","name":"Generate Audio with ElevenLabs","type":"n8n-nodes-base.httpRequest","position":[1936,480],"parameters":{"url":"=https://api.elevenlabs.io/v1/text-to-speech/{{ $('Workflow Configuration').item.json.voiceId }}","method":"POST","options":{"response":{"response":{"responseFormat":"file","outputPropertyName":"audio"}}},"jsonBody":"={\n  \"text\": {{ $json.translatedText }},\n  \"model_id\": \"eleven_multilingual_v2\",\n  \"voice_settings\": {\n    \"stability\": 0.5,\n    \"similarity_boost\": 0.75,\n    \"style\": 0.5,\n    \"use_speaker_boost\": true\n  }\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"xi-api-key","value":"={{ $('Workflow Configuration').item.json.elevenLabsApiKey }}"},{"name":"Content-Type","value":"application/json"}]}},"typeVersion":4.3},{"id":"56682914-a12e-457b-839f-724515e7f1c8","name":"Format Audio Result","type":"n8n-nodes-base.set","position":[2144,480],"parameters":{"options":{},"assignments":{"assignments":[{"id":"id-1","name":"language","type":"string","value":"={{ $json.targetLanguage }}"},{"id":"id-2","name":"translatedText","type":"string","value":"={{ $json.translatedText }}"},{"id":"id-3","name":"audioFileName","type":"string","value":"={{ $json.targetLanguage }}_audio.mp3"},{"id":"id-4","name":"hasAudio","type":"boolean","value":"true"}]},"includeOtherFields":true},"typeVersion":3.4},{"id":"fd740eef-c56e-40ae-9deb-98a34a097cd5","name":"Combine All Results","type":"n8n-nodes-base.aggregate","position":[3376,512],"parameters":{"options":{},"aggregate":"aggregateAllItemData","destinationFieldName":"language"},"typeVersion":1},{"id":"f4c72b2e-3e6d-4652-8c80-74aabc7ac7be","name":"Check Translation Quality","type":"n8n-nodes-base.if","position":[2656,480],"parameters":{"options":{}},"typeVersion":2.3},{"id":"c4b45700-8cf2-4c1f-959b-00019e7c89bb","name":"Calculate Translation Metrics","type":"n8n-nodes-base.code","position":[2432,480],"parameters":{},"typeVersion":2},{"id":"e408f3e8-dada-463b-b983-31ea9dc626e1","name":"Enhance Audio Metadata","type":"n8n-nodes-base.code","position":[2880,384],"parameters":{},"typeVersion":2},{"id":"0ce2075f-c3ce-40e8-b8cd-93af5261500b","name":"Upload to Google Drive","type":"n8n-nodes-base.googleDrive","position":[3152,512],"parameters":{"driveId":{"__rl":true,"mode":"list","value":"My Drive"},"options":{},"folderId":{"__rl":true,"mode":"list","value":"root","cachedResultName":"/ (Root folder)"}},"credentials":{"googleDriveOAuth2Api":{"id":"ALHOS4YihnICuh2c","name":"Google Drive account"}},"typeVersion":3},{"id":"d18e7b67-cba9-4962-9193-f3ae8c2d7a12","name":"Send Quality Alert Email","type":"n8n-nodes-base.gmail","position":[2880,576],"webhookId":"6988cc90-016f-40fc-b76b-472f201e6baf","parameters":{"options":{}},"credentials":{"gmailOAuth2":{"id":"u1N5nBDvQ0AWhNnV","name":"Gmail account"}},"typeVersion":2.2},{"id":"6845b1b3-7779-4474-a126-a04c23761e68","name":"Generate Summary Statistics","type":"n8n-nodes-base.summarize","position":[3600,512],"parameters":{"options":{},"fieldsToSummarize":{"values":[{}]}},"typeVersion":1.1},{"id":"88e11480-a985-454a-92a6-0d15a5a5b11b","name":"Prepare Final Report","type":"n8n-nodes-base.set","position":[3824,512],"parameters":{"options":{}},"typeVersion":3.4},{"id":"673b4205-c9f0-48c3-a0ed-31755d7cdddf","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[992,32],"parameters":{"width":896,"height":224,"content":"## How It Works\nThis workflow automates end-to-end audio translation with quality assurance for content creators, educators, and international teams managing multilingual content. It solves the challenge of translating audio into multiple languages while ensuring accuracy and maintaining organized delivery. The system receives audio files via webhook, splits them into target languages (Arabic, French, Spanish, Chinese, Hindi), and processes each through NVIDIA's Parakeet TDT translation model. OpenAI validates translation quality, and results are enhanced with comprehensive metadata. Successfully translated files are uploaded to Google Drive with organized naming, combined into a summary spreadsheet, and delivered via email notification. Failed translations trigger quality alerts, ensuring reliable output while minimizing manual oversight and reducing translation turnaround time from hours to minutes."},"typeVersion":1},{"id":"b01320f8-c0f2-4b1a-acf1-c036e5a1154b","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[1968,32],"parameters":{"width":656,"height":208,"content":"## Setup Steps\n1. Configure NVIDIA API credentials in the \"Generate Audio with ElevenLabs\" \n2. Add OpenAI API key for quality evaluation in the \"OpenAI Chat Model\" node\n3. Set up Google Drive OAuth connection and specify target folder ID for uploads\n4. Configure Gmail SMTP credentials for notification delivery\n5. Update webhook URL in source applications to trigger workflow\n6. Customize target languages in \"Split Languages\" node if needed"},"typeVersion":1},{"id":"8f131695-737c-40b7-97fe-7bb413347c5d","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[2688,-32],"parameters":{"color":6,"width":704,"height":304,"content":"## Prerequisites\nActive accounts: NVIDIA (build.nvidia.com), OpenAI, Google Drive, Gmail. API credentials for all services. \n## Use Cases\nInternational podcast distribution, e-learning course localization\n## Customization\nModify target languages in Split node, adjust quality thresholds in OpenAI evaluation\n## Benefits\nReduces translation time by 90%, eliminates manual quality checks through automated validation"},"typeVersion":1},{"id":"74c8a3d6-ef0d-45ec-984a-8fb8203da7da","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[2336,336],"parameters":{"color":7,"width":736,"height":608,"content":"## Quality Assurance & Validation\n**What:** OpenAI evaluates translation quality against defined metrics\n**Why:** Ensures output meets accuracy standards before delivery\n"},"typeVersion":1},{"id":"55eacdc6-c430-4871-8530-3e404b4c05ce","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[1600,320],"parameters":{"color":7,"width":672,"height":608,"content":"## AI-Driven Translation Generation\n**What:** NVIDIA Parakeet TDT generates translations with structured output parsing\n**Why:** Produces accurate translations using state-of-the-art neural models with consistent formatting"},"typeVersion":1},{"id":"6b697372-1a5e-4ab2-b6fe-b478bd123492","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[896,320],"parameters":{"color":7,"width":688,"height":608,"content":"\n## Ingestion & Triggering\n**What:** Webhook receives audio files and configuration\n**Why:** Enables automated triggering from external applications without manual intervention\n"},"typeVersion":1},{"id":"eacd2642-540d-4f46-ab84-afd23b67dd08","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[3104,336],"parameters":{"color":7,"width":896,"height":592,"content":"## Storage & Asset Management\n**What:** Results upload to Google Drive with metadata-rich filenames\n**Why:** Creates an organized, searchable archive accessible to team members"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"availableInMCP":false,"executionOrder":"v1"},"versionId":"36209949-9e35-433c-9943-58660a4b68f9","connections":{"Split Languages":{"main":[[{"node":"Translation Agent","type":"main","index":0}]]},"Webhook Trigger":{"main":[[{"node":"Workflow Configuration","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"Translation Agent","type":"ai_languageModel","index":0}]]},"Translation Agent":{"main":[[{"node":"Generate Audio with ElevenLabs","type":"main","index":0}]]},"Combine All Results":{"main":[[{"node":"Generate Summary Statistics","type":"main","index":0}]]},"Format Audio Result":{"main":[[{"node":"Calculate Translation Metrics","type":"main","index":0}]]},"Enhance Audio Metadata":{"main":[[{"node":"Upload to Google Drive","type":"main","index":0}]]},"Upload to Google Drive":{"main":[[{"node":"Combine All Results","type":"main","index":0}]]},"Workflow Configuration":{"main":[[{"node":"Split Languages","type":"main","index":0}]]},"Structured Output Parser":{"ai_outputParser":[[{"node":"Translation Agent","type":"ai_outputParser","index":0}]]},"Check Translation Quality":{"main":[[{"node":"Enhance Audio Metadata","type":"main","index":0}],[{"node":"Send Quality Alert Email","type":"main","index":0}]]},"Generate Summary Statistics":{"main":[[{"node":"Prepare Final Report","type":"main","index":0}]]},"Calculate Translation Metrics":{"main":[[{"node":"Check Translation Quality","type":"main","index":0}]]},"Generate Audio with ElevenLabs":{"main":[[{"node":"Format Audio Result","type":"main","index":0}]]}}}