{
  "id": "fediEoeMovqocfGL",
  "name": "Intelligent credit operations agent for verification screening and compliance",
  "tags": [],
  "nodes": [
    {
      "id": "ed5b7a96-1696-43dc-abca-dda6b95411d5",
      "name": "Credit Operations Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        256,
        688
      ],
      "parameters": {
        "path": "credit-operations",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 2.1
    },
    {
      "id": "c468325f-e3c2-4887-b06b-f314f82eb082",
      "name": "Credit Operations Coordinator",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        992,
        688
      ],
      "parameters": {
        "text": "={{ $json.body }}",
        "options": {
          "systemMessage": "You are a Credit Operations Coordinator AI responsible for orchestrating customer onboarding, KYC checks, credit reviews, servicing workflows, and communications.\n\nYour responsibilities:\n- Validate structured eligibility and compliance signals from customer applications\n- Coordinate verification workflows (KYC, identity, document validation)\n- Trigger follow-up communications and servicing workflows\n- Escalate exceptions to risk or compliance teams\n- Generate structured action plans with clear next steps\n\nIMPORTANT CONSTRAINTS:\n- You do NOT approve credit or make final credit decisions\n- You do NOT alter risk models or scoring algorithms\n- You validate data completeness and compliance requirements only\n- All credit approvals must be escalated to authorized risk teams\n- All compliance exceptions must be escalated to compliance officers\n\nWhen processing requests:\n1. Analyze the customer data and request type\n2. Validate required fields and compliance signals\n3. Determine appropriate verification workflows needed\n4. Identify any exceptions or escalation requirements\n5. Return structured output with clear action plan"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "63a54a0d-be83-4436-b350-e280a7c6f67d",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        352,
        912
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "id",
          "value": "gpt-4o"
        },
        "options": {
          "temperature": 0.2
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "c0464ba1-03ff-41b3-8de4-6e5422d3e5b5",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1792,
        912
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\"type\":\"object\",\"properties\":{\"requestType\":{\"type\":\"string\",\"enum\":[\"onboarding\",\"kyc_verification\",\"credit_review\",\"servicing\",\"compliance_check\"],\"description\":\"Type of credit operation request\"},\"customerId\":{\"type\":\"string\",\"description\":\"Unique customer identifier\"},\"eligibilityStatus\":{\"type\":\"string\",\"enum\":[\"eligible\",\"pending_verification\",\"requires_documentation\",\"compliance_exception\",\"ineligible\"],\"description\":\"Current eligibility assessment\"},\"complianceSignals\":{\"type\":\"object\",\"properties\":{\"kycComplete\":{\"type\":\"boolean\"},\"identityVerified\":{\"type\":\"boolean\"},\"sanctionsCheckPassed\":{\"type\":\"boolean\"},\"documentsComplete\":{\"type\":\"boolean\"},\"riskTier\":{\"type\":\"string\",\"enum\":[\"low\",\"medium\",\"high\",\"critical\"]}},\"required\":[\"kycComplete\",\"identityVerified\",\"sanctionsCheckPassed\",\"documentsComplete\",\"riskTier\"]},\"requiredActions\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"action\":{\"type\":\"string\",\"enum\":[\"trigger_kyc\",\"verify_identity\",\"request_documents\",\"credit_bureau_check\",\"compliance_review\",\"send_notification\",\"escalate_to_risk\",\"escalate_to_compliance\"]},\"priority\":{\"type\":\"string\",\"enum\":[\"immediate\",\"high\",\"medium\",\"low\"]},\"details\":{\"type\":\"string\"}},\"required\":[\"action\",\"priority\",\"details\"]}},\"escalationRequired\":{\"type\":\"boolean\",\"description\":\"Whether this case requires human escalation\"},\"escalationReason\":{\"type\":\"string\",\"description\":\"Reason for escalation if required\"},\"nextSteps\":{\"type\":\"string\",\"description\":\"Summary of recommended next steps\"}},\"required\":[\"requestType\",\"customerId\",\"eligibilityStatus\",\"complianceSignals\",\"requiredActions\",\"escalationRequired\",\"nextSteps\"]}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "8b8653ac-e08e-4417-8d5f-0fa08370195f",
      "name": "Conversation Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        528,
        912
      ],
      "parameters": {
        "contextWindowLength": 10
      },
      "typeVersion": 1.3
    },
    {
      "id": "38f25767-87f4-4836-89a5-5c72fb730b15",
      "name": "KYC Verification API Tool",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        672,
        912
      ],
      "parameters": {
        "url": "<__PLACEHOLDER_VALUE__kyc_api_endpoint__>",
        "method": "POST",
        "options": {},
        "toolDescription": "Performs KYC (Know Your Customer) verification checks. Provide customer ID and personal information to validate identity and compliance status."
      },
      "typeVersion": 4.4
    },
    {
      "id": "9cfbc0f6-c3ef-4a35-909f-06c17c711381",
      "name": "Credit Bureau API Tool",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        848,
        912
      ],
      "parameters": {
        "url": "<__PLACEHOLDER_VALUE__credit_bureau_api_endpoint__>",
        "method": "POST",
        "options": {},
        "toolDescription": "Queries credit bureau for customer credit history and score. Provide customer ID and SSN to retrieve credit report."
      },
      "typeVersion": 4.4
    },
    {
      "id": "0a7b8ef1-f132-4002-b2d4-200c61d2ac39",
      "name": "Identity Verification Tool",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        992,
        912
      ],
      "parameters": {
        "url": "<__PLACEHOLDER_VALUE__identity_verification_api_endpoint__>",
        "method": "POST",
        "options": {},
        "toolDescription": "Verifies customer identity using government ID and biometric checks. Provide customer ID and document information."
      },
      "typeVersion": 4.4
    },
    {
      "id": "02229482-0859-4e50-a742-7e57e813c0fa",
      "name": "Sanctions Screening Tool",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        1152,
        912
      ],
      "parameters": {
        "url": "<__PLACEHOLDER_VALUE__sanctions_screening_api_endpoint__>",
        "method": "POST",
        "options": {},
        "toolDescription": "Screens customer against sanctions lists, PEP databases, and watchlists. Provide customer name and country for compliance check."
      },
      "typeVersion": 4.4
    },
    {
      "id": "4f45a0a6-efd2-40ad-8abb-61ce63d1fc93",
      "name": "Email Communication Tool",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        1264,
        976
      ],
      "parameters": {
        "sendTo": "={{ $fromAI('toEmail', 'Recipient email address', 'string') }}",
        "message": "={{ $fromAI('message', 'Email message body', 'string') }}",
        "options": {},
        "subject": "={{ $fromAI('subject', 'Email subject line', 'string') }}",
        "descriptionType": "manual",
        "toolDescription": "Sends email communications to customers for verification requests, document requests, status updates, or follow-up notifications. Provide recipient email, subject, and message content."
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "793b1356-ce64-49f0-9708-440c9494bbae",
      "name": "Risk Team Escalation Tool",
      "type": "n8n-nodes-base.slackHitlTool",
      "position": [
        1376,
        912
      ],
      "parameters": {
        "select": "channel",
        "message": "={{ $fromAI('escalationMessage', 'Detailed escalation message with customer context and risk factors', 'string') }}",
        "options": {},
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "<__PLACEHOLDER_VALUE__risk_approval_slack_channel__>"
        },
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.4
    },
    {
      "id": "8f2ef617-74fd-4c95-a821-a2579af6fd18",
      "name": "Compliance Alert Tool",
      "type": "n8n-nodes-base.slackTool",
      "position": [
        1664,
        912
      ],
      "parameters": {
        "text": "={{ $fromAI('alertMessage', 'Compliance alert message with violation details', 'string') }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $fromAI('channel', 'Slack channel ID or name for compliance alerts', 'string') }}"
        },
        "otherOptions": {},
        "authentication": "oAuth2",
        "descriptionType": "manual",
        "toolDescription": "Sends immediate alerts to compliance team channel for sanctions hits, PEP matches, or compliance exceptions. Provide alert details and customer information."
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.4
    },
    {
      "id": "edd8198e-4993-4d2b-9ac3-a7363f82aa94",
      "name": "Route by Eligibility Status",
      "type": "n8n-nodes-base.switch",
      "position": [
        2000,
        640
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "string": [
                  {
                    "value1": "={{ $json.output.eligibilityStatus }}",
                    "value2": "eligible",
                    "operation": "equals"
                  }
                ]
              }
            },
            {
              "conditions": {
                "string": [
                  {
                    "value1": "={{ $json.output.eligibilityStatus }}",
                    "value2": "pending_verification",
                    "operation": "equals"
                  }
                ]
              }
            },
            {
              "conditions": {
                "string": [
                  {
                    "value1": "={{ $json.output.eligibilityStatus }}",
                    "value2": "requires_documentation",
                    "operation": "equals"
                  }
                ]
              }
            },
            {
              "conditions": {
                "string": [
                  {
                    "value1": "={{ $json.output.eligibilityStatus }}",
                    "value2": "compliance_exception",
                    "operation": "equals"
                  }
                ]
              }
            },
            {
              "conditions": {
                "string": [
                  {
                    "value1": "={{ $json.output.eligibilityStatus }}",
                    "value2": "ineligible",
                    "operation": "equals"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.4
    },
    {
      "id": "65af785a-347e-43df-b201-bd0ef8f40dcf",
      "name": "Prepare Eligible Customer Data",
      "type": "n8n-nodes-base.set",
      "position": [
        2304,
        848
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "customerId",
              "type": "string",
              "value": "={{ $json.output.customerId }}"
            },
            {
              "id": "id-2",
              "name": "status",
              "type": "string",
              "value": "eligible"
            },
            {
              "id": "id-3",
              "name": "eligibilityStatus",
              "type": "string",
              "value": "={{ $json.output.eligibilityStatus }}"
            },
            {
              "id": "id-4",
              "name": "kycComplete",
              "type": "boolean",
              "value": "={{ $json.output.complianceSignals.kycComplete }}"
            },
            {
              "id": "id-5",
              "name": "identityVerified",
              "type": "boolean",
              "value": "={{ $json.output.complianceSignals.identityVerified }}"
            },
            {
              "id": "id-6",
              "name": "sanctionsCheckPassed",
              "type": "boolean",
              "value": "={{ $json.output.complianceSignals.sanctionsCheckPassed }}"
            },
            {
              "id": "id-7",
              "name": "documentsComplete",
              "type": "boolean",
              "value": "={{ $json.output.complianceSignals.documentsComplete }}"
            },
            {
              "id": "id-8",
              "name": "riskTier",
              "type": "string",
              "value": "={{ $json.output.complianceSignals.riskTier }}"
            },
            {
              "id": "id-9",
              "name": "processedAt",
              "type": "string",
              "value": "={{ $now.toISO() }}"
            },
            {
              "id": "id-10",
              "name": "nextSteps",
              "type": "string",
              "value": "={{ $json.output.nextSteps }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "8540af5c-50ef-4ce4-8f46-2c631c8dcf34",
      "name": "Prepare Verification Request",
      "type": "n8n-nodes-base.set",
      "position": [
        2304,
        1040
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "customerId",
              "type": "string",
              "value": "={{ $json.output.customerId }}"
            },
            {
              "id": "id-2",
              "name": "status",
              "type": "string",
              "value": "pending_verification"
            },
            {
              "id": "id-3",
              "name": "eligibilityStatus",
              "type": "string",
              "value": "={{ $json.output.eligibilityStatus }}"
            },
            {
              "id": "id-4",
              "name": "requiredActions",
              "type": "array",
              "value": "={{ JSON.stringify($json.output.requiredActions) }}"
            },
            {
              "id": "id-5",
              "name": "complianceSignals",
              "type": "object",
              "value": "={{ JSON.stringify($json.output.complianceSignals) }}"
            },
            {
              "id": "id-6",
              "name": "processedAt",
              "type": "string",
              "value": "={{ $now.toISO() }}"
            },
            {
              "id": "id-7",
              "name": "nextSteps",
              "type": "string",
              "value": "={{ $json.output.nextSteps }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "2fd88023-f02a-4798-9387-8f32a6ea2872",
      "name": "Prepare Documentation Request",
      "type": "n8n-nodes-base.set",
      "position": [
        2304,
        1232
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "customerId",
              "type": "string",
              "value": "={{ $json.output.customerId }}"
            },
            {
              "id": "id-2",
              "name": "status",
              "type": "string",
              "value": "requires_documentation"
            },
            {
              "id": "id-3",
              "name": "eligibilityStatus",
              "type": "string",
              "value": "={{ $json.output.eligibilityStatus }}"
            },
            {
              "id": "id-4",
              "name": "requiredActions",
              "type": "array",
              "value": "={{ JSON.stringify($json.output.requiredActions) }}"
            },
            {
              "id": "id-5",
              "name": "complianceSignals",
              "type": "object",
              "value": "={{ JSON.stringify($json.output.complianceSignals) }}"
            },
            {
              "id": "id-6",
              "name": "processedAt",
              "type": "string",
              "value": "={{ $now.toISO() }}"
            },
            {
              "id": "id-7",
              "name": "nextSteps",
              "type": "string",
              "value": "={{ $json.output.nextSteps }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "9bfa68c7-ef1e-49ac-acef-d89e41b896f4",
      "name": "Prepare Compliance Escalation",
      "type": "n8n-nodes-base.set",
      "position": [
        2304,
        1424
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "customerId",
              "type": "string",
              "value": "={{ $json.output.customerId }}"
            },
            {
              "id": "id-2",
              "name": "status",
              "type": "string",
              "value": "compliance_exception"
            },
            {
              "id": "id-3",
              "name": "eligibilityStatus",
              "type": "string",
              "value": "={{ $json.output.eligibilityStatus }}"
            },
            {
              "id": "id-4",
              "name": "escalationRequired",
              "type": "boolean",
              "value": "={{ $json.output.escalationRequired }}"
            },
            {
              "id": "id-5",
              "name": "escalationReason",
              "type": "string",
              "value": "={{ $json.output.escalationReason }}"
            },
            {
              "id": "id-6",
              "name": "complianceSignals",
              "type": "object",
              "value": "={{ JSON.stringify($json.output.complianceSignals) }}"
            },
            {
              "id": "id-7",
              "name": "requiredActions",
              "type": "array",
              "value": "={{ JSON.stringify($json.output.requiredActions) }}"
            },
            {
              "id": "id-8",
              "name": "processedAt",
              "type": "string",
              "value": "={{ $now.toISO() }}"
            },
            {
              "id": "id-9",
              "name": "nextSteps",
              "type": "string",
              "value": "={{ $json.output.nextSteps }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "970afa65-5100-444b-a418-f6da49771ba7",
      "name": "Store Eligible Customers",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        2528,
        848
      ],
      "parameters": {
        "columns": {
          "value": null,
          "mappingMode": "autoMapInputData"
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "id",
          "value": "<__PLACEHOLDER_VALUE__eligible_customers_table__>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "d8016093-cc0b-414c-aac8-e26727dce123",
      "name": "Trigger Verification Workflow",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        2528,
        1040
      ],
      "parameters": {
        "options": {
          "waitForSubWorkflow": true
        },
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "efe4f499-6d05-444e-b2f9-1b0f47d0b1e3",
      "name": "Send Documentation Request Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2528,
        1232
      ],
      "parameters": {
        "sendTo": "={{ $json.customerEmail || '<__PLACEHOLDER_VALUE__customer_email__>' }}",
        "message": "=Dear Customer,\n\nWe are processing your credit application (Customer ID: {{ $json.customerId }}).\n\nTo proceed with your application, we require the following documentation:\n\n{{ $json.nextSteps }}\n\nRequired Actions:\n{{ $json.requiredActions.map(action => '- ' + action.details).join('\\n') }}\n\nPlease submit the requested documents at your earliest convenience.\n\nBest regards,\nCredit Operations Team",
        "options": {
          "appendAttribution": false
        },
        "subject": "Documentation Required for Credit Application"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "41f8f1c7-7358-456b-b254-84dbdfdc0607",
      "name": "Alert Compliance Team",
      "type": "n8n-nodes-base.slack",
      "position": [
        2528,
        1424
      ],
      "parameters": {
        "text": "=\ud83d\udea8 COMPLIANCE EXCEPTION ALERT\n\nCustomer ID: {{ $json.customerId }}\nStatus: {{ $json.eligibilityStatus }}\nRisk Tier: {{ $json.complianceSignals.riskTier }}\n\nEscalation Required: {{ $json.escalationRequired }}\nReason: {{ $json.escalationReason }}\n\nCompliance Signals:\n- KYC Complete: {{ $json.complianceSignals.kycComplete }}\n- Identity Verified: {{ $json.complianceSignals.identityVerified }}\n- Sanctions Check: {{ $json.complianceSignals.sanctionsCheckPassed }}\n- Documents Complete: {{ $json.complianceSignals.documentsComplete }}\n\nNext Steps: {{ $json.nextSteps }}\n\nRequired Actions:\n{{ $json.requiredActions.map(action => action.priority + ': ' + action.details).join('\\n') }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "<__PLACEHOLDER_VALUE__compliance_team_slack_channel__>"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.4
    },
    {
      "id": "30a3655a-314d-40aa-aa0e-12281f029fd6",
      "name": "Log All Operations",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        2976,
        1040
      ],
      "parameters": {
        "columns": {
          "value": null,
          "mappingMode": "autoMapInputData"
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "id",
          "value": "<__PLACEHOLDER_VALUE__audit_log_table__>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "20059cb8-2069-4b6c-ad27-9cc0a7fe1dc7",
      "name": "Prepare Audit Log",
      "type": "n8n-nodes-base.set",
      "position": [
        2752,
        1040
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "customerId",
              "type": "string",
              "value": "={{ $json.customerId }}"
            },
            {
              "id": "id-2",
              "name": "requestType",
              "type": "string",
              "value": "={{ $('Credit Operations Coordinator').item.json.output.requestType }}"
            },
            {
              "id": "id-3",
              "name": "eligibilityStatus",
              "type": "string",
              "value": "={{ $json.eligibilityStatus || $json.status }}"
            },
            {
              "id": "id-4",
              "name": "processedAt",
              "type": "string",
              "value": "={{ $json.processedAt }}"
            },
            {
              "id": "id-5",
              "name": "complianceSignals",
              "type": "object",
              "value": "={{ JSON.stringify($json.complianceSignals) }}"
            },
            {
              "id": "id-6",
              "name": "requiredActions",
              "type": "array",
              "value": "={{ JSON.stringify($json.requiredActions || []) }}"
            },
            {
              "id": "id-7",
              "name": "escalationRequired",
              "type": "boolean",
              "value": "={{ $json.escalationRequired || false }}"
            },
            {
              "id": "id-8",
              "name": "escalationReason",
              "type": "string",
              "value": "={{ $json.escalationReason || 'N/A' }}"
            },
            {
              "id": "id-9",
              "name": "nextSteps",
              "type": "string",
              "value": "={{ $json.nextSteps }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "6494937f-54c5-449b-b09c-0ca005e7da0b",
      "name": "Send Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3424,
        1040
      ],
      "parameters": {
        "options": {},
        "respondWith": "json",
        "responseBody": "={{ $json }}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "346001c9-279b-4b98-acf0-8b3c47cd55d7",
      "name": "Format Response",
      "type": "n8n-nodes-base.set",
      "position": [
        3200,
        1040
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "success",
              "type": "boolean",
              "value": true
            },
            {
              "id": "id-2",
              "name": "customerId",
              "type": "string",
              "value": "={{ $json.customerId }}"
            },
            {
              "id": "id-3",
              "name": "status",
              "type": "string",
              "value": "={{ $json.eligibilityStatus || $json.status }}"
            },
            {
              "id": "id-4",
              "name": "message",
              "type": "string",
              "value": "={{ $json.nextSteps }}"
            },
            {
              "id": "id-5",
              "name": "processedAt",
              "type": "string",
              "value": "={{ $json.processedAt }}"
            },
            {
              "id": "id-6",
              "name": "escalationRequired",
              "type": "boolean",
              "value": "={{ $json.escalationRequired || false }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "0e71ef39-448a-4dde-8e15-f9bca5a509c1",
      "name": "Risk Escalation Slack Tool",
      "type": "n8n-nodes-base.slackTool",
      "position": [
        1456,
        1120
      ],
      "parameters": {
        "text": "={{ $fromAI('message', 'Risk escalation message', 'string') }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $fromAI('channel', 'Risk team Slack channel ID', 'string') }}"
        },
        "otherOptions": {},
        "authentication": "oAuth2",
        "descriptionType": "manual",
        "toolDescription": "Sends notification to risk team Slack channel"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.4
    },
    {
      "id": "3e719303-b80a-464a-b7e8-f3f452d70685",
      "name": "Prepare Ineligible Customer Data",
      "type": "n8n-nodes-base.set",
      "position": [
        2304,
        656
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "customerId",
              "type": "string",
              "value": "={{ $json.output.customerId }}"
            },
            {
              "id": "id-2",
              "name": "status",
              "type": "string",
              "value": "ineligible"
            },
            {
              "id": "id-3",
              "name": "eligibilityStatus",
              "type": "string",
              "value": "={{ $json.output.eligibilityStatus }}"
            },
            {
              "id": "id-4",
              "name": "complianceSignals",
              "type": "object",
              "value": "={{ JSON.stringify($json.output.complianceSignals) }}"
            },
            {
              "id": "id-5",
              "name": "processedAt",
              "type": "string",
              "value": "={{ $now.toISO() }}"
            },
            {
              "id": "id-6",
              "name": "nextSteps",
              "type": "string",
              "value": "={{ $json.output.nextSteps }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c8e0086f-238d-4530-acdd-4be1229fc97b",
      "name": "Store Ineligible Customers",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        2528,
        656
      ],
      "parameters": {
        "columns": {
          "value": null,
          "mappingMode": "autoMapInputData"
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "id",
          "value": "<__PLACEHOLDER_VALUE__ineligible_customers_table__>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "19011982-d2cd-4acf-8d9b-282a46c140ec",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1328,
        160
      ],
      "parameters": {
        "color": 6,
        "width": 496,
        "height": 368,
        "content": "## Prerequisites\n- KYC & Credit Bureau API credentials\n- Sanctions screening API access\n- Gmail OAuth2 and Slack bot token\n- Airtable API key\n## Use Cases\n- Fintech platforms automating loan application eligibility screening\n## Customisation\n- Add extra verification tools (e.g., biometric or document OCR APIs)\n## Benefits\n- Eliminates manual KYC and sanctions review bottlenecks"
      },
      "typeVersion": 1
    },
    {
      "id": "3dd2997d-2a99-4211-ad3d-4c51bd3a3d0b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        288
      ],
      "parameters": {
        "width": 432,
        "height": 272,
        "content": "## Setup Steps\n1. Set webhook URL and connect Credit Operations webhook node to your intake system.\n2. Add OpenAI API key to the OpenAI Chat Model node.\n3. Configure KYC, Credit Bureau, Identity, and Sanctions tool credentials.\n4. Add Gmail OAuth2 and Slack bot token for notification nodes.\n5. Connect Airtable API key; set base/table IDs for eligible and ineligible customer stores."
      },
      "typeVersion": 1
    },
    {
      "id": "128ebdfc-734c-49dd-acf0-1f8038107884",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        272
      ],
      "parameters": {
        "width": 576,
        "height": 272,
        "content": "## How It Works\nThis workflow automates credit operations onboarding by running KYC verification, credit bureau checks, identity validation, and sanctions screening through a single AI-powered agent. Built for credit operations teams, compliance officers, and fintech platforms, it eliminates manual eligibility reviews that are slow and error-prone. Triggered via webhook, the Credit Operations Agent orchestrates all verification tools simultaneously, then routes customers by eligibility status, eligible, ineligible, pending documentation, or compliance escalation. Each path prepares structured data stored in Airtable, triggers appropriate follow-up actions (email, Slack alerts), and logs a full audit trail. A final formatted response is returned to the originating system, closing the loop end-to-end with no manual handoffs."
      },
      "typeVersion": 1
    },
    {
      "id": "43b324e9-a1c4-4b8e-b19e-2e8121ab18fd",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2704,
        816
      ],
      "parameters": {
        "color": 7,
        "width": 912,
        "height": 768,
        "content": "### Store & Notify\n**Why:** Persists results to Airtable and dispatches Gmail or Slack notifications per outcome."
      },
      "typeVersion": 1
    },
    {
      "id": "4f18c821-4ddb-4641-ba74-088e0b0b7ab6",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1968,
        496
      ],
      "parameters": {
        "color": 7,
        "width": 720,
        "height": 1120,
        "content": "## Route by Eligibility Status\n**Why:** Splits outcomes into eligible, ineligible, documentation-required, or compliance-escalation paths."
      },
      "typeVersion": 1
    },
    {
      "id": "af8e83a3-5650-4c5d-9c27-9d531b9f08d5",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        192,
        560
      ],
      "parameters": {
        "color": 7,
        "width": 1728,
        "height": 800,
        "content": "## KYC, Bureau & Sanctions Checks\n**Why:** Validates identity, creditworthiness, and watchlist status before any routing decision."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "versionId": "0b3b256e-bbca-4a0b-94bd-61386e8a25cd",
  "connections": {
    "Format Response": {
      "main": [
        [
          {
            "node": "Send Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Credit Operations Coordinator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Audit Log": {
      "main": [
        [
          {
            "node": "Log All Operations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log All Operations": {
      "main": [
        [
          {
            "node": "Format Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Conversation Memory": {
      "ai_memory": [
        [
          {
            "node": "Credit Operations Coordinator",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Alert Compliance Team": {
      "main": [
        [
          {
            "node": "Prepare Audit Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compliance Alert Tool": {
      "ai_tool": [
        [
          {
            "node": "Credit Operations Coordinator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Credit Bureau API Tool": {
      "ai_tool": [
        [
          {
            "node": "Credit Operations Coordinator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Email Communication Tool": {
      "ai_tool": [
        [
          {
            "node": "Credit Operations Coordinator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Sanctions Screening Tool": {
      "ai_tool": [
        [
          {
            "node": "Credit Operations Coordinator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Store Eligible Customers": {
      "main": [
        [
          {
            "node": "Prepare Audit Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Credit Operations Coordinator",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Credit Operations Webhook": {
      "main": [
        [
          {
            "node": "Credit Operations Coordinator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "KYC Verification API Tool": {
      "ai_tool": [
        [
          {
            "node": "Credit Operations Coordinator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Risk Team Escalation Tool": {
      "ai_tool": [
        [
          {
            "node": "Credit Operations Coordinator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Identity Verification Tool": {
      "ai_tool": [
        [
          {
            "node": "Credit Operations Coordinator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Risk Escalation Slack Tool": {
      "ai_tool": [
        [
          {
            "node": "Risk Team Escalation Tool",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Store Ineligible Customers": {
      "main": [
        [
          {
            "node": "Prepare Audit Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Eligibility Status": {
      "main": [
        [
          {
            "node": "Prepare Eligible Customer Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare Verification Request",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare Documentation Request",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare Compliance Escalation",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare Ineligible Customer Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Verification Request": {
      "main": [
        [
          {
            "node": "Trigger Verification Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Credit Operations Coordinator": {
      "main": [
        [
          {
            "node": "Route by Eligibility Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Compliance Escalation": {
      "main": [
        [
          {
            "node": "Alert Compliance Team",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Documentation Request": {
      "main": [
        [
          {
            "node": "Send Documentation Request Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger Verification Workflow": {
      "main": [
        [
          {
            "node": "Prepare Audit Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Eligible Customer Data": {
      "main": [
        [
          {
            "node": "Store Eligible Customers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Ineligible Customer Data": {
      "main": [
        [
          {
            "node": "Store Ineligible Customers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Documentation Request Email": {
      "main": [
        [
          {
            "node": "Prepare Audit Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}