AutomationFlowsAI & RAG › Language Translation with Openai (open Ai)

Language Translation with Openai (open Ai)

Language Translation with OpenAI. Uses openAi. Event-driven trigger; 13 nodes.

Event trigger★★★☆☆ complexityAI-powered13 nodesOpenAI
AI & RAG Trigger: Event Nodes: 13 Complexity: ★★★☆☆ AI nodes: yes Added:

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 →

Download .json
{
  "name": "Language Translation with OpenAI",
  "nodes": [
    {
      "parameters": {
        "formTitle": "Translate Text",
        "formDescription": "Enter a sentence and select the target language for translation",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Text to Translate",
              "fieldType": "string",
              "name": "textToTranslate",
              "requiredField": true
            },
            {
              "fieldLabel": "Target Language",
              "fieldType": "options",
              "name": "targetLanguage",
              "requiredField": true,
              "fieldOptions": {
                "values": [
                  {
                    "option": "Spanish"
                  },
                  {
                    "option": "French"
                  },
                  {
                    "option": "German"
                  },
                  {
                    "option": "Italian"
                  },
                  {
                    "option": "Portuguese"
                  },
                  {
                    "option": "Japanese"
                  },
                  {
                    "option": "Chinese (Simplified)"
                  },
                  {
                    "option": "Korean"
                  },
                  {
                    "option": "Arabic"
                  },
                  {
                    "option": "Russian"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "id": "manual-trigger",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "dataType": "string",
        "value1": "={{ $json.targetLanguage }}",
        "rules": {
          "rules": [
            {
              "value2": "Spanish",
              "output": 0
            },
            {
              "value2": "French",
              "output": 1
            },
            {
              "value2": "German",
              "output": 2
            },
            {
              "value2": "Italian",
              "output": 3
            },
            {
              "value2": "Portuguese",
              "output": 4
            },
            {
              "value2": "Japanese",
              "output": 5
            },
            {
              "value2": "Chinese (Simplified)",
              "output": 6
            },
            {
              "value2": "Korean",
              "output": 7
            },
            {
              "value2": "Arabic",
              "output": 8
            },
            {
              "value2": "Russian",
              "output": 9
            }
          ]
        },
        "fallbackOutput": "none"
      },
      "id": "switch-language",
      "name": "Switch Language",
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3,
      "position": [
        450,
        300
      ]
    },
    {
      "parameters": {
        "model": "gpt-4",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a professional translator. Translate the following text to Spanish. Provide only the translation without any explanations or additional text."
            },
            {
              "role": "user",
              "content": "={{ $('manual-trigger').item.json.textToTranslate }}"
            }
          ]
        }
      },
      "id": "openai-spanish",
      "name": "Translate to Spanish",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.4,
      "position": [
        700,
        50
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": "gpt-4",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a professional translator. Translate the following text to French. Provide only the translation without any explanations or additional text."
            },
            {
              "role": "user",
              "content": "={{ $('manual-trigger').item.json.textToTranslate }}"
            }
          ]
        }
      },
      "id": "openai-french",
      "name": "Translate to French",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.4,
      "position": [
        700,
        150
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": "gpt-4",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a professional translator. Translate the following text to German. Provide only the translation without any explanations or additional text."
            },
            {
              "role": "user",
              "content": "={{ $('manual-trigger').item.json.textToTranslate }}"
            }
          ]
        }
      },
      "id": "openai-german",
      "name": "Translate to German",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.4,
      "position": [
        700,
        250
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": "gpt-4",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a professional translator. Translate the following text to Italian. Provide only the translation without any explanations or additional text."
            },
            {
              "role": "user",
              "content": "={{ $('manual-trigger').item.json.textToTranslate }}"
            }
          ]
        }
      },
      "id": "openai-italian",
      "name": "Translate to Italian",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.4,
      "position": [
        700,
        350
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": "gpt-4",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a professional translator. Translate the following text to Portuguese. Provide only the translation without any explanations or additional text."
            },
            {
              "role": "user",
              "content": "={{ $('manual-trigger').item.json.textToTranslate }}"
            }
          ]
        }
      },
      "id": "openai-portuguese",
      "name": "Translate to Portuguese",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.4,
      "position": [
        700,
        450
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": "gpt-4",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a professional translator. Translate the following text to Japanese. Provide only the translation without any explanations or additional text."
            },
            {
              "role": "user",
              "content": "={{ $('manual-trigger').item.json.textToTranslate }}"
            }
          ]
        }
      },
      "id": "openai-japanese",
      "name": "Translate to Japanese",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.4,
      "position": [
        700,
        550
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": "gpt-4",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a professional translator. Translate the following text to Simplified Chinese. Provide only the translation without any explanations or additional text."
            },
            {
              "role": "user",
              "content": "={{ $('manual-trigger').item.json.textToTranslate }}"
            }
          ]
        }
      },
      "id": "openai-chinese",
      "name": "Translate to Chinese",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.4,
      "position": [
        700,
        650
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": "gpt-4",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a professional translator. Translate the following text to Korean. Provide only the translation without any explanations or additional text."
            },
            {
              "role": "user",
              "content": "={{ $('manual-trigger').item.json.textToTranslate }}"
            }
          ]
        }
      },
      "id": "openai-korean",
      "name": "Translate to Korean",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.4,
      "position": [
        700,
        750
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": "gpt-4",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a professional translator. Translate the following text to Arabic. Provide only the translation without any explanations or additional text."
            },
            {
              "role": "user",
              "content": "={{ $('manual-trigger').item.json.textToTranslate }}"
            }
          ]
        }
      },
      "id": "openai-arabic",
      "name": "Translate to Arabic",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.4,
      "position": [
        700,
        850
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": "gpt-4",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a professional translator. Translate the following text to Russian. Provide only the translation without any explanations or additional text."
            },
            {
              "role": "user",
              "content": "={{ $('manual-trigger').item.json.textToTranslate }}"
            }
          ]
        }
      },
      "id": "openai-russian",
      "name": "Translate to Russian",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.4,
      "position": [
        700,
        950
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "originalText",
              "value": "={{ $('manual-trigger').item.json.textToTranslate }}"
            },
            {
              "name": "targetLanguage",
              "value": "={{ $('manual-trigger').item.json.targetLanguage }}"
            },
            {
              "name": "translatedText",
              "value": "={{ $json.choices[0].message.content }}"
            }
          ]
        },
        "options": {}
      },
      "id": "set-output",
      "name": "Format Output",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        950,
        500
      ]
    }
  ],
  "connections": {
    "manual-trigger": {
      "main": [
        [
          {
            "node": "switch-language",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "switch-language": {
      "main": [
        [
          {
            "node": "openai-spanish",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "openai-french",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "openai-german",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "openai-italian",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "openai-portuguese",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "openai-japanese",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "openai-chinese",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "openai-korean",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "openai-arabic",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "openai-russian",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "openai-spanish": {
      "main": [
        [
          {
            "node": "set-output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "openai-french": {
      "main": [
        [
          {
            "node": "set-output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "openai-german": {
      "main": [
        [
          {
            "node": "set-output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "openai-italian": {
      "main": [
        [
          {
            "node": "set-output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "openai-portuguese": {
      "main": [
        [
          {
            "node": "set-output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "openai-japanese": {
      "main": [
        [
          {
            "node": "set-output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "openai-chinese": {
      "main": [
        [
          {
            "node": "set-output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "openai-korean": {
      "main": [
        [
          {
            "node": "set-output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "openai-arabic": {
      "main": [
        [
          {
            "node": "set-output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "openai-russian": {
      "main": [
        [
          {
            "node": "set-output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "1.0.0",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "language-translation-001",
  "tags": []
}

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.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Language Translation with OpenAI. Uses openAi. Event-driven trigger; 13 nodes.

Source: https://gist.github.com/richardsondx/706d217f2999955b5eb905f7d8c78c73 — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Categories: Competitive Intelligence, Marketing Automation, AI Analysis

HTTP Request, Google Drive, OpenAI +1
AI & RAG

In this tutorial, I’ll show how to create UGC (User Generated Content) videos automatically using n8n and Sora 2.

Form Trigger, Google Drive, HTTP Request +2
AI & RAG

Categories Marketing Intelligence, Ad Operations, Competitive Research, Creative Analysis

HTTP Request, Google Sheets, OpenAI +3
AI & RAG

Gather product info – Takes product details (name, audience, tone, CTA, script) and product image URL from a form Describe the product – Uses GPT-4o to analyze the product image and generate a detaile

HTTP Request, Jwt, Telegram +2
AI & RAG

inoreader_AI->196267257. Uses httpRequest, openAi, telegram, airtable. Event-driven trigger; 28 nodes.

HTTP Request, OpenAI, Telegram +2