{
  "id": "SEpvtJHgUI2h5zeR",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "News Based Client Impact Classifier",
  "tags": [],
  "nodes": [
    {
      "id": "68f5a27a-7cdd-47e8-ae63-35280c5730b2",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -528,
        80
      ],
      "parameters": {
        "width": 1040,
        "height": 448,
        "content": "# News Based Client Impact Classifier\n\n## How it works:\nThis workflow runs daily at 8 AM to monitor business news and evaluate client impact. It fetches news, validates and splits articles and checks against the Article Processing Log using normalized URLs to avoid duplicates. New articles are enriched with client data and analyzed by an AI model to classify impact and identify affected clients. High-impact articles trigger email alerts, while all articles are logged with processing status to ensure complete tracking and prevent reprocessing.\n\n## Setup steps:\nSchedule Trigger \u2192 Configure execution time (default: 8 AM daily)\nNews API Setup \u2192 Add API key and configure business category\nGoogle Sheets (Client Dataset) \u2192 Maintain structured client data\nGoogle Sheets (Article Processing Log) \u2192 Store all processed articles\nDeduplication Logic \u2192 Ensure normalized URL comparison is used\nAI Model (Gemini) \u2192 Configure credentials and JSON output\nFiltering Logic \u2192 Allow only High impact for alerts\nEmail Node \u2192 Configure Gmail for notifications\nLogging Step \u2192 Log all articles with emailSent flag\nWait Node \u2192 Set delay (1 minute) between processing"
      },
      "typeVersion": 1
    },
    {
      "id": "c85ec4f1-03d6-47a3-93eb-ae3d93b98619",
      "name": "Daily News Trigger (8AM)",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -464,
        912
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "2c588222-eaaf-4b4e-a6b1-e2197b2d4745",
      "name": "Fetch Latest Finance News",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -224,
        1120
      ],
      "parameters": {
        "url": "https://newsapi.org/v2/top-headlines",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "category",
              "value": "business"
            },
            {
              "name": "apiKey",
              "value": ""
            }
          ]
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "2b39c71b-99ce-4a6c-b3f7-647839116f5d",
      "name": "AI Impact Classification",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        1728,
        880
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "models/gemini-2.5-flash",
          "cachedResultName": "models/gemini-2.5-flash"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=You are a financial advisor assistant.\n\nAnalyze the following finance/business news article against the provided client dataset and determine the impact on each client.\n\nClient Dataset:\n{{ JSON.stringify($json.clientsData) }}\n\nArticle:\n{{ JSON.stringify({\n  source: $json.source,\n  author: $json.author,\n  title: $json.title,\n  description: $json.description,\n  content: $json.content,\n  publishedAt: $json.publishedAt,\n  url: $json.url\n}) }}\n\nRules:\n- High impact = the article directly and materially affects one or more clients' holdings, sector exposure, geography exposure or key sensitivities.\n- Medium impact = indirectly relevant or moderately important.\n- Low impact = little or no meaningful effect on any client.\n- Only include affected clients if there is a clear and specific reason.\n- If no clients are clearly affected, return an empty array for affected_clients.\n- Be precise and avoid generic reasoning.\n- Base the classification only on the information present in the article and the client dataset.\n\nReturn ONLY valid JSON in this exact format:\n{\n  \"title\": \"string\",\n  \"description\": \"string\",\n  \"url\": \"string\",\n  \"output\": {\n    \"impact\": \"High/Medium/Low\",\n    \"affected_clients\": [\n      {\n        \"client_name\": \"string\",\n        \"reason\": \"string\"\n      }\n    ]\n  }\n}\n\nStrict Instructions:\n- Do NOT include any explanations, markdown or extra text.\n- Do NOT change key names.\n- Always use \"affected_clients\" (NOT \"clients\").\n- Ensure the output is valid JSON."
            }
          ]
        },
        "jsonOutput": true,
        "builtInTools": {}
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "9581114b-43fa-4edd-982b-332e5e26264d",
      "name": "Extract Impact & Client Data",
      "type": "n8n-nodes-base.set",
      "position": [
        2272,
        880
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "3ed715e0-1787-4601-bfdf-451f3d5897bb",
              "name": "title",
              "type": "string",
              "value": "={{ $json.title }}"
            },
            {
              "id": "9a2c42f0-89d5-44b7-a502-147ca70d512b",
              "name": "description",
              "type": "string",
              "value": "={{ $json.description }}"
            },
            {
              "id": "c0991c5d-5c3c-45a0-8bed-34f1904983db",
              "name": "url",
              "type": "string",
              "value": "={{ $json.url }}"
            },
            {
              "id": "e4bdafd3-4a4b-489e-8b6d-dca11b5df378",
              "name": "impact",
              "type": "string",
              "value": "={{ $json.output.impact }}"
            },
            {
              "id": "08b49e01-b12b-48c8-9e27-861995628b87",
              "name": "clients",
              "type": "array",
              "value": "={{ $json.output.affected_clients }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "a2df5fdb-07e7-4039-a557-8f9dc3a922f2",
      "name": "Filter High Impact News",
      "type": "n8n-nodes-base.if",
      "position": [
        2544,
        880
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "52507560-65f5-4864-a221-ff7a6e16614b",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ ($json.impact || '').toLowerCase().trim() }}",
              "rightValue": "high"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "2a543c2c-4c5b-4d96-ba28-a5ec1c2975cd",
      "name": "Send High Impact Alert Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2784,
        768
      ],
      "parameters": {
        "sendTo": "",
        "message": "=High Impact Finance Alert!\n\nTitle: {{ $json.title }}\n\nSummary:\n{{ $json.description }}\n\nImpact Level: \n{{ $json.impact }}\n\nAffected Clients:\n{{ $json.clients.map(client => \n`- ${client.client_name}: ${client.reason}`\n).join('\\n\\n') }}\n\nArticle URL:\n{{ $json.url }}",
        "options": {
          "appendAttribution": false
        },
        "subject": "=High Impact News - {{ $json.title }}",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "7f0ea404-32d8-471f-addf-4bce587bd0ff",
      "name": "Fetch Client Dataset",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -240,
        912
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ANRVTCRVxSVsBej-9WyMMJiHi447jeFlR50Vd_ZJOS0/edit#gid=0",
          "cachedResultName": "Clients Data"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1ANRVTCRVxSVsBej-9WyMMJiHi447jeFlR50Vd_ZJOS0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ANRVTCRVxSVsBej-9WyMMJiHi447jeFlR50Vd_ZJOS0/edit?usp=drivesdk",
          "cachedResultName": "Client Impact Tracker"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "c41ce26d-9bd4-4553-9c06-d1fcf61c2bc8",
      "name": "Split News Articles",
      "type": "n8n-nodes-base.code",
      "position": [
        544,
        1008
      ],
      "parameters": {
        "jsCode": "const articles = $input.first().json.articles || [];\n\nreturn articles.map(article => ({\n  json: article\n}));"
      },
      "typeVersion": 2
    },
    {
      "id": "d9f32b74-6811-4885-8e17-fd85e255450f",
      "name": "Build Client Dataset Array",
      "type": "n8n-nodes-base.code",
      "position": [
        -16,
        912
      ],
      "parameters": {
        "jsCode": "const rows = $input.all();\n\nconst clientsData = rows.map(item => {\n  const row = item.json;\n\n  const splitField = (value) => {\n    if (!value) return [];\n    return String(value)\n      .split('|')\n      .map(v => v.trim())\n      .filter(Boolean);\n  };\n\n  return {\n    sr_no: row[\"Sr. No.\"] || \"\",\n    client_name: row[\"Client Name\"] || \"\",\n    profile: row[\"Profile\"] || \"\",\n    risk_appetite: row[\"Risk Appetite\"] || \"\",\n    goals: splitField(row[\"Goals\"]),\n    holdings: splitField(row[\"Holdings\"]),\n    sector_exposure: splitField(row[\"Sector Exposure\"]),\n    geography_exposure: splitField(row[\"Geography Exposure\"]),\n    sensitivity: splitField(row[\"Sensitivity\"]),\n  };\n});\n\nreturn [\n  {\n    json: {\n      clientsData\n    }\n  }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "834d97c2-7176-478d-8c65-d7466847176d",
      "name": "Process Articles One-by-One",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        768,
        880
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "c397f395-11c9-4f93-83fa-b547516b6d47",
      "name": "Build Logged URL List",
      "type": "n8n-nodes-base.code",
      "position": [
        -16,
        720
      ],
      "parameters": {
        "jsCode": "const rows = $input.all();\n\nconst normalizeUrl = (value) => {\n  if (!value) return '';\n  try {\n    const u = new URL(String(value).trim());\n    return `${u.origin}${u.pathname}`.trim();\n  } catch {\n    return String(value).trim().split('?')[0];\n  }\n};\n\nconst loggedUrls = rows\n  .map(item => item.json?.[\"Normalized URL\"] || item.json?.[\"Article URL\"] || '')\n  .filter(url => !!url)\n  .map(url => normalizeUrl(url));\n\nreturn [\n  {\n    json: {\n      loggedUrls\n    }\n  }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "35ea8d72-19ac-457a-aa03-3adbe55886d2",
      "name": "Check If Article Already Logged",
      "type": "n8n-nodes-base.code",
      "position": [
        1024,
        896
      ],
      "parameters": {
        "jsCode": "const article = $input.first().json;\n\nconst normalizeUrl = (value) => {\n  if (!value) return '';\n  try {\n    const u = new URL(String(value).trim());\n    return `${u.origin}${u.pathname}`.trim();\n  } catch {\n    return String(value).trim().split('?')[0];\n  }\n};\n\nconst currentUrl = String(article.url || '').trim();\nconst normalizedUrl = normalizeUrl(currentUrl);\n\nconst loggedUrls =\n  $items(\"Build Logged URL List\")[0]?.json?.loggedUrls || [];\n\nconst alreadyLogged = loggedUrls.includes(normalizedUrl);\n\nreturn [\n  {\n    json: {\n      ...article,\n      normalizedUrl,\n      alreadyLogged\n    }\n  }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "f4a026b2-133f-4412-86ae-7d51802211bb",
      "name": "Check If Article Is New",
      "type": "n8n-nodes-base.if",
      "position": [
        1248,
        896
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "d1e82893-0258-4fdf-ae88-8373dd5e5c95",
              "operator": {
                "type": "boolean",
                "operation": "equals"
              },
              "leftValue": "={{ $json.alreadyLogged }}",
              "rightValue": false
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "b7ed9d70-98c8-4361-b04c-388c094d3c71",
      "name": "Parse AI Response",
      "type": "n8n-nodes-base.code",
      "position": [
        2064,
        880
      ],
      "parameters": {
        "jsCode": "return JSON.parse($input.first().json.content.parts[0].text);\n"
      },
      "typeVersion": 2
    },
    {
      "id": "52d33191-530f-498b-bb3b-8c6e2449130a",
      "name": "Wait Before Next Article",
      "type": "n8n-nodes-base.wait",
      "position": [
        3440,
        944
      ],
      "parameters": {
        "unit": "minutes",
        "amount": 1
      },
      "typeVersion": 1.1
    },
    {
      "id": "dd7f5659-26a1-4f62-969b-1e43ffd4d34b",
      "name": "Attach Clients to Current Article",
      "type": "n8n-nodes-base.set",
      "position": [
        1520,
        880
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "315a9ab5-6f1e-41f8-a6d9-efee417bcf74",
              "name": "clientsData",
              "type": "array",
              "value": "={{ $items(\"Build Client Dataset Array\")[0].json.clientsData }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "e253d375-38f4-4bd4-b5de-757beacfef9a",
      "name": "Check If News Articles Exist",
      "type": "n8n-nodes-base.if",
      "position": [
        336,
        1120
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "638eeb08-5e47-4a25-b55d-0fc76154e62c",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ Array.isArray($json.articles) && $json.articles.length }}",
              "rightValue": 0
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "95f88da7-be34-49a0-aaf0-70efca03f381",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -528,
        592
      ],
      "parameters": {
        "color": 7,
        "width": 768,
        "height": 720,
        "content": "## Trigger & Source Data\nTriggers the workflow daily and fetches all inputs: latest business news, client dataset from Google Sheets (converted into structured arrays) and previously processed articles from the Article Processing Log used for deduplication."
      },
      "typeVersion": 1
    },
    {
      "id": "19e83493-2a67-4260-981b-98c390f19158",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        272,
        768
      ],
      "parameters": {
        "color": 7,
        "width": 1136,
        "height": 512,
        "content": "## Article Validation & Deduplication\nValidates that articles exist, splits them into individual items and processes them sequentially. Each article URL is normalized and compared against previously processed entries to ensure only new, unique articles proceed further."
      },
      "typeVersion": 1
    },
    {
      "id": "a09ea7e8-dbc7-4a62-97d5-327668ad8695",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1456,
        736
      ],
      "parameters": {
        "color": 7,
        "width": 976,
        "height": 352,
        "content": "## Client Mapping & AI Classification\nAttaches client dataset to each article and sends it to the AI model for impact analysis. The response is parsed into structured JSON, extracting impact level and affected clients for downstream filtering and actions."
      },
      "typeVersion": 1
    },
    {
      "id": "cbeaa2de-ee40-48bb-9977-c3a465c57cfd",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2480,
        640
      ],
      "parameters": {
        "color": 7,
        "width": 1120,
        "height": 512,
        "content": "## Alerting, Logging & Flow Control\nFilters high-impact articles to trigger email alerts, while all articles are logged in the Article Processing Log with an emailSent flag. This ensures full tracking, prevents duplicates and enforces a 1-minute delay between processing items."
      },
      "typeVersion": 1
    },
    {
      "id": "d786b2ec-397b-402f-ab1e-c9c1d7293b10",
      "name": "Fetch Already Processed Articles",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -240,
        720
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 783104820,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ANRVTCRVxSVsBej-9WyMMJiHi447jeFlR50Vd_ZJOS0/edit#gid=783104820",
          "cachedResultName": "Article Processing Log"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1ANRVTCRVxSVsBej-9WyMMJiHi447jeFlR50Vd_ZJOS0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ANRVTCRVxSVsBej-9WyMMJiHi447jeFlR50Vd_ZJOS0/edit?usp=drivesdk",
          "cachedResultName": "Client Impact Tracker"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7,
      "alwaysOutputData": true
    },
    {
      "id": "80c5ca2c-0dc9-4488-af4e-3bfacf28f789",
      "name": "Log Processed Article",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3248,
        880
      ],
      "parameters": {
        "columns": {
          "value": {
            "Title": "={{ $json.title }}",
            "Impact": "={{ $json.impact }}",
            "Sent At": "={{ $json.emailSent ? $now : '' }}",
            "Email Sent": "={{ $json.emailSent }}",
            "Article URL": "={{ $json.url }}",
            "Processed At": "={{ $now }}",
            "Affected Clients": "={{ $json.clients.map(client => client.client_name).join(' | ') }}"
          },
          "schema": [
            {
              "id": "Sr. No.",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Sr. No.",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Article URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Article URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Title",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Impact",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Impact",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Affected Clients",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Affected Clients",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email Sent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email Sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Processed At",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Processed At",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Sent At",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Sent At",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Title"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 783104820,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ANRVTCRVxSVsBej-9WyMMJiHi447jeFlR50Vd_ZJOS0/edit#gid=783104820",
          "cachedResultName": "Article Processing Log"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1ANRVTCRVxSVsBej-9WyMMJiHi447jeFlR50Vd_ZJOS0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ANRVTCRVxSVsBej-9WyMMJiHi447jeFlR50Vd_ZJOS0/edit?usp=drivesdk",
          "cachedResultName": "Client Impact Tracker"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "48a29445-2cc9-45eb-a115-678a76702c53",
      "name": "Prepare High Impact Log Entry",
      "type": "n8n-nodes-base.set",
      "position": [
        3008,
        768
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a8bba9f4-8eef-454b-928e-2f47746feace",
              "name": "url",
              "type": "string",
              "value": "={{ $('Filter High Impact News').item.json.url }}"
            },
            {
              "id": "a+1234567890bd6-46c4-a87b-110b1da87e4b",
              "name": "title",
              "type": "string",
              "value": "={{ $('Filter High Impact News').item.json.title }}"
            },
            {
              "id": "6e28a532-ef4b-4e2c-961b-388bd6ec4921",
              "name": "description",
              "type": "string",
              "value": "={{ $('Filter High Impact News').item.json.description }}"
            },
            {
              "id": "1296a2d6-53ff-4b3e-9258-c6ec565bbebe",
              "name": "impact",
              "type": "string",
              "value": "={{ $('Filter High Impact News').item.json.impact }}"
            },
            {
              "id": "e8d2b865-138d-45d4-ad31-5942dd4fe936",
              "name": "clients",
              "type": "array",
              "value": "={{ $('Filter High Impact News').item.json.clients }}"
            },
            {
              "id": "63026a3f-e229-4f25-87fc-c8128bb8cc3d",
              "name": "emailSent",
              "type": "boolean",
              "value": true
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "6b0788e9-6028-4d40-a207-fc5ed3db19d0",
      "name": "Prepare Low/Medium Impact Log Entry",
      "type": "n8n-nodes-base.set",
      "position": [
        2896,
        944
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "7fa67059-f117-499b-9162-8f4952c84cc8",
              "name": "emailSent",
              "type": "boolean",
              "value": false
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "versionId": "ba58ada2-6c4e-4e6c-a7f6-c56b883da738",
  "connections": {
    "Parse AI Response": {
      "main": [
        [
          {
            "node": "Extract Impact & Client Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split News Articles": {
      "main": [
        [
          {
            "node": "Process Articles One-by-One",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Client Dataset": {
      "main": [
        [
          {
            "node": "Build Client Dataset Array",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Processed Article": {
      "main": [
        [
          {
            "node": "Wait Before Next Article",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If Article Is New": {
      "main": [
        [
          {
            "node": "Attach Clients to Current Article",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Process Articles One-by-One",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter High Impact News": {
      "main": [
        [
          {
            "node": "Send High Impact Alert Email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare Low/Medium Impact Log Entry",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Impact Classification": {
      "main": [
        [
          {
            "node": "Parse AI Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily News Trigger (8AM)": {
      "main": [
        [
          {
            "node": "Fetch Client Dataset",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Already Processed Articles",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Latest Finance News",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Before Next Article": {
      "main": [
        [
          {
            "node": "Process Articles One-by-One",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Latest Finance News": {
      "main": [
        [
          {
            "node": "Check If News Articles Exist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Client Dataset Array": {
      "main": [
        []
      ]
    },
    "Process Articles One-by-One": {
      "main": [
        [],
        [
          {
            "node": "Check If Article Already Logged",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If News Articles Exist": {
      "main": [
        [
          {
            "node": "Split News Articles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Impact & Client Data": {
      "main": [
        [
          {
            "node": "Filter High Impact News",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send High Impact Alert Email": {
      "main": [
        [
          {
            "node": "Prepare High Impact Log Entry",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare High Impact Log Entry": {
      "main": [
        [
          {
            "node": "Log Processed Article",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If Article Already Logged": {
      "main": [
        [
          {
            "node": "Check If Article Is New",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Already Processed Articles": {
      "main": [
        [
          {
            "node": "Build Logged URL List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Attach Clients to Current Article": {
      "main": [
        [
          {
            "node": "AI Impact Classification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Low/Medium Impact Log Entry": {
      "main": [
        [
          {
            "node": "Log Processed Article",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}