AutomationFlowsEmail & Gmail › Loan eligibility workflow

Loan eligibility workflow

Loan eligibility workflow. Uses formTrigger, googleSheets, gmail. Event-driven trigger; 53 nodes.

Event trigger★★★★★ complexity53 nodesForm TriggerGoogle SheetsGmail
Email & Gmail Trigger: Event Nodes: 53 Complexity: ★★★★★

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Loan eligibility workflow",
  "nodes": [
    {
      "parameters": {
        "formTitle": "Loan form",
        "formFields": {
          "values": [
            {
              "fieldLabel": "First Name",
              "requiredField": true
            },
            {
              "fieldLabel": "Last name",
              "requiredField": true
            },
            {
              "fieldLabel": "Email",
              "fieldType": "email",
              "requiredField": true
            },
            {
              "fieldLabel": "Phone number",
              "fieldType": "number"
            },
            {
              "fieldLabel": "Address",
              "requiredField": true
            },
            {
              "fieldLabel": "Salary range",
              "fieldType": "dropdown",
              "fieldOptions": {
                "values": [
                  {
                    "option": "500k and below"
                  },
                  {
                    "option": "\u2060> 500k to 1 million"
                  },
                  {
                    "option": "\u2060> 1 million"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldLabel": "How much do you need?",
              "fieldType": "number",
              "requiredField": true
            },
            {
              "fieldLabel": "Reason for loan",
              "requiredField": true
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.5,
      "position": [
        -2192,
        48
      ],
      "id": "f0d2dd1c-3723-4ad9-915d-96b13ae281d2",
      "name": "On form submission"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "055af3ff-3331-4b09-86ee-553bddcc156b",
              "name": "Name",
              "value": "={{ $json['First Name'].trim() + \" \" + $json['Last name'].trim() }}",
              "type": "string"
            },
            {
              "id": "b6379930-5b61-4ce8-b75a-387fad0d0350",
              "name": "loan amount requested",
              "value": "={{ parseFloat(String($json['How much do you need?']).replace(/[^0-9.]/g, \"\")) }}",
              "type": "number"
            },
            {
              "id": "de82dedf-b598-4631-a6aa-fcf4d09294a4",
              "name": "loan request submitted at",
              "value": "={{ new Date($json.submittedAt).toLocaleString('en-GB', { day: '2-digit', month: '2-digit', year: 'numeric', hour: '2-digit', minute: '2-digit', hour12: false }) }}",
              "type": "number"
            },
            {
              "id": "b116d0b1-aaa9-4e65-aca5-87f131d41f5b",
              "name": "email",
              "value": "={{ $json.Email }}",
              "type": "string"
            },
            {
              "id": "1d38e733-ea0d-44fd-b81e-0d14284ad047",
              "name": "Phone number",
              "value": "={{ $json['Phone number'] }}",
              "type": "number"
            },
            {
              "id": "800de9b4-e66e-436e-8a10-4755f6b193d4",
              "name": "Address",
              "value": "={{ $json.Address }}",
              "type": "string"
            },
            {
              "id": "28e4474e-e9cb-4964-84b3-45da4f5cc127",
              "name": "Salary range",
              "value": "={{ $json['Salary range'] }}",
              "type": "string"
            },
            {
              "id": "9a4b5d76-ca68-4d94-969f-e1f16133a6fb",
              "name": "Reason for loan",
              "value": "={{ $json['Reason for loan'] }}",
              "type": "string"
            },
            {
              "id": "59317f05-62e0-428a-8438-6fddabe43747",
              "name": "applicant id",
              "value": "={{ \"APP-\" + $now.toMillis() }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -1984,
        48
      ],
      "id": "0d0d58a4-b6c1-421a-a376-cc26a87e4303",
      "name": "Concatenate name and give applicant ID"
    },
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "YOUR_SHEET_ID_HERE",
          "mode": "list",
          "cachedResultName": "n8n_practice",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID_HERE/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "YOUR_SHEET_TAB_ID",
          "mode": "list",
          "cachedResultName": "Loan eligibility",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID_HERE/edit#gid=792244757"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "name": "={{ $json.Name }}",
            "email": "={{ $json.email }}",
            "phone": "={{ $json['Phone number'] }}",
            "salary": "={{ $json['Salary range'] }}",
            "loan request submitted at": "={{ $json['loan request submitted at'] }}",
            "loan amount requested": "={{ $json['loan amount requested'] }}",
            "reason for loan": "={{ $json['Reason for loan'] }}",
            "applicant_id": "={{ $json['applicant id'] }}"
          },
          "matchingColumns": [
            "applicant_id"
          ],
          "schema": [
            {
              "id": "applicant_id",
              "displayName": "applicant_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "email",
              "displayName": "email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "phone",
              "displayName": "phone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "salary",
              "displayName": "salary",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "loan request submitted at",
              "displayName": "loan request submitted at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "loan amount requested",
              "displayName": "loan amount requested",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "loan_term_months",
              "displayName": "loan_term_months",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "reason for loan",
              "displayName": "reason for loan",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "eligibility status",
              "displayName": "eligibility status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "interest rate",
              "displayName": "interest rate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "total payable",
              "displayName": "total payable",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "monthly_repayment",
              "displayName": "monthly_repayment",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "response status",
              "displayName": "response status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "follow up count",
              "displayName": "follow up count",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -1776,
        48
      ],
      "id": "56080e3e-5d39-429a-b245-456c41a55fd3",
      "name": "Append or update row in sheet",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "={{ $json.email }}",
        "subject": "We've received your application!",
        "message": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"/>\n  <title>Loan Application Received</title>\n  <style>\n    @import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@400;500;600&display=swap');\n\n    * { margin: 0; padding: 0; box-sizing: border-box; }\n\n    body {\n      background-color: #f0ede8;\n      font-family: 'DM Sans', sans-serif;\n      padding: 40px 16px;\n      color: #1a1a1a;\n    }\n\n    .wrapper {\n      max-width: 580px;\n      margin: 0 auto;\n      background: #ffffff;\n      border-radius: 4px;\n      overflow: hidden;\n      box-shadow: 0 4px 24px rgba(0,0,0,0.08);\n    }\n\n    /* Header */\n    .header {\n      background: #1a2e22;\n      padding: 40px 48px 36px;\n      position: relative;\n      overflow: hidden;\n    }\n\n    .header::before {\n      content: '';\n      position: absolute;\n      top: -40px; right: -40px;\n      width: 180px; height: 180px;\n      border-radius: 50%;\n      background: rgba(255,255,255,0.04);\n    }\n\n    .header::after {\n      content: '';\n      position: absolute;\n      bottom: -20px; left: 30px;\n      width: 100px; height: 100px;\n      border-radius: 50%;\n      background: rgba(255,255,255,0.03);\n    }\n\n    .brand {\n      font-family: 'DM Sans', sans-serif;\n      font-weight: 600;\n      font-size: 13px;\n      letter-spacing: 0.15em;\n      text-transform: uppercase;\n      color: #8dbe9a;\n      margin-bottom: 20px;\n    }\n\n    .header h1 {\n      font-family: 'DM Serif Display', serif;\n      font-size: 32px;\n      color: #ffffff;\n      line-height: 1.2;\n      font-weight: 400;\n    }\n\n    .header h1 span {\n      color: #8dbe9a;\n    }\n\n    /* Body */\n    .body {\n      padding: 44px 48px;\n    }\n\n    .greeting {\n      font-size: 16px;\n      color: #555;\n      margin-bottom: 20px;\n      line-height: 1.6;\n    }\n\n    .greeting strong {\n      color: #1a2e22;\n      font-weight: 600;\n    }\n\n    .message {\n      font-size: 15px;\n      line-height: 1.75;\n      color: #444;\n      margin-bottom: 32px;\n    }\n\n    /* Status card */\n    .status-card {\n      background: #f6f9f6;\n      border-left: 3px solid #1a2e22;\n      border-radius: 0 6px 6px 0;\n      padding: 20px 24px;\n      margin-bottom: 36px;\n    }\n\n    .status-card p {\n      font-size: 13px;\n      font-weight: 600;\n      letter-spacing: 0.1em;\n      text-transform: uppercase;\n      color: #8dbe9a;\n      margin-bottom: 8px;\n    }\n\n    .status-card .ref {\n      font-size: 22px;\n      font-family: 'DM Serif Display', serif;\n      color: #1a2e22;\n    }\n\n    /* Steps */\n    .steps-title {\n      font-size: 11px;\n      font-weight: 600;\n      letter-spacing: 0.12em;\n      text-transform: uppercase;\n      color: #999;\n      margin-bottom: 18px;\n    }\n\n    .step {\n      display: flex;\n      gap: 16px;\n      align-items: flex-start;\n      margin-bottom: 16px;\n    }\n\n    .step-num {\n      width: 28px;\n      height: 28px;\n      min-width: 28px;\n      background: #1a2e22;\n      color: #fff;\n      border-radius: 50%;\n      font-size: 12px;\n      font-weight: 600;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n      margin-top: 1px;\n    }\n\n    .step-text {\n      font-size: 14px;\n      color: #555;\n      line-height: 1.6;\n    }\n\n    .step-text strong {\n      color: #1a2e22;\n      font-weight: 600;\n    }\n\n    .divider {\n      border: none;\n      border-top: 1px solid #ebebeb;\n      margin: 36px 0;\n    }\n\n    .closing {\n      font-size: 14px;\n      color: #666;\n      line-height: 1.7;\n    }\n\n    .closing strong {\n      display: block;\n      color: #1a2e22;\n      font-size: 15px;\n      margin-top: 20px;\n      font-weight: 600;\n    }\n\n    /* Footer */\n    .footer {\n      background: #f6f9f6;\n      padding: 24px 48px;\n      border-top: 1px solid #e8ede8;\n    }\n\n    .footer p {\n      font-size: 12px;\n      color: #999;\n      line-height: 1.6;\n      text-align: center;\n    }\n\n    .footer a {\n      color: #1a2e22;\n      text-decoration: none;\n      font-weight: 500;\n    }\n\n    /* Mobile */\n    @media (max-width: 480px) {\n      .header, .body { padding: 32px 28px; }\n      .footer { padding: 20px 28px; }\n      .header h1 { font-size: 26px; }\n    }\n  </style>\n</head>\n<body>\n  <div class=\"wrapper\">\n\n    <div class=\"header\">\n      <div class=\"brand\">LoanDesk &mdash; Application Portal</div>\n      <h1>We've received<br>your <span>application.</span></h1>\n    </div>\n\n    <div class=\"body\">\n\n      <p class=\"greeting\">\n        Hello <strong>{{ $json.name }}</strong>,\n      </p>\n\n      <p class=\"message\">\n        Thank you for submitting your loan application. We've successfully received your request and our team is currently reviewing your details. You'll hear from us shortly with the next steps.\n      </p>\n\n      <div class=\"status-card\">\n        <p>Application Reference</p>\n        <div class=\"ref\">{{ $json.applicant_id }}</div>\n      </div>\n\n      <div class=\"steps-title\">What happens next</div>\n\n      <div class=\"step\">\n        <div class=\"step-num\">1</div>\n        <div class=\"step-text\"><strong>Eligibility Review</strong> \u2014 We'll assess your application against our lending criteria within a short period.</div>\n      </div>\n\n      <div class=\"step\">\n        <div class=\"step-num\">2</div>\n        <div class=\"step-text\"><strong>Loan Offer</strong> \u2014 If eligible, you'll receive a personalised loan offer with your interest rate and repayment breakdown.</div>\n      </div>\n\n      <div class=\"step\">\n        <div class=\"step-num\">3</div>\n        <div class=\"step-text\"><strong>Your Decision</strong> \u2014 You'll be able to accept or decline the offer directly from your email \u2014 no login required.</div>\n      </div>\n\n      <hr class=\"divider\" />\n\n      <div class=\"closing\">\n        In the meantime, if you have any questions or need to update your information, don't hesitate to reach out to us.\n        <strong>The LoanDesk Team</strong>\n      </div>\n\n    </div>\n\n    <div class=\"footer\">\n      <p>\n        This email was sent because you submitted a loan enquiry at LoanDesk.<br>\n        If this wasn't you, please <a href=\"#\">contact us immediately</a>.<br><br>\n        &copy; 2026 LoanDesk. All rights reserved.\n      </p>\n    </div>\n\n  </div>\n</body>\n</html>",
        "options": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        -1568,
        48
      ],
      "id": "d7e1f8af-d569-4152-969e-6eb0f70c1d9d",
      "name": "Send welcome email",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "7e8b61da-2016-4094-8177-586cfb7cda03",
              "leftValue": "={{ $('Append or update row in sheet').item.json.salary }}",
              "rightValue": "500k and below",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        -1360,
        48
      ],
      "id": "e07d6dcb-c975-4497-9486-153085d27cfe",
      "name": "Check eligibility based on salary range"
    },
    {
      "parameters": {
        "sendTo": "={{ $('Append or update row in sheet').item.json.email }}",
        "subject": "An update on your loan application ",
        "message": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"/>\n  <title>Loan Application Update</title>\n  <style>\n    @import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@400;500;600&display=swap');\n\n    * { margin: 0; padding: 0; box-sizing: border-box; }\n\n    body {\n      background-color: #f0ede8;\n      font-family: 'DM Sans', sans-serif;\n      padding: 40px 16px;\n      color: #1a1a1a;\n    }\n\n    .wrapper {\n      max-width: 580px;\n      margin: 0 auto;\n      background: #ffffff;\n      border-radius: 4px;\n      overflow: hidden;\n      box-shadow: 0 4px 24px rgba(0,0,0,0.08);\n    }\n\n    /* Header */\n    .header {\n      background: #2e1a1a;\n      padding: 40px 48px 36px;\n      position: relative;\n      overflow: hidden;\n    }\n\n    .header::before {\n      content: '';\n      position: absolute;\n      top: -40px; right: -40px;\n      width: 180px; height: 180px;\n      border-radius: 50%;\n      background: rgba(255,255,255,0.04);\n    }\n\n    .header::after {\n      content: '';\n      position: absolute;\n      bottom: -20px; left: 30px;\n      width: 100px; height: 100px;\n      border-radius: 50%;\n      background: rgba(255,255,255,0.03);\n    }\n\n    .brand {\n      font-family: 'DM Sans', sans-serif;\n      font-weight: 600;\n      font-size: 13px;\n      letter-spacing: 0.15em;\n      text-transform: uppercase;\n      color: #c98d8d;\n      margin-bottom: 20px;\n    }\n\n    .header h1 {\n      font-family: 'DM Serif Display', serif;\n      font-size: 32px;\n      color: #ffffff;\n      line-height: 1.2;\n      font-weight: 400;\n    }\n\n    .header h1 span {\n      color: #c98d8d;\n    }\n\n    /* Body */\n    .body {\n      padding: 44px 48px;\n    }\n\n    .greeting {\n      font-size: 16px;\n      color: #555;\n      margin-bottom: 20px;\n      line-height: 1.6;\n    }\n\n    .greeting strong {\n      color: #2e1a1a;\n      font-weight: 600;\n    }\n\n    .message {\n      font-size: 15px;\n      line-height: 1.75;\n      color: #444;\n      margin-bottom: 32px;\n    }\n\n    /* Status card */\n    .status-card {\n      background: #fdf6f6;\n      border-left: 3px solid #c0392b;\n      border-radius: 0 6px 6px 0;\n      padding: 20px 24px;\n      margin-bottom: 36px;\n    }\n\n    .status-card p {\n      font-size: 13px;\n      font-weight: 600;\n      letter-spacing: 0.1em;\n      text-transform: uppercase;\n      color: #c98d8d;\n      margin-bottom: 6px;\n    }\n\n    .status-card .status-value {\n      font-size: 20px;\n      font-family: 'DM Serif Display', serif;\n      color: #2e1a1a;\n    }\n\n    .status-card .ref-small {\n      font-size: 12px;\n      color: #aaa;\n      margin-top: 6px;\n    }\n\n    /* Reason block */\n    .section-label {\n      font-size: 11px;\n      font-weight: 600;\n      letter-spacing: 0.12em;\n      text-transform: uppercase;\n      color: #999;\n      margin-bottom: 16px;\n    }\n\n    .reason-item {\n      display: flex;\n      gap: 14px;\n      align-items: flex-start;\n      margin-bottom: 14px;\n    }\n\n    .reason-icon {\n      width: 20px;\n      height: 20px;\n      min-width: 20px;\n      background: #fdf6f6;\n      border: 1.5px solid #e8c0c0;\n      border-radius: 50%;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n      font-size: 10px;\n      color: #c0392b;\n      margin-top: 2px;\n    }\n\n    .reason-text {\n      font-size: 14px;\n      color: #555;\n      line-height: 1.6;\n    }\n\n    .divider {\n      border: none;\n      border-top: 1px solid #ebebeb;\n      margin: 36px 0;\n    }\n\n    /* Encourage block */\n    .encourage {\n      background: #f6f9f6;\n      border-radius: 6px;\n      padding: 24px 28px;\n      margin-bottom: 32px;\n    }\n\n    .encourage p {\n      font-size: 11px;\n      font-weight: 600;\n      letter-spacing: 0.12em;\n      text-transform: uppercase;\n      color: #8dbe9a;\n      margin-bottom: 10px;\n    }\n\n    .encourage ul {\n      list-style: none;\n      padding: 0;\n    }\n\n    .encourage ul li {\n      font-size: 14px;\n      color: #444;\n      line-height: 1.7;\n      padding-left: 16px;\n      position: relative;\n    }\n\n    .encourage ul li::before {\n      content: '\u2192';\n      position: absolute;\n      left: 0;\n      color: #8dbe9a;\n      font-size: 12px;\n    }\n\n    .closing {\n      font-size: 14px;\n      color: #666;\n      line-height: 1.7;\n    }\n\n    .closing strong {\n      display: block;\n      color: #2e1a1a;\n      font-size: 15px;\n      margin-top: 20px;\n      font-weight: 600;\n    }\n\n    /* Footer */\n    .footer {\n      background: #fdf6f6;\n      padding: 24px 48px;\n      border-top: 1px solid #f0e0e0;\n    }\n\n    .footer p {\n      font-size: 12px;\n      color: #999;\n      line-height: 1.6;\n      text-align: center;\n    }\n\n    .footer a {\n      color: #2e1a1a;\n      text-decoration: none;\n      font-weight: 500;\n    }\n\n    /* Mobile */\n    @media (max-width: 480px) {\n      .header, .body { padding: 32px 28px; }\n      .footer { padding: 20px 28px; }\n      .header h1 { font-size: 26px; }\n    }\n  </style>\n</head>\n<body>\n  <div class=\"wrapper\">\n\n    <div class=\"header\">\n      <div class=\"brand\">LoanDesk &mdash; Application Update</div>\n      <h1>An update on<br>your <span>application.</span></h1>\n    </div>\n\n    <div class=\"body\">\n\n      <p class=\"greeting\">\n        Hello <strong>{{ $('Append or update row in sheet').item.json.name }}</strong>,\n      </p>\n\n      <p class=\"message\">\n        Thank you for your interest in our loan product and for taking the time to submit your application. After carefully reviewing your details, we regret to inform you that we are unable to proceed with your loan request at this time.\n      </p>\n\n      <div class=\"status-card\">\n        <p>Application Status</p>\n        <div class=\"status-value\">Not Eligible &mdash; Unsuccessful</div>\n        <div class=\"ref-small\">Ref: {{ $('Append or update row in sheet').item.json.applicant_id }}</div>\n      </div>\n\n      <div class=\"section-label\">Reason for this decision</div>\n\n      <div class=\"reason-item\">\n        <div class=\"reason-icon\">\u2715</div>\n        <div class=\"reason-text\">Your declared income did not meet the minimum threshold required to qualify for the loan amount requested.</div>\n      </div>\n\n      <div class=\"reason-item\">\n        <div class=\"reason-icon\">\u2715</div>\n        <div class=\"reason-text\">Based on our current eligibility criteria, we are unable to offer a suitable loan product that matches your profile at this time.</div>\n      </div>\n\n      <hr class=\"divider\" />\n\n      <div class=\"encourage\">\n        <p>You can reapply in the future</p>\n        <ul>\n          <li>Ensure your monthly income meets our minimum requirement</li>\n          <li>Request a loan amount proportional to your income level</li>\n          <li>You are welcome to reapply once your financial situation changes</li>\n          <li>Feel free to contact us if you'd like guidance before reapplying</li>\n        </ul>\n      </div>\n\n      <div class=\"closing\">\n        We understand this may be disappointing and we genuinely appreciate your interest. This decision is based solely on eligibility criteria and is not a reflection of your character or creditworthiness in general.\n        <strong>The LoanDesk Team</strong>\n      </div>\n\n    </div>\n\n    <div class=\"footer\">\n      <p>\n        This email is regarding your loan application submitted to LoanDesk.<br>\n        If you believe this decision was made in error, please <a href=\"#\">contact our support team</a>.<br><br>\n        &copy; 2026 LoanDesk. All rights reserved.\n      </p>\n    </div>\n\n  </div>\n</body>\n</html>",
        "options": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        -1168,
        -128
      ],
      "id": "83053344-abef-4330-8417-5aba82b3749d",
      "name": "Send rejection mail",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "e013d5a3-d7e7-4d2c-9ee7-6120080a5255",
              "name": "name",
              "value": "={{ $('Append or update row in sheet').item.json.name }}",
              "type": "string"
            },
            {
              "id": "c3d3ef4b-a820-45ff-bc80-9b3e4cb612d8",
              "name": "email",
              "value": "={{ $('Append or update row in sheet').item.json.email }}",
              "type": "string"
            },
            {
              "id": "57e30995-b6c9-4c68-97ce-e54fd73feb5b",
              "name": "phone",
              "value": "={{ $('Append or update row in sheet').item.json.phone }}",
              "type": "number"
            },
            {
              "id": "d5552a44-4827-40ed-a717-6305b5e482e0",
              "name": "salary",
              "value": "={{ $('Append or update row in sheet').item.json.salary }}",
              "type": "string"
            },
            {
              "id": "acde109f-141a-4e84-8ac0-6247883eade6",
              "name": "loan request submitted at",
              "value": "={{ $('Append or update row in sheet').item.json['loan request submitted at'] }}",
              "type": "string"
            },
            {
              "id": "2d3d1472-2908-4c03-b13c-31f1078b0001",
              "name": "loan amount requested",
              "value": "={{ $('Append or update row in sheet').item.json['loan amount requested'] }}",
              "type": "number"
            },
            {
              "id": "bf213945-73e7-48c6-8630-910621cd8577",
              "name": "applicant_id",
              "value": "={{ $('Append or update row in sheet').item.json.applicant_id }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -1168,
        240
      ],
      "id": "07e8c21c-6726-448d-b528-450f0cd1b2fb",
      "name": "Preserve loan details"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "d5f97b67-df85-40a2-b4da-84f9d2d562e9",
              "leftValue": "={{ $json.salary }}",
              "rightValue": "> 500k to 1 million",
              "operator": {
                "type": "string",
                "operation": "contains"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        -896,
        240
      ],
      "id": "4f00d1f0-0c7a-4381-ac91-303720c56e8d",
      "name": "seperate eligibility range"
    },
    {
      "parameters": {
        "jsCode": "for (const item of $input.all()) {\n  const loanAmount = parseFloat(item.json['loan amount requested']) || 0;\n  const interestRate = 0.08; // 8% for 500k to 1M salary tier\n  const TERM = 12;\n\n  const totalInterest    = loanAmount * interestRate * TERM;\n  const totalPayable     = loanAmount + totalInterest;\n  const monthlyRepayment = totalPayable / TERM;\n\n  const fmt = (n) => \"\u20a6\" + n.toLocaleString(\"en-NG\", {\n    minimumFractionDigits: 2,\n    maximumFractionDigits: 2\n  });\n\n  item.json.interest_rate_percent  = \"8%\";\n  item.json.loan_term_months       = TERM;\n  item.json.total_interest         = fmt(totalInterest);\n  item.json.total_payable          = fmt(totalPayable);\n  item.json.monthly_repayment      = fmt(monthlyRepayment);\n  item.json.total_payable_raw      = totalPayable.toFixed(2);\n  item.json.monthly_repayment_raw  = monthlyRepayment.toFixed(2);\n}\n\nreturn $input.all();"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -576,
        96
      ],
      "id": "2cca744e-9867-4841-953f-d345a8182f2b",
      "name": "Calculate interest for \u2060> 500k to 1 million"
    },
    {
      "parameters": {
        "jsCode": "for (const item of $input.all()) {\n  const loanAmount = parseFloat(item.json['loan amount requested']) || 0;\n  const interestRate = 0.08; // 8% for 500k to 1M salary tier\n  const TERM = 12;\n\n  const totalInterest    = loanAmount * interestRate * TERM;\n  const totalPayable     = loanAmount + totalInterest;\n  const monthlyRepayment = totalPayable / TERM;\n\n  const fmt = (n) => \"\u20a6\" + n.toLocaleString(\"en-NG\", {\n    minimumFractionDigits: 2,\n    maximumFractionDigits: 2\n  });\n\n  item.json.interest_rate_percent  = \"8%\";\n  item.json.loan_term_months       = TERM;\n  item.json.total_interest         = fmt(totalInterest);\n  item.json.total_payable          = fmt(totalPayable);\n  item.json.monthly_repayment      = fmt(monthlyRepayment);\n  item.json.total_payable_raw      = totalPayable.toFixed(2);\n  item.json.monthly_repayment_raw  = monthlyRepayment.toFixed(2);\n}\n\nreturn $input.all();"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -576,
        384
      ],
      "id": "17b0b5fd-ffb5-4908-a638-1980a844c88d",
      "name": "Calculate interest for \u2060\"> 1 million"
    },
    {
      "parameters": {
        "content": "## Loan request intake and acknowledgement\n",
        "height": 368,
        "width": 848
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2256,
        -80
      ],
      "typeVersion": 1,
      "id": "cf32fa44-8a1c-4882-aa6b-d2ba5c4b9e77",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "## Eligibility routing",
        "height": 608,
        "width": 592,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1376,
        -208
      ],
      "typeVersion": 1,
      "id": "ab7bd360-52bf-43b1-8e7d-8a1ce0897f3e",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "YOUR_SHEET_ID_HERE",
          "mode": "list",
          "cachedResultName": "n8n_practice",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID_HERE/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "YOUR_SHEET_TAB_ID",
          "mode": "list",
          "cachedResultName": "Loan eligibility",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID_HERE/edit#gid=792244757"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "eligibility status": "ineligible",
            "applicant_id": "={{ $('Append or update row in sheet').item.json.applicant_id }}"
          },
          "matchingColumns": [
            "applicant_id"
          ],
          "schema": [
            {
              "id": "applicant_id",
              "displayName": "applicant_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "email",
              "displayName": "email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "phone",
              "displayName": "phone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "salary",
              "displayName": "salary",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "loan request submitted at",
              "displayName": "loan request submitted at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "loan amount requested",
              "displayName": "loan amount requested",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "loan_term_months",
              "displayName": "loan_term_months",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "reason for loan",
              "displayName": "reason for loan",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "eligibility status",
              "displayName": "eligibility status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "interest rate",
              "displayName": "interest rate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "total payable",
              "displayName": "total payable",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "monthly_repayment",
              "displayName": "monthly_repayment",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "offer sent at",
              "displayName": "offer sent at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "response status",
              "displayName": "response status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "response recived at",
              "displayName": "response recived at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "follow up count",
              "displayName": "follow up count",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "final status",
              "displayName": "final status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -960,
        -128
      ],
      "id": "9ec24598-b53f-4709-8b2b-7c9e324a2520",
      "name": "Update status to ineligible",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "YOUR_SHEET_ID_HERE",
          "mode": "list",
          "cachedResultName": "n8n_practice",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID_HERE/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "YOUR_SHEET_TAB_ID",
          "mode": "list",
          "cachedResultName": "Loan eligibility",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID_HERE/edit#gid=792244757"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "applicant_id": "={{ $json.applicant_id }}",
            "interest rate": "={{ $json.interest_rate_percent }}",
            "total payable": "={{ $json.total_payable }}",
            "loan_term_months": "={{ $json.loan_term_months }}",
            "monthly_repayment": "={{ $json.monthly_repayment }}"
          },
          "matchingColumns": [
            "applicant_id"
          ],
          "schema": [
            {
              "id": "applicant_id",
              "displayName": "applicant_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "email",
              "displayName": "email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "phone",
              "displayName": "phone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "salary",
              "displayName": "salary",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "loan request submitted at",
              "displayName": "loan request submitted at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "loan amount requested",
              "displayName": "loan amount requested",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "loan_term_months",
              "displayName": "loan_term_months",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "reason for loan",
              "displayName": "reason for loan",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "eligibility status",
              "displayName": "eligibility status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "interest rate",
              "displayName": "interest rate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "total payable",
              "displayName": "total payable",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "monthly_repayment",
              "displayName": "monthly_repayment",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "offer sent at",
              "displayName": "offer sent at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "response status",
              "displayName": "response status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "response received at",
              "displayName": "response received at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "follow up count",
              "displayName": "follow up count",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -320,
        384
      ],
      "id": "3d002a3c-769d-461b-8982-4dcb7b9fe23f",
      "name": "Update sheet",
      "executeOnce": false,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "YOUR_SHEET_ID_HERE",
          "mode": "list",
          "cachedResultName": "n8n_practice",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID_HERE/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "YOUR_SHEET_TAB_ID",
          "mode": "list",
          "cachedResultName": "Loan eligibility",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID_HERE/edit#gid=792244757"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "applicant_id": "={{ $json.applicant_id }}",
            "interest rate": "={{ $json.interest_rate_percent }}",
            "total payable": "={{ $json.total_payable }}",
            "loan_term_months": "={{ $json.loan_term_months }}",
            "monthly_repayment": "={{ $json.monthly_repayment }}",
            "eligibility status": "eligible",
            "response status": "no response",
            "follow up count": "0"
          },
          "matchingColumns": [
            "applicant_id"
          ],
          "schema": [
            {
              "id": "applicant_id",
              "displayName": "applicant_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "email",
              "displayName": "email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "phone",
              "displayName": "phone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "salary",
              "displayName": "salary",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "loan request submitted at",
              "displayName": "loan request submitted at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "loan amount requested",
              "displayName": "loan amount requested",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "loan_term_months",
              "displayName": "loan_term_months",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "reason for loan",
              "displayName": "reason for loan",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "eligibility status",
              "displayName": "eligibility status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "interest rate",
              "displayName": "interest rate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "total payable",
              "displayName": "total payable",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "monthly_repayment",
              "displayName": "monthly_repayment",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "offer sent at",
              "displayName": "offer sent at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "response status",
              "displayName": "response status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "response received at",
              "displayName": "response received at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "follow up count",
              "displayName": "follow up count",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -320,
        96
      ],
      "id": "12bf4045-98a6-409f-9dc4-39a1f7ecc894",
      "name": "update info",
      "executeOnce": false,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "content": "## Calculate interest and send eligibility mail",
        "height": 608,
        "width": 928,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -736,
        -64
      ],
      "typeVersion": 1,
      "id": "30011165-6d0f-401f-9988-18a1de79532d",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "sendTo": "={{ $('Calculate interest for \u2060> 500k to 1 million').item.json.email }}",
        "subject": "=Your loan request was approved!",
        "message": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"/>\n  <title>Your Loan Offer</title>\n  <style>\n    @import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@400;500;600&display=swap');\n\n    * { margin: 0; padding: 0; box-sizing: border-box; }\n\n    body {\n      background-color: #f0ede8;\n      font-family: 'DM Sans', sans-serif;\n      padding: 40px 16px;\n      color: #1a1a1a;\n    }\n\n    .wrapper {\n      max-width: 580px;\n      margin: 0 auto;\n      background: #ffffff;\n      border-radius: 4px;\n      overflow: hidden;\n      box-shadow: 0 4px 24px rgba(0,0,0,0.08);\n    }\n\n    /* Header */\n    .header {\n      background: #1a2e22;\n      padding: 40px 48px 36px;\n      position: relative;\n      overflow: hidden;\n    }\n\n    .header::before {\n      content: '';\n      position: absolute;\n      top: -40px; right: -40px;\n      width: 200px; height: 200px;\n      border-radius: 50%;\n      background: rgba(255,255,255,0.04);\n    }\n\n    .brand {\n      font-size: 13px;\n      font-weight: 600;\n      letter-spacing: 0.15em;\n      text-transform: uppercase;\n      color: #8dbe9a;\n      margin-bottom: 20px;\n    }\n\n    .header h1 {\n      font-family: 'DM Serif Display', serif;\n      font-size: 32px;\n      color: #ffffff;\n      line-height: 1.2;\n      font-weight: 400;\n    }\n\n    .header h1 span { color: #8dbe9a; }\n\n    /* Body */\n    .body { padding: 44px 48px; }\n\n    .greeting {\n      font-size: 16px;\n      color: #555;\n      margin-bottom: 16px;\n      line-height: 1.6;\n    }\n\n    .greeting strong { color: #1a2e22; font-weight: 600; }\n\n    .message {\n      font-size: 15px;\n      line-height: 1.75;\n      color: #444;\n      margin-bottom: 32px;\n    }\n\n    /* Offer breakdown table */\n    .section-label {\n      font-size: 11px;\n      font-weight: 600;\n      letter-spacing: 0.12em;\n      text-transform: uppercase;\n      color: #999;\n      margin-bottom: 16px;\n    }\n\n    .offer-table {\n      width: 100%;\n      border-collapse: collapse;\n      margin-bottom: 36px;\n    }\n\n    .offer-table tr {\n      border-bottom: 1px solid #f0f0f0;\n    }\n\n    .offer-table tr:last-child { border-bottom: none; }\n\n    .offer-table td {\n      padding: 14px 0;\n      font-size: 14px;\n    }\n\n    .offer-table td:first-child {\n      color: #888;\n      width: 55%;\n    }\n\n    .offer-table td:last-child {\n      color: #1a2e22;\n      font-weight: 600;\n      text-align: right;\n    }\n\n    .offer-table .highlight td {\n      background: #f6f9f6;\n      padding: 16px 16px;\n      border-radius: 6px;\n      border-bottom: none;\n    }\n\n    .offer-table .highlight td:first-child {\n      color: #1a2e22;\n      font-weight: 600;\n      border-radius: 6px 0 0 6px;\n    }\n\n    .offer-table .highlight td:last-child {\n      font-size: 18px;\n      color: #1a2e22;\n      border-radius: 0 6px 6px 0;\n    }\n\n    .divider {\n      border: none;\n      border-top: 1px solid #ebebeb;\n      margin: 32px 0;\n    }\n\n    /* CTA Buttons */\n    .cta-label {\n      font-size: 11px;\n      font-weight: 600;\n      letter-spacing: 0.12em;\n      text-transform: uppercase;\n      color: #999;\n      margin-bottom: 16px;\n      text-align: center;\n    }\n\n    .cta-wrap {\n      display: flex;\n      gap: 12px;\n      margin-bottom: 20px;\n    }\n\n    .btn {\n      display: block;\n      width: 100%;\n      padding: 16px;\n      border-radius: 4px;\n      text-align: center;\n      font-size: 15px;\n      font-weight: 600;\n      text-decoration: none;\n      font-family: 'DM Sans', sans-serif;\n    }\n\n    .btn-accept {\n      background: #1a2e22;\n      color: #ffffff;\n    }\n\n    .btn-decline {\n      background: #f6f6f6;\n      color: #666;\n      border: 1px solid #e0e0e0;\n    }\n\n    .cta-note {\n      font-size: 12px;\n      color: #aaa;\n      text-align: center;\n      line-height: 1.6;\n      margin-bottom: 32px;\n    }\n\n    .closing {\n      font-size: 14px;\n      color: #666;\n      line-height: 1.7;\n    }\n\n    .closing strong {\n      display: block;\n      color: #1a2e22;\n      font-size: 15px;\n      margin-top: 20px;\n      font-weight: 600;\n    }\n\n    /* Footer */\n    .footer {\n      background: #f6f9f6;\n      padding: 24px 48px;\n      border-top: 1px solid #e8ede8;\n    }\n\n    .footer p {\n      font-size: 12px;\n      color: #999;\n      line-height: 1.6;\n      text-align: center;\n    }\n\n    .footer a { color: #1a2e22; text-decoration: none; font-weight: 500; }\n\n    /* Mobile */\n    @media (max-width: 480px) {\n      .header, .body { padding: 32px 28px; }\n      .footer { padding: 20px 28px; }\n      .header h1 { font-size: 26px; }\n      .cta-wrap { flex-direction: column; }\n    }\n  </style>\n</head>\n<body>\n  <div class=\"wrapper\">\n\n    <div class=\"header\">\n      <div class=\"brand\">LoanDesk &mdash; Loan Offer</div>\n      <h1>You've been <span>approved</span><br>for a loan offer.</h1>\n    </div>\n\n    <div class=\"body\">\n\n      <p class=\"greeting\">Hello <strong>{{ $('Calculate interest for \u2060> 500k to 1 million

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

About this workflow

Loan eligibility workflow. Uses formTrigger, googleSheets, gmail. Event-driven trigger; 53 nodes.

Source: https://github.com/ChibugoOhanyiri/AI-automation-portfolio/blob/main/loan-eligibility-automation/workflow.json — original creator credit. Request a take-down →

More Email & Gmail workflows → · Browse all categories →