This workflow corresponds to n8n.io template #9841 — we link there as the canonical source.
This workflow follows the Agent → Gmail recipe pattern — see all workflows that pair these two integrations.
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 →
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "dcd9d4c8-a065-46c1-974f-d3a8042ed8bd",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-608,
-96
],
"parameters": {
"color": 4,
"width": 360,
"height": 632,
"content": "## \ud83c\udfe6 Loan Application System\n\nAutomates loan processing from application to approval\n\nFeatures:\n- AI debt-to-income calculation\n- Automated credit checks\n- Approval likelihood scoring\n- Document tracking\n- Conditional letters\n- Closing scheduling\n\nROI: Same-day approval, 50% faster closings"
},
"typeVersion": 1
},
{
"id": "64ff6562-d154-4b39-afd7-b6232a2e02f3",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-208,
-128
],
"parameters": {
"color": 5,
"width": 320,
"height": 624,
"content": "## \ud83d\udcdd Form Fields\nCreate your form for free on [Jotform using this link](https://www.jotform.com/?partner=mediajade)\n\nApplicant Info:\n- Full Name\n- Email, Phone\n- SSN, DOB\n- Address\n\nFinancial Info:\n- Monthly Income\n- Employment Status\n- Current Debts\n- Loan Amount Requested\n- Down Payment\n- Property Value\n"
},
"typeVersion": 1
},
{
"id": "d106adca-3600-4df9-8057-bf70a4c652ae",
"name": "Extract Application Data",
"type": "n8n-nodes-base.set",
"position": [
-16,
288
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "bad60885-2792-4f80-b545-5938e44fa5c7",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
144,
-96
],
"parameters": {
"color": 6,
"width": 484,
"height": 552,
"content": "## \ud83e\udd16 AI Financial Analysis\n\nCalculates:\n- Debt-to-Income Ratio\n- Loan-to-Value Ratio\n- Approval Likelihood\n- Risk Assessment\n- Recommended Terms\n- Required Documentation"
},
"typeVersion": 1
},
{
"id": "5d01d4bc-2940-496a-adb1-7fc33fbe5650",
"name": "AI Financial Analysis",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
160,
240
],
"parameters": {
"text": "=Analyze this loan application:\n\nApplicant: {{ $json['Customer name'] }}\nMonthly Income: {{ $json['Monthly Income'] }}\nMonthly Debts: {{ $json['Current debts'] }}\nLoan Amount: {{ $json['Loan Amount Requested'] }}\nDown Payment: {{ $json.Downpayment }}\nProperty Value: {{ $json['Property Value'] }}\nEmployment: {{ $json['Employment Status'] }}\n\nReturn JSON:\n{\n\"debtToIncomeRatio\": 0.35,\n\"loanToValueRatio\": 0.80,\n\"approvalLikelihood\": \"high/medium/low\",\n\"riskScore\": 1-100,\n\"recommendedStatus\": \"pre-approved/conditional/denied\",\n\"monthlyPaymentEstimate\": 2500,\n\"requiredDocuments\": [\"paystubs\", \"tax returns\"],\n\"conditionsForApproval\": [\"condition1\"],\n\"reasoningNotes\": \"explanation\",\n\"interestRateRange\": \"3.5-4.0%\"\n}",
"agent": "conversationalAgent",
"options": {
"systemMessage": "You are a mortgage underwriting AI. Analyze loan applications objectively based on standard lending criteria."
},
"promptType": "define"
},
"typeVersion": 1.6
},
{
"id": "0c50a9a5-658e-4265-859b-ed6aea84e1a4",
"name": "Parse AI Analysis",
"type": "n8n-nodes-base.set",
"position": [
464,
240
],
"parameters": {
"fields": {
"values": [
{
"name": "Analysis",
"stringValue": "={{ $json.output }}"
}
]
},
"options": {}
},
"typeVersion": 3
},
{
"id": "4f990f13-dca5-49f7-b7dd-9bc1c5b8ae88",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
672,
-80
],
"parameters": {
"color": 2,
"width": 320,
"height": 632,
"content": "## \ud83d\udcb3 Credit Check\n\nSimulates credit pull:\n- Credit Score\n- Payment History\n- Credit Utilization\n- Recent Inquiries\n\nNote: Replace with real credit API integration"
},
"typeVersion": 1
},
{
"id": "7e1f7975-da4b-42a6-a276-bb4f0b7e0f91",
"name": "Simulate Credit Check",
"type": "n8n-nodes-base.code",
"position": [
736,
256
],
"parameters": {
"jsCode": "const income = $('Extract Application Data').first().json.monthlyIncome;\nconst debts = $('Extract Application Data').first().json.monthlyDebts;\nconst dti = $('Parse AI Analysis').first().json.debtToIncomeRatio;\n\nlet creditScore = 720;\nif (dti < 0.30 && income > 8000) creditScore = 760;\nelse if (dti > 0.43 || income < 4000) creditScore = 650;\n\nconst creditData = {\n creditScore: creditScore,\n paymentHistory: creditScore > 700 ? 'excellent' : creditScore > 650 ? 'good' : 'fair',\n creditUtilization: creditScore > 700 ? 25 : 45,\n recentInquiries: creditScore > 700 ? 1 : 3,\n creditCheckDate: new Date().toISOString(),\n ...$('Parse AI Analysis').first().json,\n ...$('Extract Application Data').first().json\n};\n\nreturn [{ json: creditData }];"
},
"typeVersion": 2
},
{
"id": "a0554431-c558-4a3b-9200-15edf155858d",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1008,
-80
],
"parameters": {
"color": 7,
"height": 472,
"content": "## \ud83c\udfaf Approval Decision\n\nRoutes based on:\n- AI recommendation\n- Credit score\n- DTI ratio\n- LTV ratio\n\nPaths:\n- Pre-Approved (green)\n- Conditional (yellow)\n- Denied (red)"
},
"typeVersion": 1
},
{
"id": "a73df01e-588e-4428-99f9-f15640c02aec",
"name": "Check Approval Status",
"type": "n8n-nodes-base.if",
"position": [
1056,
288
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "c1",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.recommendedStatus }}",
"rightValue": "pre-approved"
},
{
"id": "c2",
"operator": {
"type": "number",
"operation": "gte"
},
"leftValue": "={{ $json.creditScore }}",
"rightValue": 680
},
{
"id": "c3",
"operator": {
"type": "number",
"operation": "lte"
},
"leftValue": "={{ $json.debtToIncomeRatio }}",
"rightValue": 0.43
}
]
}
},
"typeVersion": 2
},
{
"id": "ab117b82-a32d-40a9-8b13-2a975b5d795a",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1264,
-112
],
"parameters": {
"color": 3,
"width": 300,
"height": 468,
"content": "## \u2705 Pre-Approved Path\n\nActions:\n- Send approval letter\n- Route to underwriter\n- Schedule closing\n- Request final docs"
},
"typeVersion": 1
},
{
"id": "c0f70116-85b3-454a-91f8-7619e980cebb",
"name": "Send Pre-Approval Letter",
"type": "n8n-nodes-base.gmail",
"position": [
1328,
128
],
"parameters": {
"sendTo": "={{ $json.email }}",
"message": "=<div style='font-family: Arial; max-width: 650px; margin: 0 auto;'>\n<div style='background: linear-gradient(135deg, #28a745 0%, #20c997 100%); color: white; padding: 40px; text-align: center;'>\n<h1 style='margin: 0;'>Congratulations!</h1>\n<p style='margin: 10px 0 0 0; font-size: 18px;'>You are Pre-Approved</p>\n</div>\n<div style='padding: 30px;'>\n<p>Dear {{ $json.applicantName }},</p>\n<p>Great news! Your loan application has been pre-approved.</p>\n<div style='background: #d4edda; padding: 20px; margin: 20px 0; border-radius: 8px; border-left: 4px solid #28a745;'>\n<h3 style='margin-top: 0; color: #155724;'>Loan Details</h3>\n<p style='margin: 5px 0;'><strong>Loan Amount:</strong> ${{ $json.loanAmount.toLocaleString() }}</p>\n<p style='margin: 5px 0;'><strong>Estimated Monthly Payment:</strong> ${{ $json.monthlyPaymentEstimate.toLocaleString() }}</p>\n<p style='margin: 5px 0;'><strong>Interest Rate Range:</strong> {{ $json.interestRateRange }}</p>\n<p style='margin: 5px 0;'><strong>Debt-to-Income Ratio:</strong> {{ ($json.debtToIncomeRatio * 100).toFixed(1) }}%</p>\n</div>\n<div style='background: #fff3cd; padding: 20px; margin: 20px 0; border-radius: 8px;'>\n<h3 style='margin-top: 0; color: #856404;'>Required Documents</h3>\n<ul style='color: #856404;'>\n<li>Last 2 months paystubs</li>\n<li>Last 2 years tax returns</li>\n<li>Bank statements (60 days)</li>\n<li>Photo ID</li>\n<li>Proof of down payment</li>\n</ul>\n</div>\n<p><strong>Next Steps:</strong></p>\n<ol>\n<li>Upload required documents within 5 business days</li>\n<li>Complete property appraisal</li>\n<li>Final underwriter review</li>\n<li>Schedule closing date</li>\n</ol>\n<p>Application ID: {{ $json.submissionId }}</p>\n<p>Questions? Call us at (555) 123-4567</p>\n</div>\n</div>",
"options": {},
"subject": "=Pre-Approval: Congratulations {{ $json.applicantName.split(' ')[0] }}!"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2
},
{
"id": "2f7eb615-f4f9-4157-8d64-6d4063517506",
"name": "Notify Underwriter",
"type": "n8n-nodes-base.gmail",
"position": [
1328,
256
],
"parameters": {
"sendTo": "user@example.com",
"message": "=<div style='font-family: Arial;'>\n<h2>New Pre-Approved Loan Application</h2>\n<p><strong>Applicant:</strong> {{ $json.applicantName }}</p>\n<p><strong>Loan Amount:</strong> ${{ $json.loanAmount.toLocaleString() }}</p>\n<p><strong>Credit Score:</strong> {{ $json.creditScore }}</p>\n<p><strong>DTI Ratio:</strong> {{ ($json.debtToIncomeRatio * 100).toFixed(1) }}%</p>\n<p><strong>LTV Ratio:</strong> {{ ($json.loanToValueRatio * 100).toFixed(1) }}%</p>\n<p><strong>Risk Score:</strong> {{ $json.riskScore }}/100</p>\n<p><strong>Employment:</strong> {{ $json.employmentStatus }}</p>\n<p>Please review for final approval.</p>\n</div>",
"options": {},
"subject": "=New Pre-Approved Application: {{ $json.applicantName }}"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2
},
{
"id": "681e4be6-fb63-41ae-ac9d-9ef6530b22b2",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1248,
400
],
"parameters": {
"width": 300,
"height": 420,
"content": "## \u26a0\ufe0f Conditional/Denied Path\n\nActions:\n- Send conditional approval\n- List requirements\n- Or send denial letter\n- Offer alternatives"
},
"typeVersion": 1
},
{
"id": "b789aa66-b4da-4e61-8359-b3bb72a8ce76",
"name": "Check If Conditional",
"type": "n8n-nodes-base.if",
"position": [
1360,
656
],
"parameters": {
"options": {},
"conditions": {
"options": {
"caseSensitive": true
},
"conditions": [
{
"id": "c4",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.recommendedStatus }}",
"rightValue": "conditional"
}
]
}
},
"typeVersion": 2
},
{
"id": "e05e0a09-5dca-4b45-96ff-859ec77e5bbe",
"name": "Send Conditional Letter",
"type": "n8n-nodes-base.gmail",
"position": [
1712,
528
],
"parameters": {
"sendTo": "={{ $json.email }}",
"message": "=<div style='font-family: Arial; max-width: 650px; margin: 0 auto;'>\n<div style='background: #ffc107; color: #333; padding: 40px; text-align: center;'>\n<h1 style='margin: 0;'>Conditional Approval</h1>\n</div>\n<div style='padding: 30px;'>\n<p>Dear {{ $json.applicantName }},</p>\n<p>Your loan application is conditionally approved pending the following requirements:</p>\n<div style='background: #fff3cd; padding: 20px; margin: 20px 0; border-radius: 8px;'>\n<h3 style='color: #856404;'>Required Actions</h3>\n<ul>\n<li>{{ $json.conditionsForApproval[0] }}</li>\n</ul>\n</div>\n<p>Please address these items within 10 business days.</p>\n<p>Application ID: {{ $json.submissionId }}</p>\n</div>\n</div>",
"options": {},
"subject": "=Conditional Approval: Action Required"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2
},
{
"id": "3bc859db-ab7c-4877-8f41-6b4429d3f918",
"name": "Send Denial Letter",
"type": "n8n-nodes-base.gmail",
"position": [
1696,
704
],
"parameters": {
"sendTo": "={{ $json.email }}",
"message": "=<div style='font-family: Arial; max-width: 650px; margin: 0 auto;'>\n<div style='background: #dc3545; color: white; padding: 40px; text-align: center;'>\n<h1 style='margin: 0;'>Application Update</h1>\n</div>\n<div style='padding: 30px;'>\n<p>Dear {{ $json.applicantName }},</p>\n<p>After careful review, we are unable to approve your loan application at this time.</p>\n<p><strong>Reason:</strong> {{ $json.reasoningNotes }}</p>\n<div style='background: #d1ecf1; padding: 20px; margin: 20px 0; border-radius: 8px;'>\n<h3 style='color: #0c5460;'>Alternative Options</h3>\n<p>We recommend:</p>\n<ul>\n<li>Reduce existing debt to improve DTI ratio</li>\n<li>Increase down payment amount</li>\n<li>Consider co-borrower</li>\n<li>Reapply in 6 months after improving credit</li>\n</ul>\n</div>\n<p>Questions? Call (555) 123-4567</p>\n</div>\n</div>",
"options": {},
"subject": "=Loan Application Status Update"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2
},
{
"id": "0b2c638e-1677-4e31-b99c-6f18a0c003e2",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1696,
-48
],
"parameters": {
"color": 4,
"width": 320,
"height": 536,
"content": "## \ud83d\udcca Application Tracking\n\nLogs to Google Sheets:\n- All application data\n- AI analysis results\n- Credit information\n- Approval status\n- Next steps\n- Timestamps"
},
"typeVersion": 1
},
{
"id": "c33156be-0706-4e32-9cd5-3c5957fc8b8a",
"name": "Log Application",
"type": "n8n-nodes-base.googleSheets",
"position": [
1792,
176
],
"parameters": {
"columns": {
"value": {
"email": "={{ $json.email }}",
"phone": "={{ $json.phone }}",
"dtiRatio": "={{ $json.debtToIncomeRatio }}",
"ltvRatio": "={{ $json.loanToValueRatio }}",
"riskScore": "={{ $json.riskScore }}",
"timestamp": "={{ $json.submittedAt }}",
"loanAmount": "={{ $json.loanAmount }}",
"creditScore": "={{ $json.creditScore }}",
"downPayment": "={{ $json.downPayment }}",
"interestRate": "={{ $json.interestRateRange }}",
"monthlyDebts": "={{ $json.monthlyDebts }}",
"applicantName": "={{ $json.applicantName }}",
"applicationId": "={{ $json.submissionId }}",
"monthlyIncome": "={{ $json.monthlyIncome }}",
"approvalStatus": "={{ $json.recommendedStatus }}",
"monthlyPayment": "={{ $json.monthlyPaymentEstimate }}"
},
"mappingMode": "defineBelow"
},
"options": {
"useAppend": true,
"cellFormat": "USER_ENTERED"
},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "name",
"value": "Loan_Applications"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "YOUR_GOOGLE_SHEET_ID"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4
},
{
"id": "7adf0d8f-09ad-4872-9263-c9c540f5782e",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
160,
432
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "fdf2f8e2-7dde-4bf3-b894-18d22b6ba321",
"name": "Jotform Trigger",
"type": "n8n-nodes-base.jotFormTrigger",
"position": [
-208,
288
],
"parameters": {
"form": "252894100907054"
},
"credentials": {
"jotFormApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
}
],
"connections": {
"Jotform Trigger": {
"main": [
[
{
"node": "Extract Application Data",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Financial Analysis",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Parse AI Analysis": {
"main": [
[
{
"node": "Simulate Credit Check",
"type": "main",
"index": 0
}
]
]
},
"Check If Conditional": {
"main": [
[
{
"node": "Send Conditional Letter",
"type": "main",
"index": 0
}
],
[
{
"node": "Send Denial Letter",
"type": "main",
"index": 0
}
]
]
},
"AI Financial Analysis": {
"main": [
[
{
"node": "Parse AI Analysis",
"type": "main",
"index": 0
}
]
]
},
"Check Approval Status": {
"main": [
[
{
"node": "Send Pre-Approval Letter",
"type": "main",
"index": 0
},
{
"node": "Notify Underwriter",
"type": "main",
"index": 0
}
],
[
{
"node": "Check If Conditional",
"type": "main",
"index": 0
}
]
]
},
"Simulate Credit Check": {
"main": [
[
{
"node": "Check Approval Status",
"type": "main",
"index": 0
},
{
"node": "Log Application",
"type": "main",
"index": 0
}
]
]
},
"Extract Application Data": {
"main": [
[
{
"node": "AI Financial Analysis",
"type": "main",
"index": 0
}
]
]
}
}
}
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.
gmailOAuth2googleSheetsOAuth2ApijotFormApiopenAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Transform manual loan processing into same-day pre-approvals - achieving 50% faster closings, 90% reduction in manual review time, and automated underwriting decisions with AI-powered financial analysis and instant applicant notifications.
Source: https://n8n.io/workflows/9841/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Transform guest complaints into loyalty opportunities - achieving 60% reduction in negative reviews, 85% faster service recovery, and turning dissatisfied guests into brand advocates through AI-powere
Transform patient intake from paperwork chaos into intelligent, automated triage that detects emergencies, prepares providers with comprehensive briefs, and streamlines scheduling—improving patient sa
Transform accounts payable from a manual bottleneck into an intelligent, automated system that reads invoices, detects fraud, and processes payments automatically—saving 20+ hours per week while preve
Transform college admissions from an overwhelming manual process into an intelligent, efficient, and equitable system that analyzes essays, scores applicants holistically, and identifies top candidate
Streamline client onboarding and project setup from hours to minutes with AI-driven automation. This intelligent workflow eliminates manual coordination, builds proposals, creates projects in Asana, w