{
  "id": "YyVrrKMilghkIVmN",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Supplier Sentiment Intelligence",
  "tags": [],
  "nodes": [
    {
      "id": "232fd9ca-0285-4399-b634-c32f1551864f",
      "name": "Monitor Incoming Emails",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -624,
        -48
      ],
      "parameters": {
        "filters": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "97f860fb-7ab2-441b-a157-a8961c4bb60e",
      "name": "Filter Valid Supplier Emails",
      "type": "n8n-nodes-base.if",
      "position": [
        -352,
        -48
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "84a9514f-d38b-4bd7-ae5b-4179ec628ee4",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.From }}",
              "rightValue": ""
            },
            {
              "id": "5dff64b0-a4c4-4f18-83c8-87cbc3de7990",
              "operator": {
                "type": "string",
                "operation": "notContains"
              },
              "leftValue": "={{$json.Subject}}",
              "rightValue": "unsubscribe"
            },
            {
              "id": "e661feef-0125-4301-a45d-9e271eea9afc",
              "operator": {
                "type": "string",
                "operation": "notContains"
              },
              "leftValue": "={{$json.From}}",
              "rightValue": "no-reply"
            },
            {
              "id": "e16eaf05-355c-462f-a0f1-4406b2ceb60f",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{$json.Subject}}",
              "rightValue": "auto-reply"
            },
            {
              "id": "b9816ac3-6d45-4d88-8fbe-c089051c6245",
              "operator": {
                "type": "string",
                "operation": "notContains"
              },
              "leftValue": "={{$json.Subject}}",
              "rightValue": "newsletter"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "b42fd03c-d72e-4046-bb45-0d674dec7b83",
      "name": "Structure Email Data",
      "type": "n8n-nodes-base.code",
      "position": [
        80,
        -64
      ],
      "parameters": {
        "jsCode": "const email = $input.first().json;\n\nreturn [{\n  json: {\n    supplier_email: email.From,\n    subject: email.Subject,\n    body: email.snippet,\n    // Using backticks (template literals) with real line breaks also works!\n    full_text: `Subject: ${email.Subject}\n\nBody: ${email.snippet}`\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "e21e4418-57eb-4c6b-8cb0-c1fd123fe0fc",
      "name": "Analyze Sentiment & Intent",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        608,
        -64
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "models/gemma-4-26b-a4b-it",
          "cachedResultName": "models/gemma-4-26b-a4b-it"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=You are a supplier relationship analyst. Analyze the following email and return ONLY a valid JSON object with no extra text.\n\nEmail:\n{{$json.full_text}}\n\nReturn this exact structure:\n{\n  \"sentiment_score\": <number -1.0 to 1.0>,\n  \"sentiment_label\": \"<positive|neutral|negative>\",\n  \"intent\": \"<complaint|inquiry|update|escalation|appreciation>\",\n  \"urgency\": \"<low|medium|high>\",\n  \"key_concern\": \"<one-line summary of main concern or topic>\",\n  \"deterioration_risk\": <true|false>\n}"
            }
          ]
        },
        "builtInTools": {}
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "23f3724e-bac4-49b7-bd24-bc94a13fec21",
      "name": "Extract & Normalize Insights",
      "type": "n8n-nodes-base.set",
      "position": [
        928,
        -64
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "cdc031ca-c3f1-45ce-a409-ae84ce509a5f",
              "name": "sentiment_score",
              "type": "number",
              "value": "={{ JSON.parse($json.content.parts[1].text.replace(/```json|```/g, '').trim()).sentiment_score }}"
            },
            {
              "id": "fa940739-a7a8-422c-8691-7149490a16c4",
              "name": "raw_text",
              "type": "string",
              "value": "={{ $json.content.parts[1].text.replace(/```json|```/g, '').trim() }}"
            },
            {
              "id": "e1e1fd54-082c-429d-9972-80cdd6818418",
              "name": "sentiment_label",
              "type": "string",
              "value": "={{ JSON.parse($json.content.parts[1].text.replace(/```json|```/g, '').trim()).sentiment_label }}"
            },
            {
              "id": "f350dd96-d9ee-40d4-8d79-eb4f37c33da0",
              "name": "intent",
              "type": "string",
              "value": "={{ JSON.parse($json.content.parts[1].text.replace(/```json|```/g, '').trim()).intent }}"
            },
            {
              "id": "51cdfa7a-8280-40b4-8d64-f5881d8ce12b",
              "name": "urgency",
              "type": "string",
              "value": "={{ JSON.parse($json.content.parts[1].text.replace(/```json|```/g, '').trim()).urgency }}"
            },
            {
              "id": "4bda2c3c-2d5d-4edd-b896-058176719d78",
              "name": "key_concern",
              "type": "string",
              "value": "={{ JSON.parse($json.content.parts[1].text.replace(/```json|```/g, '').trim()).key_concern }}"
            },
            {
              "id": "b93fd91f-8c2e-481f-9710-c17552b758fa",
              "name": "deterioration_risk",
              "type": "boolean",
              "value": "={{ JSON.parse($json.content.parts[1].text.replace(/```json|```/g, '').trim()).deterioration_risk }}"
            },
            {
              "id": "33fc9dc9-1718-439f-99dc-17343b3a24e7",
              "name": "supplier_email",
              "type": "string",
              "value": "={{ $('Structure Email Data').item.json.supplier_email }}"
            },
            {
              "id": "2cddd878-5ac8-4236-8d73-b006797fb94d",
              "name": "analysis_timestamp",
              "type": "string",
              "value": "={{ new Date().toISOString() }}"
            },
            {
              "id": "410628ad-53f0-4ea1-9f96-7a022b491a2b",
              "name": "trend",
              "type": "string",
              "value": "={{ JSON.parse($json.content.parts[1].text.replace(/```json|```/g, '').trim()).sentiment_score < -0.4 ? 'declining' : JSON.parse($json.content.parts[1].text.replace(/```json|```/g, '').trim()).sentiment_score > 0.3 ? 'improving' : 'stable' }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "575003bc-5660-41b0-ad54-61316e5b84f6",
      "name": "Detect Supplier Risk",
      "type": "n8n-nodes-base.if",
      "position": [
        1184,
        -64
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "dde04b52-cc7f-4728-b195-301e467036ba",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{$json.deterioration_risk}} ",
              "rightValue": ""
            },
            {
              "id": "18e93ece-048c-49f5-8a55-7b9e0356b3c2",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{$json.sentiment_score}}",
              "rightValue": "-0.4"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.3
    },
    {
      "id": "9cb7203e-aa2c-47e6-986f-71df8129aee1",
      "name": "Generate Engagement Strategy",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        1680,
        -80
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "models/gemma-4-26b-a4b-it",
          "cachedResultName": "models/gemma-4-26b-a4b-it"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=You are a supplier relationship manager. Based on this analysis, write a concise, professional engagement strategy.\n\nSupplier: {{$json.supplier_email}}\nSentiment: {{$json.sentiment_label}} (score: {{$json.sentiment_score}})\nIntent: {{$json.intent}}\nUrgency: {{$json.urgency}}\nKey concern: {{$json.key_concern}}\n\nProvide:\n1. A recommended action (email, call, meeting)\n2. A draft opening message (2-3 sentences)\n3. Suggested timeline for follow-up"
            }
          ]
        },
        "builtInTools": {}
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "b6ba02c4-eaa2-4f18-97ea-0b2f3dd97b09",
      "name": "Parse Strategy Output",
      "type": "n8n-nodes-base.code",
      "position": [
        1968,
        -80
      ],
      "parameters": {
        "jsCode": "// Get strategy text from second LLM output\nconst parts = $json.content?.parts ?? $json.parts;\nconst rawStrategy = parts[1].text;\n\nconst strategyText = rawStrategy\n  .replace(/\\\\n/g, '\\n')\n  .replace(/\\*\\*(.*?)\\*\\*/g, '$1')\n  .replace(/\\\\\\//g, '/')\n  .replace(/\\\\\"/g, '\"')\n  .trim();\n\n// Parse strategy into structured sections\nfunction parseStrategy(text) {\n  const sections = {};\n\n  // Extract recommended action\n  const actionMatch = text.match(/1\\.\\s*Recommended Action\\s*([\\s\\S]*?)(?=2\\.)/i);\n  if (actionMatch) sections.recommended_action = actionMatch[1].trim();\n\n  // Extract draft message \u2014 grab text between the first pair of double quotes\n  const draftMatch = text.match(/\"(Dear[\\s\\S]*?)\"/);\n  if (draftMatch) sections.draft_message = draftMatch[1].trim();\n\n  // Extract timeline \u2014 split by bullet points (*, -, \u2022)\n  const timelineMatch = text.match(/3\\.\\s*Suggested Timeline[\\s\\S]*?:([\\s\\S]*)/i);\n  if (timelineMatch) {\n    const timelineRaw = timelineMatch[1];\n    sections.timeline = [];\n\n    // Split on bullet markers and filter empty lines\n    const bullets = timelineRaw\n       .split(/[\\n]?\\s*[\\*\\-\u2022]\\s+/) \n      .map(b => b.trim())\n      .filter(b => b.includes(':'));\n\n    for (const bullet of bullets) {\n      // Each bullet is like \"Immediate (Within 4 hours): Execute the call...\"\n      const colonIdx = bullet.indexOf(':');\n      if (colonIdx === -1) continue;\n      const phase = bullet.slice(0, colonIdx).trim();\n      const action = bullet.slice(colonIdx + 1).trim();\n      if (phase && action) sections.timeline.push({ phase, action });\n    }\n  }\n\n  return sections;\n}\n\nconst parsedStrategy = parseStrategy(strategyText);\n\n// Get metadata from previous node\nconst prevData = $('Extract & Normalize Insights').first().json;\n\nreturn [{\n  json: {\n    ...prevData,\n    strategy_text: strategyText,\n    strategy_structured: {\n      recommended_action: parsedStrategy.recommended_action ?? null,\n      draft_message: parsedStrategy.draft_message ?? null,\n      timeline: parsedStrategy.timeline ?? []\n    },\n    analysis_timestamp: new Date().toISOString()\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "c7fb3627-67cf-479f-b5af-c480f3aae7b7",
      "name": "Build Slack Alert Message",
      "type": "n8n-nodes-base.code",
      "position": [
        2272,
        -80
      ],
      "parameters": {
        "jsCode": "// Get all data from strategy code node\nconst data = $('Parse Strategy Output').first().json;\n\n// Build your original Slack message\nconst slackMessage = `*Supplier Relationship Alert*\n*Supplier:* ${data.supplier_email}\n*Sentiment:* ${data.sentiment_score} (${data.sentiment_label})\n*Concern:* ${data.key_concern}\n\n*Recommended Strategy:*\n${data.strategy_structured?.recommended_action ?? 'N/A'}`;\n\nreturn [{\n  json: {\n    ...data,\n    slack_message: slackMessage\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "ea96b0ae-54b7-4303-b997-27c1b790abf5",
      "name": "Send Alert to Team",
      "type": "n8n-nodes-base.slack",
      "position": [
        2464,
        -80
      ],
      "parameters": {
        "text": "=={{ $json.slack_message }}",
        "user": {
          "__rl": true,
          "mode": "list",
          "value": "U0AP3B0UTMH",
          "cachedResultName": "vishakag21"
        },
        "select": "user",
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.4
    },
    {
      "id": "b19113ae-801d-417b-bf8c-c213175cefb2",
      "name": "Log Interaction History",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2832,
        -80
      ],
      "parameters": {
        "columns": {
          "value": {
            "Date": "={{ $('Parse Strategy Output').item.json.analysis_timestamp }}",
            "Label": "={{ $('Parse Strategy Output').item.json.sentiment_label }}",
            "Intent": "={{ $('Parse Strategy Output').item.json.intent }}",
            "Strategy": "={{ $('Parse Strategy Output').item.json.strategy_text }}",
            "Supplier": "={{ $('Parse Strategy Output').item.json.supplier_email }}",
            "Sentiment Score": "={{ $('Parse Strategy Output').item.json.sentiment_score }}"
          },
          "schema": [
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Supplier",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Supplier",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Sentiment Score",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Sentiment Score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Label",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Label",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Intent",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Intent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Strategy",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Strategy",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Ce8BFOTEkR2SjfD6mPMZUd-NMr5-cAdZrKfVJflZjmI/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1Ce8BFOTEkR2SjfD6mPMZUd-NMr5-cAdZrKfVJflZjmI",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Ce8BFOTEkR2SjfD6mPMZUd-NMr5-cAdZrKfVJflZjmI/edit?usp=drivesdk",
          "cachedResultName": "Log Sentiment History"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "bb7b8017-fe29-4cc7-b71e-6b72f492c2d9",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -704,
        -208
      ],
      "parameters": {
        "color": 7,
        "width": 608,
        "height": 320,
        "content": "## Email Intake & Filtering\nMonitors incoming Gmail messages and filters out irrelevant emails like newsletters, auto-replies, and unsubscribe content to keep only valid supplier emails."
      },
      "typeVersion": 1
    },
    {
      "id": "9885d9b3-6dce-4bd1-822b-f38fdd365574",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -16,
        -208
      ],
      "parameters": {
        "color": 7,
        "width": 480,
        "height": 320,
        "content": "## Email Data Structuring\nExtracts and formats key email details (sender, subject, body) into a clean structure for AI analysis."
      },
      "typeVersion": 1
    },
    {
      "id": "24ac08ca-dca0-4bad-bbca-9a761e0c3f7e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        -208
      ],
      "parameters": {
        "color": 7,
        "width": 592,
        "height": 320,
        "content": "## AI Analysis & Insight Extraction\nUses Gemini AI to analyze sentiment, intent, and urgency, then converts the output into structured fields."
      },
      "typeVersion": 1
    },
    {
      "id": "e32dcc7f-01c9-4ec3-9630-cfae219bb155",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1136,
        -208
      ],
      "parameters": {
        "color": 7,
        "width": 448,
        "height": 320,
        "content": "## Risk Detection & Delay Handling\nIdentifies high-risk supplier interactions and applies a delay before triggering response actions."
      },
      "typeVersion": 1
    },
    {
      "id": "44a88b8a-6255-4a4b-bbad-e4784705d93b",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1632,
        -208
      ],
      "parameters": {
        "color": 7,
        "width": 496,
        "height": 320,
        "content": "## Strategy Generation & Parsing\nGenerates a professional engagement strategy and structures it into action, message, and timeline."
      },
      "typeVersion": 1
    },
    {
      "id": "c4e886e0-6220-4a97-8c49-ad25708e62ba",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2224,
        -208
      ],
      "parameters": {
        "color": 7,
        "width": 432,
        "height": 320,
        "content": "## Alert Creation & Notification\n\nFormats a Slack alert message and sends it to notify the team in real-time."
      },
      "typeVersion": 1
    },
    {
      "id": "aeff5555-e208-46ad-9214-cb4c1ddf977e",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2736,
        -208
      ],
      "parameters": {
        "color": 7,
        "width": 320,
        "height": 320,
        "content": "## Logging & History Tracking\n\nStores all interaction data, sentiment, and strategies in Google Sheets for tracking and analysis."
      },
      "typeVersion": 1
    },
    {
      "id": "be7e3bd8-28fc-499c-adcf-061bc3724c6c",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1888,
        -400
      ],
      "parameters": {
        "width": 1072,
        "height": 896,
        "content": "## Supplier Sentiment Intelligence \n\n### This workflow automatically monitors incoming supplier emails and transforms them into actionable insights using AI. Once an email arrives, it filters out irrelevant messages and structures the content for processing. The workflow then uses AI to analyze sentiment, intent, urgency, and potential relationship risk. Based on this analysis, it detects whether the supplier relationship is at risk and generates a professional engagement strategy including recommended actions, a draft response, and a follow-up timeline. The system then formats a concise alert message and sends it to the team via Slack for immediate attention. Finally, all interaction data, sentiment insights, and strategies are logged into Google Sheets for tracking and historical analysis. This ensures proactive supplier management and faster response to potential issues.\n\n---\n\n\n# Setup Steps  \n\n\n## Connect Accounts  \nConfigure Gmail, Gemini AI, Slack, and Google Sheets credentials in n8n.\n\n---\n\n## Prepare Data Storage  \nCreate a Google Sheet to store supplier interaction and analysis data.\n\n---\n\n## Add Email Trigger  \nSet up Gmail Trigger to monitor incoming supplier emails.\n\n---\n\n## Filter & Structure Data  \nFilter irrelevant emails and structure the content for processing.\n\n---\n\n## Add AI Analysis  \nUse AI to analyze sentiment, intent, urgency, and risk.\n\n---\n\n## Detect Risk  \nAdd logic to identify high-risk supplier interactions.\n\n---\n\n## Generate Strategy  \nUse AI to create engagement strategy and response message.\n\n---\n\n## Notify & Log  \nSend Slack alerts and store all data in Google Sheets."
      },
      "typeVersion": 1
    },
    {
      "id": "7b2050f3-16ae-43d3-8136-9cfe39cf8184",
      "name": "Data Processing Buffer",
      "type": "n8n-nodes-base.wait",
      "position": [
        320,
        -64
      ],
      "parameters": {
        "amount": 2
      },
      "typeVersion": 1.1
    },
    {
      "id": "98bf36ea-ae8d-4cba-a1e2-09a75ff4a310",
      "name": "Pre-Analysis Pause",
      "type": "n8n-nodes-base.wait",
      "position": [
        1424,
        -80
      ],
      "parameters": {
        "amount": 3
      },
      "typeVersion": 1.1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "versionId": "c5a54c15-167c-4fe0-b77c-c2ace193a824",
  "connections": {
    "Pre-Analysis Pause": {
      "main": [
        [
          {
            "node": "Generate Engagement Strategy",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Alert to Team": {
      "main": [
        [
          {
            "node": "Log Interaction History",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Detect Supplier Risk": {
      "main": [
        [
          {
            "node": "Pre-Analysis Pause",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structure Email Data": {
      "main": [
        [
          {
            "node": "Data Processing Buffer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Strategy Output": {
      "main": [
        [
          {
            "node": "Build Slack Alert Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data Processing Buffer": {
      "main": [
        [
          {
            "node": "Analyze Sentiment & Intent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Monitor Incoming Emails": {
      "main": [
        [
          {
            "node": "Filter Valid Supplier Emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Slack Alert Message": {
      "main": [
        [
          {
            "node": "Send Alert to Team",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Sentiment & Intent": {
      "main": [
        [
          {
            "node": "Extract & Normalize Insights",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract & Normalize Insights": {
      "main": [
        [
          {
            "node": "Detect Supplier Risk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Valid Supplier Emails": {
      "main": [
        [
          {
            "node": "Structure Email Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Engagement Strategy": {
      "main": [
        [
          {
            "node": "Parse Strategy Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}