{
  "id": "workflow-1df07090",
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "name": "Generated Workflow",
  "nodes": [
    {
      "id": "manual_trigger",
      "parameters": {},
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        100,
        300
      ]
    },
    {
      "id": "set_language",
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "language_setting",
              "name": "language",
              "type": "string",
              "value": "English"
            },
            {
              "id": "sentence_setting",
              "name": "sentence",
              "type": "string",
              "value": "Hello, how are you?"
            }
          ]
        }
      },
      "name": "Set Language",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        300,
        300
      ]
    },
    {
      "id": "switch_language",
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "spanish",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "language_condition_1",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.language }}",
                    "rightValue": "Spanish"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "french",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "language_condition_2",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.language }}",
                    "rightValue": "French"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "name": "Switch Language",
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        500,
        300
      ]
    },
    {
      "id": "openai_translate_spanish",
      "parameters": {
        "prompt": "Translate the following sentence to Spanish: {{ $json.sentence }}",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        }
      },
      "name": "Translate to Spanish",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1,
      "position": [
        700,
        200
      ]
    },
    {
      "id": "openai_translate_french",
      "parameters": {
        "prompt": "Translate the following sentence to French: {{ $json.sentence }}",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        }
      },
      "name": "Translate to French",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1,
      "position": [
        700,
        400
      ]
    },
    {
      "id": "set_translated_spanish",
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "translated_spanish_setting",
              "name": "translatedSentence",
              "type": "string",
              "value": "={{ $json.text }}"
            }
          ]
        }
      },
      "name": "Set Translated Spanish",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        900,
        200
      ]
    },
    {
      "id": "set_translated_french",
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "translated_french_setting",
              "name": "translatedSentence",
              "type": "string",
              "value": "={{ $json.text }}"
            }
          ]
        }
      },
      "name": "Set Translated French",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        900,
        400
      ]
    },
    {
      "id": "send_email",
      "parameters": {
        "text": "={{ $json.translatedSentence }}",
        "subject": "Translated Sentence",
        "toEmail": "recipient@example.com",
        "fromEmail": "your_email@example.com"
      },
      "name": "Send Email",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [
        1100,
        300
      ]
    }
  ],
  "connections": {
    "Set Language": {
      "main": [
        [
          {
            "node": "Switch Language",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Set Language",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch Language": {
      "main": [
        [
          {
            "node": "Translate to Spanish",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Translate to French",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Translated French": {
      "main": [
        [
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Translated Spanish": {
      "main": [
        [
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Translate to French": {
      "main": [
        [
          {
            "node": "Set Translated French",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Translate to Spanish": {
      "main": [
        [
          {
            "node": "Set Translated Spanish",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "saveExecutionProgress": false
  },
  "staticData": {},
  "tags": [],
  "triggerCount": 0,
  "updatedAt": "2025-06-19T06:20:53.111Z",
  "versionId": "1"
}