{
  "id": "miOTHYGGVNcKRBro",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Localization Readiness for SDK FAQs",
  "tags": [],
  "nodes": [
    {
      "id": "97997fa6-02ca-40af-95ee-4d2c9a5d494f",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        16,
        2048
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "14739eec-a9b1-432e-b849-55b60b5a403e",
      "name": "Sticky: Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        1824
      ],
      "parameters": {
        "width": 420,
        "height": 380,
        "content": "## How it works\nThis workflow evaluates FAQ content for localization readiness using AI. It fetches FAQs from Notion, analyzes them with Azure OpenAI for translation risks (jargon, regional references, cultural issues), scores each FAQ 1-10, logs results to Google Sheets, and alerts your Slack channel for high-risk items (score \u22645).\n\n## Setup steps\n1. **Notion**: Connect your account and replace `YOUR_NOTION_DATABASE_ID` with your FAQ database ID\n2. **Azure OpenAI**: Ensure your credential has access to gpt-4o-mini model\n3. **Google Sheets**: Create a spreadsheet and add its ID to Step 4\n4. **Slack**: Connect your workspace and set the alert channel name in Step 6\n5. Click **Execute Workflow** to run"
      },
      "typeVersion": 1
    },
    {
      "id": "19ec4a25-a9fc-42a0-81d1-ae841d95b192",
      "name": "Sticky: Data Collection",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        1888
      ],
      "parameters": {
        "color": 3,
        "width": 280,
        "height": 120,
        "content": "## Data Collection\nPulls all FAQ entries from your Notion database to begin analysis"
      },
      "typeVersion": 1
    },
    {
      "id": "3ce10881-8190-4331-bfb8-ae03ab26b308",
      "name": "Sticky: AI Analysis",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        1888
      ],
      "parameters": {
        "color": 3,
        "width": 300,
        "height": 100,
        "content": "## AI Analysis\nEvaluates localization readiness and assigns risk scores using Azure OpenAI"
      },
      "typeVersion": 1
    },
    {
      "id": "87320ae9-1ac6-4524-86a3-50cd44c03ffb",
      "name": "Sticky: Data Processing",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        752,
        1888
      ],
      "parameters": {
        "color": 3,
        "width": 360,
        "height": 120,
        "content": "## Data Processing\nExtracts structured data from AI response and saves results to Google Sheets"
      },
      "typeVersion": 1
    },
    {
      "id": "0a2071f6-fb2c-4fba-b775-bab1e9a2cba7",
      "name": "Sticky: Alert System",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1184,
        1888
      ],
      "parameters": {
        "color": 3,
        "width": 360,
        "height": 120,
        "content": "## Alert System\nFilters high-risk FAQs and sends Slack notifications for immediate action"
      },
      "typeVersion": 1
    },
    {
      "id": "589d47b1-6f88-4b34-ae4a-4890a79c593b",
      "name": "Step 1: Fetch FAQs from Notion",
      "type": "n8n-nodes-base.notion",
      "position": [
        224,
        2048
      ],
      "parameters": {
        "options": {},
        "resource": "databasePage",
        "operation": "getAll",
        "databaseId": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_NOTION_DATABASE_ID"
        }
      },
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e6bf5871-830c-496e-b5a2-9e8f27c6ad9f",
      "name": "Step 2: AI Localization Review",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        448,
        2048
      ],
      "parameters": {
        "text": "You are an expert localization reviewer. Evaluate this FAQ content for localization readiness for multiple languages/regions. Consider: jargon density, region-specific policy references, culture-specific phrasing, risk of mistranslation, and usability by non-native speakers. Provide:\n\nA score from 1-10 (1 = very hard to localize / high risk; 10 = very ready)\n\nA list of detected issues (e.g. jargon, culture-specific terms, policy references that differ by country)\n\nSuggested priority (High / Medium / Low) for translation sequencing\n\nAny recommendations to adapt the content (e.g. \"clarify term X\", \"add note for region Y\")",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "3c83a983-8a0b-401f-9bcb-62bdbbd6af4d",
      "name": "Azure GPT-4o-mini",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        528,
        2272
      ],
      "parameters": {
        "model": "gpt-4o-mini",
        "options": {}
      },
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "00a2a57d-32b6-4ae8-a061-8abf0f5ce55a",
      "name": "Step 3: Parse AI Response",
      "type": "n8n-nodes-base.code",
      "position": [
        800,
        2048
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\nfor (const item of items) {\n  const txt = item.json.response || '';\n  let score = 10, issues = [], priority = 'Low', recs = '';\n  try {\n    const s = txt.match(/score.*?(\\d+)/i); if (s) score = +s[1];\n    const iss = txt.match(/detected issues[\\s\\S]*?(?=\\n\\n|$)/i);\n    if (iss) issues = iss[0].split('\\n').map(l => l.trim()).filter(l => l && !l.toLowerCase().includes('detected issues'));\n    const p = txt.match(/priority.*?([High|Medium|Low]+)/i); if (p) priority = p[1].trim();\n    const r = txt.match(/recommendations[\\s\\S]*$/i); if (r) recs = r[0].replace(/recommendations[:\\s]*/i, '').trim();\n  } catch(e){}\n  item.json.score = score;\n  item.json.issues = issues;\n  item.json.priority = priority;\n  item.json.recommendations = recs;\n  item.json.aiResponse = txt;\n}\nreturn items;"
      },
      "typeVersion": 2
    },
    {
      "id": "2d715852-e61d-47d8-b4c1-aae8141647fa",
      "name": "Step 4: Save to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1024,
        2048
      ],
      "parameters": {
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "4709c4ab-2d70-4810-9a13-74860358b53b",
      "name": "Step 5: Filter Low Scores (\u22645)",
      "type": "n8n-nodes-base.if",
      "position": [
        1248,
        2048
      ],
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{$json[\"score\"]}}",
              "value2": 5
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "78ac8be6-4cd4-4b01-a5da-9a314f99f9ac",
      "name": "Step 6: Send Slack Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        1472,
        2048
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "channel": "={{ $json.channelname }}",
        "attachments": [],
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "9a219ff6-a457-4401-9e62-1fb2946218c2",
  "connections": {
    "Azure GPT-4o-mini": {
      "ai_languageModel": [
        [
          {
            "node": "Step 2: AI Localization Review",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Step 3: Parse AI Response": {
      "main": [
        [
          {
            "node": "Step 4: Save to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Step 4: Save to Google Sheets": {
      "main": [
        [
          {
            "node": "Step 5: Filter Low Scores (\u22645)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Step 1: Fetch FAQs from Notion": {
      "main": [
        [
          {
            "node": "Step 2: AI Localization Review",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Step 2: AI Localization Review": {
      "main": [
        [
          {
            "node": "Step 3: Parse AI Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Step 5: Filter Low Scores (\u22645)": {
      "main": [
        [
          {
            "node": "Step 6: Send Slack Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Step 1: Fetch FAQs from Notion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}