{
  "name": "🉑 Generate Anki flash cards for language learning with Google Translate and GPT",
  "nodes": [
    {
      "id": "bc49829b-45f2-4910-9c37-907271982f14",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2240,
        -840
      ],
      "parameters": {
        "width": 780,
        "height": 540,
        "content": "### 5. Do you need more details?\nFind a step-by-step guide in this tutorial\n![Guide](https://www.samirsaci.com/content/images/2025/04/Flash-Cards.png)\n[🎥 Watch My Tutorial](https://youtu.be/2mRZJATUTD"
      }
    },
    {
      "id": "f0defc20-f099-4c7c-83a7-bb687b86a6b7",
      "name": "Google Translate",
      "type": "n8n-nodes-base.googleTranslate",
      "position": [
        -3500,
        -420
      ]
    },
    {
      "id": "588d011c-d7e0-4b31-87be-d0c7ff6bf4b7",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -3080,
        -380
      ]
    },
    {
      "id": "cc04e0be-0eea-4d92-a85f-10bd75c03081",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -3080,
        -200
      ]
    },
    {
      "id": "d98262f4-9066-420b-a440-fdbc83ca0ef0",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -2900,
        -200
      ]
    },
    {
      "id": "e4ed388f-7520-4df2-8e37-d2b85b1ce532",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        -2580,
        -400
      ]
    },
    {
      "id": "c1431b36-77ee-4b50-a4e1-05489e998894",
      "name": "Trigger Added Row",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        -3920,
        -420
      ]
    },
    {
      "id": "4bafdddc-3c7f-40d4-ab17-75c6728bd5a3",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -3500,
        -260
      ]
    },
    {
      "id": "adabd9e0-13de-409b-a3ce-3c76c9624fc0",
      "name": "Upload Picture",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -2740,
        460
      ]
    },
    {
      "id": "9cfa6722-ff5e-4ee2-a4ca-2b4175767c84",
      "name": "Get Picture",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2900,
        460
      ]
    },
    {
      "id": "4bfa5fc7-dd76-4611-916e-5b33a0a9acdb",
      "name": "Call API Pexels",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3080,
        460
      ]
    },
    {
      "id": "01c5dc70-3cf5-483e-bad7-4814ca7b1f97",
      "name": "Take initialText",
      "type": "n8n-nodes-base.set",
      "position": [
        -3240,
        460
      ]
    },
    {
      "id": "7630fc44-3a0c-442b-9c3b-17bd831cdb50",
      "name": "Extract Image Link",
      "type": "n8n-nodes-base.set",
      "position": [
        -2580,
        460
      ]
    },
    {
      "id": "69645673-87c7-48cc-982f-b4e747fdf1ec",
      "name": "Final Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        -2100,
        20
      ]
    },
    {
      "id": "1ee7aca7-5b9d-424f-b49f-2ee9ca7fafdc",
      "name": "Extract Pinyin and Example",
      "type": "n8n-nodes-base.set",
      "position": [
        -2780,
        -380
      ]
    },
    {
      "id": "baee6926-5031-43fa-94b8-8c7d36a9a6f0",
      "name": "Extract Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        -3000,
        -540
      ]
    },
    {
      "id": "1f86fb6b-3ec7-4ea3-9748-a69db5d0c9f2",
      "name": "initialText is empty?",
      "type": "n8n-nodes-base.if",
      "position": [
        -3700,
        -420
      ]
    },
    {
      "id": "5c1afb76-3b5a-4c35-80b9-4a05f2d2aa2d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3280,
        140
      ],
      "parameters": {
        "width": 820,
        "height": 480,
        "content": "## 3. Retrieve Images from Pexels Free Database\nExtract from Google sheet the word you want to translate to download an illustrating image from the free database of pexels.com\n\n### How to set up?\n- **"
      }
    },
    {
      "id": "ebacc192-9dba-4cab-ae0f-d5a2e885c208",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3960,
        -780
      ],
      "parameters": {
        "width": 600,
        "height": 680,
        "content": "## 1. Google Sheet Trigger & Translation using API\nTrigger the workflow when the user adds a word in English in a new row of the column initialText.\n\n### How to set up?\n- **Trigger on Row Added of Goo"
      }
    },
    {
      "id": "5bdeb1de-d535-484d-83d6-12d72d8e5ba7",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3220,
        -800
      ],
      "parameters": {
        "width": 760,
        "height": 740,
        "content": "## 2. Simple AI agent to get the phonetic transcription and generate an sentence example\nThe agent will take the translated word as an input and will output the phonetic transcription and the sentence"
      }
    },
    {
      "id": "4f3f2a71-f137-4e91-8b1e-8a7342bac293",
      "name": "Add Results in Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1940,
        20
      ]
    },
    {
      "id": "42a20d7e-03bf-4f4e-877b-04ff185cbf1c",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2220,
        -280
      ],
      "parameters": {
        "width": 580,
        "height": 460,
        "content": "## 4. Combine Results to Update the Google Sheet\nCombine initial text, translation, example sentence and image link to fill the new row.\n\n### How to set up?\n- **Add Results in Google Sheet**:\n   1. Ad"
      }
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Final Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Extract Pinyin and Example",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Final Merge": {
      "main": [
        [
          {
            "node": "Add Results in Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Picture": {
      "main": [
        [
          {
            "node": "Upload Picture",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Fields": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Picture": {
      "main": [
        [
          {
            "node": "Extract Image Link",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call API Pexels": {
      "main": [
        [
          {
            "node": "Get Picture",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Translate": {
      "main": [
        [
          {
            "node": "Extract Fields",
            "type": "main",
            "index": 0
          },
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Take initialText": {
      "main": [
        [
          {
            "node": "Call API Pexels",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Trigger Added Row": {
      "main": [
        [
          {
            "node": "initialText is empty?",
            "type": "main",
            "index": 0
          },
          {
            "node": "Take initialText",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Image Link": {
      "main": [
        [
          {
            "node": "Final Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "initialText is empty?": {
      "main": [
        [
          {
            "node": "Google Translate",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Extract Pinyin and Example": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}