automatique翻译Google Slides演示文稿

Avancé

Ceci est unDocument Extraction, Multimodal AIworkflow d'automatisation du domainecontenant 18 nœuds.Utilise principalement des nœuds comme Set, Code, Wait, SplitOut, GoogleDrive. 基于GeminideAI驱动automatique翻译Google Slides演示文稿至任意语言

Prérequis
  • Informations d'identification Google Drive API
  • Clé API Google Gemini
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "RsBtAMu8K66veIXY",
  "meta": {
    "instanceId": "a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462",
    "templateCredsSetupCompleted": true
  },
  "name": "Auto-Translate Google Slides Presentation",
  "tags": [],
  "nodes": [
    {
      "id": "ebcadd07-05d8-4697-a3f7-e26c4bd45209",
      "name": "Lors du clic sur 'Exécuter le workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -624,
        -80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "2b24ed35-54ec-4bbe-9679-727a7628c0ac",
      "name": "Obtenir les diapositives d'une présentation",
      "type": "n8n-nodes-base.googleSlides",
      "position": [
        80,
        -80
      ],
      "parameters": {
        "operation": "getSlides",
        "presentationId": "={{ $json.id }}"
      },
      "credentials": {
        "googleSlidesOAuth2Api": {
          "id": "HuT9vQXbjmHQ0YQD",
          "name": "Google Slides account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "a1ccda01-d0b1-4434-a1dd-ca17c2a1179e",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        400,
        384
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "AaNPKXAphyMzRgfA",
          "name": "Google Gemini(PaLM) (Eure)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "9185e2de-fd63-47a6-b2b9-79d251a85140",
      "name": "Traduire les diapositives Google",
      "type": "n8n-nodes-base.googleSlidesTool",
      "position": [
        752,
        416
      ],
      "parameters": {
        "textUi": {
          "textValues": [
            {
              "text": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('textValues0_Search_For', ``, 'string') }}",
              "matchCase": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('textValues0_Match_Case', ``, 'boolean') }}",
              "replaceText": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('textValues0_Replace_With', ``, 'string') }}",
              "pageObjectIds": "={{ $('When Executed by Another Workflow').item.json.objectId }}"
            }
          ]
        },
        "options": {},
        "operation": "replaceText",
        "presentationId": "={{ $('When Executed by Another Workflow').item.json.presentationId }}"
      },
      "credentials": {
        "googleSlidesOAuth2Api": {
          "id": "HuT9vQXbjmHQ0YQD",
          "name": "Google Slides account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "5ee73a74-b554-489b-8ca2-861ae5afaea9",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        816,
        -64
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "extractTexts"
      },
      "typeVersion": 1
    },
    {
      "id": "b2c99a24-48af-45e2-9420-a76a147e0f61",
      "name": "Exécuter le Workflow",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        1008,
        -64
      ],
      "parameters": {
        "options": {},
        "workflowId": {
          "__rl": true,
          "mode": "id",
          "value": "RsBtAMu8K66veIXY"
        },
        "workflowInputs": {
          "value": {
            "lang": "={{ $('Set Language').item.json.lang }}",
            "objectId": "={{ $('Extract Text').item.json.objectId }}",
            "extractTexts": "={{ $json.extractTexts }}",
            "presentationId": "={{ $('Duplicate presentation').item.json.id }}"
          },
          "schema": [
            {
              "id": "objectId",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "objectId",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "lang",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "lang",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "presentationId",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "presentationId",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "extractTexts",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "extractTexts",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": true,
          "convertFieldsToString": true
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a9682dde-b5d5-46de-92b3-861a459d9e16",
      "name": "Lors de l'exécution par un autre workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        16,
        208
      ],
      "parameters": {
        "inputSource": "jsonExample",
        "jsonExample": "{\n  \"objectId\": \"a string\",\n  \"lang\": \"a string\",\n  \"presentationId\": \"a string\",\n  \"extractTexts\": \"a string\" \n}\n\n"
      },
      "typeVersion": 1.1
    },
    {
      "id": "bd0f34c0-414f-43ac-b30c-751e21bd7f92",
      "name": "Dupliquer la présentation",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -176,
        -80
      ],
      "parameters": {
        "name": "=Presentation_{{ $json.lang }}_{{$now.format('yyyyLLddHHii')}}",
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "=XXXXXXX"
        },
        "options": {},
        "operation": "copy"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "HEy5EuZkgPZVEa9w",
          "name": "Google Drive account (n3w.it)"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "4d75421a-ee3a-4d80-9e8d-d42de564d879",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        352,
        -80
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "bb40c6fc-7f6e-401d-b8f1-e2240890b936",
      "name": "Extraire le texte",
      "type": "n8n-nodes-base.code",
      "position": [
        608,
        -64
      ],
      "parameters": {
        "jsCode": "// Estrai i testi e restituisci anche l'objectId della slide\nconst results = [];\n\nfor (const item of $input.all()) {\n  const objectId = item.json.objectId;\n  const texts = [];\n\n  const pageElements = item.json.pageElements || [];\n\n  for (const element of pageElements) {\n    const textElements = element?.shape?.text?.textElements || [];\n\n    for (const textElement of textElements) {\n      if (textElement.textRun?.content) {\n        texts.push(textElement.textRun.content);\n      }\n    }\n  }\n\n  results.push({\n    json: {\n      objectId,\n      extractTexts: texts\n    }\n  });\n}\n\nreturn results;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "475c9fef-ceb0-4cf6-a50f-568dd9fa8f56",
      "name": "Attendre 10 sec",
      "type": "n8n-nodes-base.wait",
      "position": [
        1184,
        -64
      ],
      "webhookId": "5ee20223-84d9-4812-8919-f189ac93f841",
      "parameters": {
        "amount": 10
      },
      "typeVersion": 1.1
    },
    {
      "id": "09f07da1-e3e0-4193-8444-26d08d36687b",
      "name": "Attendre 3 sec",
      "type": "n8n-nodes-base.wait",
      "position": [
        832,
        208
      ],
      "webhookId": "9152728c-a3a1-4f0e-8571-b636b72acd5a",
      "parameters": {
        "amount": 3
      },
      "typeVersion": 1.1
    },
    {
      "id": "07a95504-11c9-4aeb-b033-e97ea6b1959e",
      "name": "Expert en traduction",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        432,
        208
      ],
      "parameters": {
        "text": "=Text to translate:\n{{ $json.extractTexts }}",
        "options": {
          "systemMessage": "=You are an expert Google Slides translator. Your primary function is to translate slides sent to you to {{ $json.lang }} (Code ISO-639) using the tool \"Translate language\" for better performs and then use the \"Translate Google Slide\" tool.\n\n## Translation Guidelines:\n\n**TRANSLATE:**\n- All text content in slides\n\n**DO NOT TRANSLATE:**\n- Email addresses (e.g., info@company.com)\n- Website URLs and links (e.g., www.example.it)\n- Physical addresses and locations\n- Phone numbers\n- Company names and brand names\n- Proper nouns (names of people, places, organizations)\n- Any other information that should remain in the original language\n\n## Process:\n1. Receive the Google Slides document\n2. Identify all text elements that require translation\n3. Use the \"Translate Google Slide\" tool to perform the translation from Italian to English\n4. Ensure proper context and professional tone in the English translation\n5. Maintain the original formatting and structure of the slides\n\n## Quality Standards:\n- Provide accurate, contextually appropriate translations\n- Maintain professional terminology and tone\n- Preserve the original meaning and intent\n- Ensure readability and flow in English"
        },
        "promptType": "define"
      },
      "typeVersion": 2.1
    },
    {
      "id": "56236111-f91a-457b-a209-6ddd561fce2d",
      "name": "Définir la langue",
      "type": "n8n-nodes-base.set",
      "position": [
        -416,
        -80
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "534bdd67-f789-4064-9da5-f958a73c9f89",
              "name": "lang",
              "type": "string",
              "value": "zh-CN"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c4b91198-16a8-4f74-a014-77ace950442c",
      "name": "Traduire la langue",
      "type": "n8n-nodes-base.googleTranslateTool",
      "position": [
        592,
        416
      ],
      "parameters": {
        "text": "={{ $json.extractTexts }}",
        "translateTo": "={{ $json.lang }}"
      },
      "credentials": {
        "googleTranslateOAuth2Api": {
          "id": "182fiZUZeAOHI9Y5",
          "name": "Google Translate account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "26e239f5-2035-4baa-a934-991f12ae82d2",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        -688
      ],
      "parameters": {
        "color": 3,
        "width": 784,
        "height": 240,
        "content": "## AI-Powered Auto-Translate Google Slides Presentation to any language\n\nThis workflow automates the **translation of Google Slides presentations** from **any languages**, while preserving the original formatting and slide structure. It leverages **Google APIs**, **AI translation (Gemini/PaLM)**, and modular execution for high flexibility and accuracy.\n\n**DISCLAIMER**: texts are split by Google Slides APIs into small blocks, so the translation will not always be contextualized."
      },
      "typeVersion": 1
    },
    {
      "id": "d7fccf24-7d3a-45d8-b7cc-d33f63ec0219",
      "name": "Note adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        -416
      ],
      "parameters": {
        "width": 784,
        "height": 112,
        "content": "## STEP 1\nIMPORTANT: Set the \"Set Language\" node with the language you want to translate the presentation into, with the format [ISO-639](https://cloud.google.com/translate/docs/languages)"
      },
      "typeVersion": 1
    },
    {
      "id": "263322f3-2059-41cd-88ec-4ccd5003c03c",
      "name": "Note adhésive2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        -272
      ],
      "parameters": {
        "width": 784,
        "height": 112,
        "content": "## STEP 2\nIn the node \"Duplicate presentation\" set up the presentation you want to translate"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "3b5ab2a4-83cc-4cd2-b0f3-e67088417c8e",
  "connections": {
    "5ee73a74-b554-489b-8ca2-861ae5afaea9": {
      "main": [
        [
          {
            "node": "b2c99a24-48af-45e2-9420-a76a147e0f61",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "09f07da1-e3e0-4193-8444-26d08d36687b": {
      "main": [
        []
      ]
    },
    "475c9fef-ceb0-4cf6-a50f-568dd9fa8f56": {
      "main": [
        [
          {
            "node": "4d75421a-ee3a-4d80-9e8d-d42de564d879",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bb40c6fc-7f6e-401d-b8f1-e2240890b936": {
      "main": [
        [
          {
            "node": "5ee73a74-b554-489b-8ca2-861ae5afaea9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "56236111-f91a-457b-a209-6ddd561fce2d": {
      "main": [
        [
          {
            "node": "bd0f34c0-414f-43ac-b30c-751e21bd7f92",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4d75421a-ee3a-4d80-9e8d-d42de564d879": {
      "main": [
        [],
        [
          {
            "node": "bb40c6fc-7f6e-401d-b8f1-e2240890b936",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b2c99a24-48af-45e2-9420-a76a147e0f61": {
      "main": [
        [
          {
            "node": "475c9fef-ceb0-4cf6-a50f-568dd9fa8f56",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c4b91198-16a8-4f74-a014-77ace950442c": {
      "ai_tool": [
        [
          {
            "node": "07a95504-11c9-4aeb-b033-e97ea6b1959e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "07a95504-11c9-4aeb-b033-e97ea6b1959e": {
      "main": [
        [
          {
            "node": "09f07da1-e3e0-4193-8444-26d08d36687b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bd0f34c0-414f-43ac-b30c-751e21bd7f92": {
      "main": [
        [
          {
            "node": "2b24ed35-54ec-4bbe-9679-727a7628c0ac",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9185e2de-fd63-47a6-b2b9-79d251a85140": {
      "ai_tool": [
        [
          {
            "node": "07a95504-11c9-4aeb-b033-e97ea6b1959e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "a1ccda01-d0b1-4434-a1dd-ca17c2a1179e": {
      "ai_languageModel": [
        [
          {
            "node": "07a95504-11c9-4aeb-b033-e97ea6b1959e",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "2b24ed35-54ec-4bbe-9679-727a7628c0ac": {
      "main": [
        [
          {
            "node": "4d75421a-ee3a-4d80-9e8d-d42de564d879",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a9682dde-b5d5-46de-92b3-861a459d9e16": {
      "main": [
        [
          {
            "node": "07a95504-11c9-4aeb-b033-e97ea6b1959e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ebcadd07-05d8-4697-a3f7-e26c4bd45209": {
      "main": [
        [
          {
            "node": "56236111-f91a-457b-a209-6ddd561fce2d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Avancé - Extraction de documents, IA Multimodale

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Avancé
Nombre de nœuds18
Catégorie2
Types de nœuds15
Description de la difficulté

Adapté aux utilisateurs avancés, avec des workflows complexes contenant 16+ nœuds

Auteur

Full-stack Web Developer based in Italy specialising in Marketing & AI-powered automations. For business enquiries, send me an email at info@n3w.it or add me on Linkedin.com/in/davideboizza

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34