Usar DeepL para traducir automáticamente videos de YouTube al japonés y publicar en Slack
Este es unSocial Media, Multimodal AIflujo de automatización del dominio deautomatización que contiene 20 nodos.Utiliza principalmente nodos como If, Code, DeepL, Merge, Slack. Traducir automáticamente videos de YouTube al japonés usando DeepL y publicarlos en Slack
- •Bot Token de Slack o URL de Webhook
Nodos utilizados (20)
Categoría
{
"id": "iNkDWkBewhVKUVWf",
"meta": {
"instanceId": "15d6057a37b8367f33882dd60593ee5f6cc0c59310ff1dc66b626d726083b48d",
"templateCredsSetupCompleted": true
},
"name": "Auto-Translate YouTube Videos to Japanese with DeepL and Post to Slack",
"tags": [],
"nodes": [
{
"id": "8908066f-105b-4a8c-a642-921c10e16d25",
"name": "RSS Trigger",
"type": "n8n-nodes-base.rssFeedRead",
"position": [
-128,
-160
],
"parameters": {
"url": "https://www.youtube.com/feeds/videos.xml?channel_id=UCYO_jab_esuFRV4b17AJtAw",
"options": {}
},
"typeVersion": 1
},
{
"id": "23e0fa4a-a16e-4e11-b9b5-879c1001f324",
"name": "Send to Slack",
"type": "n8n-nodes-base.slack",
"position": [
1616,
-256
],
"parameters": {
"text": "=🎥 *New YouTube Video!* \n━━━━━━━━━━━━━━━ \n📌 *タイトル* \n{{ $json.title }}\n\n📝 *説明* \n{{ $json.description }}\n\n🌍 *Original Title* \n{{ $('Merge YouTube + DeepL Results1').item.json.title }}\n\n🗒️ *Original Description* \n{{ $('Merge YouTube + DeepL Results1').item.json.description }}\n\n🔗 *Link* \n<{{ $('Format YouTube Data for DeepL').item.json.link }}|Watch on YouTube>",
"channel": "=#general",
"attachments": [],
"otherOptions": {},
"authentication": "oAuth2"
},
"credentials": {
"slackOAuth2Api": {
"id": "2kyw7TSL5VT4S3md",
"name": "Slack account 8"
}
},
"typeVersion": 1
},
{
"id": "ebff7150-ee6d-4dad-ad03-a29944fcf28a",
"name": "Get a video",
"type": "n8n-nodes-base.youTube",
"position": [
496,
-256
],
"parameters": {
"part": [
"snippet"
],
"options": {},
"videoId": "={{ String($json.YT_CHANNEL_ID || $json.id || $json.link || '')\n .replace(/^yt:video:/,'')\n .replace(/^.*(?:v=|shorts\\/|youtu\\.be\\/)/,'')\n .split(/[?&]/)[0] }}",
"resource": "video",
"operation": "get"
},
"credentials": {
"youTubeOAuth2Api": {
"id": "CMyE0HrVEaStWZgG",
"name": "YouTube account 2"
}
},
"typeVersion": 1
},
{
"id": "a461efd7-0ffc-4a56-b270-a064b0a91d3e",
"name": "Send a message",
"type": "n8n-nodes-base.slack",
"position": [
496,
-64
],
"webhookId": "8c1cfac1-12a9-4ef9-9b98-5fa9b8504772",
"parameters": {
"text": "= *スキップされた動画を検出しました* 📺 タイトル: {{$json.title || $json.snippet.title}} 🔗 URL: {{$json.link || `https://www.youtube.com/watch?v=${$json.id}`}} ⚠️ 理由: 英語タイトルではないため、翻訳対象外としました",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "list",
"value": "CKUCBTG0H",
"cachedResultName": "general"
},
"otherOptions": {},
"authentication": "oAuth2"
},
"credentials": {
"slackOAuth2Api": {
"id": "2kyw7TSL5VT4S3md",
"name": "Slack account 8"
}
},
"typeVersion": 2.3
},
{
"id": "bfd54f44-77e7-4ba0-a523-e6cd2b8d432f",
"name": "Nota adhesiva",
"type": "n8n-nodes-base.stickyNote",
"position": [
-960,
-592
],
"parameters": {
"width": 432,
"height": 1232,
"content": "## Overview\nAuto-translate YouTube uploads to Japanese and post to Slack (DeepL + Slack)\n\n## Who’s it for\nMarketing or community teams that follow English-speaking creators but share updates with Japanese audiences; language learners who want JP summaries of newly released videos; internal comms teams curating industry channels for a JP workspace.\n\n## What it does\nThis workflow detects new YouTube uploads, retrieves full metadata, translates the title and description into Japanese using DeepL, and posts a formatted message to a Slack channel. It also skips non-English titles to avoid unnecessary translation.\n## How it works\n・RSS watches a channel for new items.\n・YouTube API fetches the full snippet (title/description).\n・Text is combined into a single payload and sent to DeepL.\n・The translated result + original metadata is merged and posted to Slack.\n\n## Requirements\n・YouTube OAuth (for reliable snippet retrieval)\n・DeepL API key (Free or Pro)\n・Slack OAuth\n\n## How to set up\n・Duplicate this template.\n・Open the Config (Set) node and fill in YT_CHANNEL_ID, TARGET_LANG, SLACK_CHANNEL.\n・Connect credentials for YouTube, DeepL, and Slack (don’t hardcode API keys in HTTP nodes).\n・Click Execute workflow and verify one sample post.\n\n## How to customize\n・Change TARGET_LANG to any language supported by DeepL.\n・Add filters (exclude Shorts, skip videos under N characters).\n・Switch to Slack Blocks for richer formatting or thread replies.\n・Add a fallback translator or retry logic on HTTP errors.\n## Notes & limits\nDeepL Free/Pro have different endpoints/quotas and monthly character limits. YouTube and Slack also enforce rate limits. Keep credentials in n8n’s credential store; do not commit keys into templates. Rotate keys if you accidentally exposed them."
},
"typeVersion": 1
},
{
"id": "dd5f0eef-4159-40db-a27d-02f318ea467a",
"name": "Nota adhesiva1",
"type": "n8n-nodes-base.stickyNote",
"position": [
512,
112
],
"parameters": {
"color": 7,
"height": 304,
"content": "## Send a Message (Skipped)\n📘 Setup Steps\n1️⃣ Connect YouTube, DeepL, and Slack credentials\n2️⃣ Update the RSS channel ID\n3️⃣ Adjust Slack channel name if needed\n4️⃣ Test with one video manually\n\n(Optional) Embed a quick Loom video for reviewers."
},
"typeVersion": 1
},
{
"id": "988d0c76-7f0c-4992-bae8-f3bb51369203",
"name": "Nota adhesiva4",
"type": "n8n-nodes-base.stickyNote",
"position": [
768,
-32
],
"parameters": {
"color": 7,
"width": 256,
"height": 288,
"content": "## Format YouTube Data for DeepL\n\n🧠 Prepare Translation Input\nCombines YouTube data into a single formatted text:\n【Title】\n{title}\n\n【Description】\n{description}\n"
},
"typeVersion": 1
},
{
"id": "f790cfce-8057-4636-baee-7dc5939c045b",
"name": "Nota adhesiva5",
"type": "n8n-nodes-base.stickyNote",
"position": [
256,
-368
],
"parameters": {
"color": 7,
"height": 192,
"content": "## Language Filter\n🔎 Filter English Titles Only\nSkips non-English titles based on regex (^[A-Za-z0-9\\\\s\\\\W]+$).\nIf true → proceed to translation.\nIf false → send “skipped” message to Slack."
},
"typeVersion": 1
},
{
"id": "81f79bc3-f47d-4e9d-81d1-cd3bc0255351",
"name": "Nota adhesiva6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-176,
-32
],
"parameters": {
"color": 7,
"width": 224,
"height": 224,
"content": "## RSS Trigger\n\n⏰ Trigger for new uploads\nChecks the target YouTube channel RSS feed for new video posts.\nAutomatically passes new entries to the next node."
},
"typeVersion": 1
},
{
"id": "85c85131-fbd2-4345-a74c-1caf63f8d270",
"name": "Nota adhesiva7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1168,
-64
],
"parameters": {
"color": 7,
"height": 208,
"content": "## Merge\n\n🔗 Combine Original + Translated Data\nJoins DeepL translation results with YouTube metadata.\nOutput: unified object ready for Slack posting."
},
"typeVersion": 1
},
{
"id": "f20df73e-1c72-4847-9a03-8488349b73a5",
"name": "Nota adhesiva8",
"type": "n8n-nodes-base.stickyNote",
"position": [
976,
-512
],
"parameters": {
"color": 7,
"height": 272,
"content": "## Translate with DeepL\n\n🌍 Translate text into Japanese\nUses the DeepL API (POST request).\nTranslates the combined YouTube text.\nReturns JSON with translated output.\n⚠️ Never hardcode API keys — store in credentials."
},
"typeVersion": 1
},
{
"id": "8194a237-a490-4354-bb0e-9fe885ac6824",
"name": "Nota adhesiva9",
"type": "n8n-nodes-base.stickyNote",
"position": [
528,
-480
],
"parameters": {
"color": 7,
"height": 192,
"content": "## Get a Video\n🎬 Retrieve Full Video Details\nUses the YouTube API to fetch snippet information such as title and description.\nInput: video ID from RSS.\nOutput: structured JSON for downstream processing."
},
"typeVersion": 1
},
{
"id": "6b5e5ef1-b928-43fb-aab7-64b2414c3ea0",
"name": "Language Filtrar",
"type": "n8n-nodes-base.if",
"position": [
272,
-160
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "00af14f6-2d40-4fb3-bdb1-a16438529179",
"operator": {
"type": "string",
"operation": "regex"
},
"leftValue": "={{ String($('RSS Trigger').item.json?.title ?? '') }}",
"rightValue": "^[A-Za-z0-9\\s\\W]+$"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "239c591d-0625-4257-8f27-1c087058736f",
"name": "Format YouTube Data for DeepL",
"type": "n8n-nodes-base.code",
"position": [
720,
-256
],
"parameters": {
"jsCode": "// --- YouTubeデータの取得 ---\nconst item = $json;\n\n// RSS からは title / link だけ、YouTubeノードからは snippet 構造を想定\nconst title = item.snippet?.title || item.title || \"No title\";\nconst description = item.snippet?.description || item.description || \"No description\";\nconst videoId = item.id?.videoId || item.id?.replace(\"yt:video:\", \"\") || \"unknown\";\nconst link = item.link || `https://www.youtube.com/watch?v=${videoId}`;\n\n// --- 整形(DeepLに渡す形) ---\nconst textToTranslate = `\n【Title】\n${title}\n\n【Description】\n${description}\n`;\n\n// --- DeepLに渡すJSON形式で出力 ---\nreturn [\n {\n json: {\n title,\n description,\n videoId,\n link,\n textToTranslate,\n }\n }\n];"
},
"typeVersion": 2
},
{
"id": "468941d1-78ab-4a00-a539-d86b81c2c7c7",
"name": "Nota adhesiva10",
"type": "n8n-nodes-base.stickyNote",
"position": [
-432,
-480
],
"parameters": {
"color": 7,
"width": 224,
"height": 352,
"content": "## Setup checklist\n1) Connect: YouTube OAuth / DeepL / Slack\n2) Open “Set (Config)” and fill: YT_CHANNEL_ID, TARGET_LANG, SLACK_CHANNEL\n3) Replace DeepL HTTP node with DeepL credential (no hardcoded key)\n4) Run once with a recent video to validate\n5) Optional: turn on Error Trigger → Slack #alerts\n"
},
"typeVersion": 1
},
{
"id": "c2cc4803-9017-4fef-82ad-b1023eace6d6",
"name": "Translate a language",
"type": "n8n-nodes-base.deepL",
"position": [
944,
-192
],
"parameters": {
"text": "={{ $json.textToTranslate }}",
"translateTo": "JA",
"additionalFields": {}
},
"credentials": {
"deepLApi": {
"id": "BzWijzgd9hLwECP0",
"name": "DeepL account 4"
}
},
"typeVersion": 1
},
{
"id": "494aff32-6c93-4623-bc66-0138e5cf0694",
"name": "Nota adhesiva3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1648,
-48
],
"parameters": {
"color": 7,
"height": 192,
"content": "## Send to Slack\n💬 Post Translated Message to Slack\nSends formatted message to a selected channel.\nIncludes both translated and original texts with a video link.\nExample output:"
},
"typeVersion": 1
},
{
"id": "a0179356-9df6-4628-aee6-418cda343144",
"name": "Fusionar YouTube + DeepL Results1",
"type": "n8n-nodes-base.merge",
"position": [
1168,
-256
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineAll"
},
"typeVersion": 3.2
},
{
"id": "63f64775-51e9-4e31-aa66-8662a9f2f6dc",
"name": "Format Translated Output",
"type": "n8n-nodes-base.code",
"position": [
1392,
-256
],
"parameters": {
"jsCode": "// 入力データ取得\nconst text = $json.text || '';\n\n// タイトル行を抽出\nconst titleMatch = text.match(/タイトル[^\\n]*\\n(.*?)\\n/);\nconst title = titleMatch ? titleMatch[1].trim() : '';\n\n// 説明行を抽出\nconst descMatch = text.match(/説明[^\\n]*\\n([\\s\\S]*)/);\nconst description = descMatch ? descMatch[1].trim() : '';\n\n// Slackで見やすいように成形\nreturn {\n json: {\n title,\n description\n }\n};\n"
},
"typeVersion": 2
},
{
"id": "24384f42-e32b-4ec0-b5de-66c754faa639",
"name": "Nota adhesiva12",
"type": "n8n-nodes-base.stickyNote",
"position": [
1344,
-704
],
"parameters": {
"color": 7,
"width": 320,
"height": 416,
"content": "## Format Translated Output\n\nThis Code node formats the DeepL translation result into a clean JSON object \nthat can be sent to Slack or other integrations.\nInput:\n- Translated text (from DeepL)\n- Original title and description\nOutput:\n{\n \"translated_title\": \"...\",\n \"translated_description\": \"...\",\n \"original_title\": \"...\",\n \"url\": \"...\"\n}\n\nTip:\nIf you modify the Slack message format, adjust field names here."
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "dc7904c4-4ad8-43fe-a3a4-87b66973cf02",
"connections": {
"ebff7150-ee6d-4dad-ad03-a29944fcf28a": {
"main": [
[
{
"node": "239c591d-0625-4257-8f27-1c087058736f",
"type": "main",
"index": 0
}
]
]
},
"8908066f-105b-4a8c-a642-921c10e16d25": {
"main": [
[
{
"node": "Language Filter",
"type": "main",
"index": 0
}
]
]
},
"a461efd7-0ffc-4a56-b270-a064b0a91d3e": {
"main": [
[]
]
},
"Language Filter": {
"main": [
[
{
"node": "ebff7150-ee6d-4dad-ad03-a29944fcf28a",
"type": "main",
"index": 0
}
],
[
{
"node": "a461efd7-0ffc-4a56-b270-a064b0a91d3e",
"type": "main",
"index": 0
}
]
]
},
"c2cc4803-9017-4fef-82ad-b1023eace6d6": {
"main": [
[
{
"node": "Merge YouTube + DeepL Results1",
"type": "main",
"index": 0
}
]
]
},
"63f64775-51e9-4e31-aa66-8662a9f2f6dc": {
"main": [
[
{
"node": "23e0fa4a-a16e-4e11-b9b5-879c1001f324",
"type": "main",
"index": 0
}
]
]
},
"239c591d-0625-4257-8f27-1c087058736f": {
"main": [
[
{
"node": "c2cc4803-9017-4fef-82ad-b1023eace6d6",
"type": "main",
"index": 0
},
{
"node": "Merge YouTube + DeepL Results1",
"type": "main",
"index": 1
}
]
]
},
"Merge YouTube + DeepL Results1": {
"main": [
[
{
"node": "63f64775-51e9-4e31-aa66-8662a9f2f6dc",
"type": "main",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Avanzado - Redes sociales, IA Multimodal
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
noda
@shusakuCompartir este flujo de trabajo