LeaseRenewalOffer
Ceci est unDocument Extraction, Multimodal AIworkflow d'automatisation du domainecontenant 17 nœuds.Utilise principalement des nœuds comme If, Set, Gmail, Supabase, FormTrigger. Générez des devis de renouvellement de bail IA avec Ollama LLM, Supabase et Gmail
- •Compte Google et informations d'identification Gmail API
- •URL et Clé API Supabase
- •Informations d'identification Google Drive API
Nœuds utilisés (17)
{
"id": "PiWH2tT9abPCn184",
"meta": {
"instanceId": "558d88703fb65b2d0e44613bc35916258b0f0bf983c5d4730c00c424b77ca36a",
"templateCredsSetupCompleted": true
},
"name": "LeaseRenewalOffer",
"tags": [],
"nodes": [
{
"id": "052b0f7a-43f1-4246-b034-00ddc4c10e1e",
"name": "Ollama Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"position": [
200,
600
],
"parameters": {
"model": "llama3.1:latest",
"options": {
"temperature": 0.3
}
},
"credentials": {
"ollamaApi": {
"id": "7CIt42W14b1MCgxQ",
"name": "Ollama account"
}
},
"typeVersion": 1
},
{
"id": "3e7e8a93-ca37-4ed5-83d7-659e87b7d4b5",
"name": "Modifier les champs",
"type": "n8n-nodes-base.set",
"position": [
40,
-80
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "{\n \"landload_address\": \"Lakindu Siriwardana, Neuenlander Str. 28201 Bremen, Germany.\",\n \"contact_email\": \"lakithegreat99@gmail.com\",\n \"contact_phone\": \"+491739XXXXXX\",\n \"company_name\": \"HX GmbH\",\n \"landload_name\": \"Lakindu Siriwardana\"\n}\n",
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "ca9a343d-399c-4fba-9b43-33afa6d92109",
"name": "À la soumission du formulaire",
"type": "n8n-nodes-base.formTrigger",
"position": [
-560,
-80
],
"webhookId": "e8f9fa32-b7c8-4c19-95e0-576a4e5653b3",
"parameters": {
"options": {},
"formTitle": "Customer Renewal Form",
"formFields": {
"values": [
{
"fieldType": "number",
"fieldLabel": "Customer id:",
"requiredField": true
},
{
"fieldType": "number",
"fieldLabel": "Renewal Amount:",
"requiredField": true
}
]
},
"formDescription": "By: Laki"
},
"typeVersion": 2.2
},
{
"id": "4ba6fd65-73b0-4e7e-b153-c7480190dd5e",
"name": "Convertir en fichier",
"type": "n8n-nodes-base.convertToFile",
"position": [
560,
200
],
"parameters": {
"options": {},
"operation": "toText",
"sourceProperty": "text"
},
"typeVersion": 1.1
},
{
"id": "13ca0896-de6e-4514-a0e6-3ef6d50197b2",
"name": "Gmail",
"type": "n8n-nodes-base.gmail",
"position": [
520,
420
],
"webhookId": "",
"parameters": {
"sendTo": "={{ $('Supabase-search_cust').item.json.cust_email }}",
"message": "={{ $json.text }}",
"options": {
"attachmentsUi": {
"attachmentsBinary": [
{
"property": "down-data"
}
]
}
},
"subject": "=Offer Renewal {{ $('Supabase_cust_info').item.json.cust_name }} {{ $('Supabase-search_cust').item.json.renewable_date.toString().slice(0,7) }}",
"emailType": "text"
},
"credentials": {
"gmailOAuth2": {
"id": "",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "0d58e4d2-7cb7-4439-b767-08690b84e43a",
"name": "Supabase-search_cust",
"type": "n8n-nodes-base.supabase",
"position": [
-360,
-80
],
"parameters": {
"filters": {
"conditions": [
{
"keyName": "id",
"keyValue": "={{ $json['Customer id:'] }}"
}
]
},
"tableId": "customer_details",
"operation": "get"
},
"credentials": {
"supabaseApi": {
"id": "",
"name": "Supabase account"
}
},
"typeVersion": 1
},
{
"id": "ccc9a1df-fd42-46d8-b0bc-dee42b750046",
"name": "Google Drive-delete_dup",
"type": "n8n-nodes-base.googleDrive",
"position": [
60,
120
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {},
"operation": "deleteFile"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "",
"name": "Google Drive account"
}
},
"executeOnce": false,
"typeVersion": 3,
"alwaysOutputData": false
},
{
"id": "840867fa-1b4b-4175-ad02-ab803e36af6e",
"name": "If-check_dup",
"type": "n8n-nodes-base.if",
"position": [
-120,
180
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "d4c39be3-a4a4-4cff-bc08-5209109359bd",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.id }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "01009db3-6a95-421f-b650-c3aa4943a58a",
"name": "Supabase_cust_info",
"type": "n8n-nodes-base.supabase",
"position": [
-160,
-80
],
"parameters": {
"filters": {
"conditions": [
{
"keyName": "id",
"keyValue": "={{ $json.id }}",
"condition": "eq"
}
]
},
"tableId": "customer_details",
"fieldsUi": {
"fieldValues": [
{
"fieldId": "renewable_date",
"fieldValue": "={{ $now }}"
},
{
"fieldId": "Renewal Amount",
"fieldValue": "={{ $('On form submission').item.json['Renewal Amount:'] }}"
}
]
},
"operation": "update"
},
"credentials": {
"supabaseApi": {
"id": "",
"name": "Supabase account"
}
},
"typeVersion": 1
},
{
"id": "5edd5d07-b549-4f4b-b130-09b830de645d",
"name": "Google Drive-search",
"type": "n8n-nodes-base.googleDrive",
"position": [
240,
-80
],
"parameters": {
"filter": {
"folderId": {
"__rl": true,
"mode": "list",
"value": "1GGYne4bMaff9_1RvId2en38SPtmnInBA",
"cachedResultUrl": "",
"cachedResultName": "OfferRenewal"
}
},
"options": {},
"resource": "fileFolder",
"queryString": "={{ $('Edit Fields').item.json.cust_name }}{{ $('Edit Fields').item.json.renewable_date }}"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "",
"name": "Google Drive account"
}
},
"typeVersion": 3,
"alwaysOutputData": true
},
{
"id": "47b4fa52-ec59-449c-8e53-c7f5f0319a76",
"name": "Google Drive-upload",
"type": "n8n-nodes-base.googleDrive",
"position": [
-280,
420
],
"parameters": {
"name": "={{ $('Edit Fields').item.json.cust_name }}{{ $('Edit Fields').item.json.renewable_date }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1GGYne4bMaff9_1RvId2en38SPtmnInBA",
"cachedResultUrl": "",
"cachedResultName": "OfferRenewal"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "9e1ae15e-fe3b-491d-900d-817a9060d1f0",
"name": "Basic LLM Chain-offerLetter",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
240,
200
],
"parameters": {
"text": "=The output should follow the below format only. No extra text should be added\n\n{{ $('Edit Fields').item.json.landload_address.split(',').map(line => line.trim()).join('\\n') }}\n{{ $now.toISO().slice(0,10) }}\n\n{{ $('Supabase_cust_info').item.json.cust_name }} \n{{ $('Supabase_cust_info').item.json.cust_address.split(',').map(line => line.trim()).join('\\n') }}.\n\nSubject: Lease Renewal Offer for Your Residence at {{ $('Supabase_cust_info').item.json.cust_address }}.\n\nDear {{ $('Supabase_cust_info').item.json.cust_name }},\n\nWe hope this letter finds you well.\n\nWe are writing to inform you that your current lease agreement for the property located at {{ $('Supabase_cust_info').item.json.cust_address }} is due to expire on {{ $('Supabase_cust_info').item.json.renewable_date }}.\n\nWe would like to offer you the opportunity to renew your lease for an additional term of one year, under the following conditions:\n\n- Lease Term: From {{ $('Supabase_cust_info').item.json.renewable_date }} to {{ new Date(new Date($('Supabase_cust_info').item.json.renewable_date).setDate(new Date($('Supabase_cust_info').item.json.renewable_date).getDate() + 365)).toISOString().slice(0, 10) }}\n\n- Monthly Rent: €{{ $('On form submission').item.json['Renewal Amount:'] }}\n\nPlease confirm your acceptance of this offer by replying to this letter or contacting us no later than {{ new Date(new Date($('Supabase_cust_info').item.json.renewable_date).setDate(new Date($('Supabase_cust_info').item.json.renewable_date).getDate() + 7)).toISOString().slice(0,10) }}.\n\nShould you have any questions or wish to discuss any details of the renewal, please do not hesitate to reach out via email at {{ $('Edit Fields').item.json.contact_email }} or by phone at {{ $('Edit Fields').item.json.contact_phone }}.\n\nWe appreciate your tenancy and look forward to continuing to serve you.\n\nYours sincerely,\n\n{{ $('Edit Fields').item.json.landload_name }}\n{{ $('Edit Fields').item.json.company_name }} \n{{ $('Edit Fields').item.json.contact_email }} \n{{ $('Edit Fields').item.json.contact_phone }}\n",
"promptType": "define"
},
"typeVersion": 1.6
},
{
"id": "efa884ba-1617-40b5-9cd5-35268b338502",
"name": "Basic LLM Chain-email",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
-60,
420
],
"parameters": {
"text": "=You are an assistant that writes professional business emails. \nRefer to the provided text as the source of details. \nWrite a formal letter to the client based on that text. \n\nRequirements: \n- The email should be short and mentioned find the attached document. \n- No explanations, notes, or extra text — output only the final email content. \n- Do not include any labels like \"Email:\" or \"Dear [Name]\" unless part of the actual email. \n- The email must start directly with the greeting and end with the closing signature. \n- don't import subject field\n\n[Provided text: {{ $('Basic LLM Chain-offerLetter').item.json.text }}]",
"promptType": "define"
},
"typeVersion": 1.6
},
{
"id": "7681102f-2b1f-4368-ba49-90a1dad18f51",
"name": "Google Drive-get_file",
"type": "n8n-nodes-base.googleDrive",
"position": [
340,
420
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Google Drive-upload').item.json.id }}"
},
"options": {
"binaryPropertyName": "down-data"
},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "1b3a0198-59ce-4ff2-b332-2ef33a5e6f86",
"name": "Note adhésive",
"type": "n8n-nodes-base.stickyNote",
"position": [
-660,
-140
],
"parameters": {
"width": 1420,
"height": 220,
"content": "## Get Customer Information\n"
},
"typeVersion": 1
},
{
"id": "67c75d5c-ad31-4f36-a1e7-ec1a7a7b1fe5",
"name": "Note adhésive1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-660,
100
],
"parameters": {
"color": 5,
"width": 1420,
"height": 280,
"content": "## Generate offer letter \n"
},
"typeVersion": 1
},
{
"id": "3baf2115-e8cd-499f-957d-d2e0dfe65bbc",
"name": "Note adhésive2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-660,
400
],
"parameters": {
"color": 6,
"width": 1420,
"height": 320,
"content": "## Send Email"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "3b191f36-aca4-4274-8249-555703d8bf06",
"connections": {
"3e7e8a93-ca37-4ed5-83d7-659e87b7d4b5": {
"main": [
[
{
"node": "5edd5d07-b549-4f4b-b130-09b830de645d",
"type": "main",
"index": 0
}
]
]
},
"840867fa-1b4b-4175-ad02-ab803e36af6e": {
"main": [
[
{
"node": "ccc9a1df-fd42-46d8-b0bc-dee42b750046",
"type": "main",
"index": 0
}
],
[
{
"node": "9e1ae15e-fe3b-491d-900d-817a9060d1f0",
"type": "main",
"index": 0
}
]
]
},
"4ba6fd65-73b0-4e7e-b153-c7480190dd5e": {
"main": [
[
{
"node": "47b4fa52-ec59-449c-8e53-c7f5f0319a76",
"type": "main",
"index": 0
}
]
]
},
"052b0f7a-43f1-4246-b034-00ddc4c10e1e": {
"ai_languageModel": [
[
{
"node": "9e1ae15e-fe3b-491d-900d-817a9060d1f0",
"type": "ai_languageModel",
"index": 0
},
{
"node": "efa884ba-1617-40b5-9cd5-35268b338502",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"ca9a343d-399c-4fba-9b43-33afa6d92109": {
"main": [
[
{
"node": "0d58e4d2-7cb7-4439-b767-08690b84e43a",
"type": "main",
"index": 0
}
]
]
},
"01009db3-6a95-421f-b650-c3aa4943a58a": {
"main": [
[
{
"node": "3e7e8a93-ca37-4ed5-83d7-659e87b7d4b5",
"type": "main",
"index": 0
}
]
]
},
"5edd5d07-b549-4f4b-b130-09b830de645d": {
"main": [
[
{
"node": "840867fa-1b4b-4175-ad02-ab803e36af6e",
"type": "main",
"index": 0
}
]
]
},
"47b4fa52-ec59-449c-8e53-c7f5f0319a76": {
"main": [
[
{
"node": "efa884ba-1617-40b5-9cd5-35268b338502",
"type": "main",
"index": 0
}
]
]
},
"0d58e4d2-7cb7-4439-b767-08690b84e43a": {
"main": [
[
{
"node": "01009db3-6a95-421f-b650-c3aa4943a58a",
"type": "main",
"index": 0
}
]
]
},
"efa884ba-1617-40b5-9cd5-35268b338502": {
"main": [
[
{
"node": "7681102f-2b1f-4368-ba49-90a1dad18f51",
"type": "main",
"index": 0
}
]
]
},
"7681102f-2b1f-4368-ba49-90a1dad18f51": {
"main": [
[
{
"node": "13ca0896-de6e-4514-a0e6-3ef6d50197b2",
"type": "main",
"index": 0
}
]
]
},
"ccc9a1df-fd42-46d8-b0bc-dee42b750046": {
"main": [
[
{
"node": "9e1ae15e-fe3b-491d-900d-817a9060d1f0",
"type": "main",
"index": 0
}
]
]
},
"9e1ae15e-fe3b-491d-900d-817a9060d1f0": {
"main": [
[
{
"node": "4ba6fd65-73b0-4e7e-b153-c7480190dd5e",
"type": "main",
"index": 0
}
]
]
}
}
}Comment utiliser ce workflow ?
Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.
Dans quelles scénarios ce workflow est-il adapté ?
Avancé - Extraction de documents, IA Multimodale
Est-ce payant ?
Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.
Workflows recommandés
Partager ce workflow