Skip to main content

Generate AI-powered lease renewal offers with Ollama LLM, Supabase and Gmail

Workflow preview

Workflow preview
100%
Generate AI-powered lease renewal offers with Ollama LLM, Supabase and Gmail preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Automated Lease Renewal Offer by Email Features Automated Lease Offer Generation using AI (Ollama model). Duplicate File Check to avoid reprocessing the same customer. Personalized Offer Lette...

Best for

  • Document Extraction automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.lmchatollama, n8n-nodes-base.set, n8n-nodes-base.formtrigger, n8n-nodes-base.converttofile, n8n-nodes-base.gmail, n8n-nodes-base.supabase, n8n-nodes-base.googledrive, n8n-nodes-base.if

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Lakindu Siriwardana.

Original n8n.io source

1.1 Workflow description

Title
Generate AI-powered lease renewal offers with Ollama LLM, Supabase and Gmail
Workflow name
Generate AI-powered lease renewal offers with Ollama LLM, Supabase and Gmail

📄 Automated Lease Renewal Offer by Email

✅ Features

  • Automated Lease Offer Generation using AI (Ollama model).
  • Duplicate File Check to avoid reprocessing the same customer.
  • Personalized Offer Letter creation based on customer details from Supabase.
  • PDF/Text File Conversion for formatted output.
  • Automatic Google Drive Management for storing and retrieving files.
  • Email Sending with generated offer letter attached.
  • Seamless Integration with Supabase, Google Drive, Gmail, and AI LLM.

⚙️ How It Works

  1. Trigger: Workflow starts on form submission with customer details.

  2. Customer Lookup:

  • Searches Supabase for customer data.
  • Updates customer information if needed.
  1. File Search & Duplication Check:
  • Looks for existing lease offer files in Google Drive.

  • If duplicate found, deletes old file before proceeding.

  1. AI Lease Offer Creation:
  • Uses the LLM Chain (offerLetter) to generate a customized lease renewal letter.
  1. File Conversion:
  • Converts AI-generated text into a downloadable file format.
  1. Upload to Drive:
  • Saves the new lease offer in Google Drive.
  1. Email Preparation:
  • Uses Basic LLM Chain-email to draft the email body.

  • Downloads the offer file from Drive and attaches it.

  1. Email Sending:
  • Sends the renewal offer email via Gmail to the customer.

🛠 Setup Steps

  1. Supabase Connection:
  • Add Supabase credentials in n8n.

  • Ensure a customers table exists with relevant columns.

🔜Future Steps

  • Add specific letter template (organization template).
  • PDF offer letter

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Ollama Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOllama - lmChatOllama
Config choices
Version 1

Block 2 - Edit Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 3 - On form submission

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.2

Block 4 - Convert to File

Type / Role
n8n-nodes-base.convertToFile - convertToFile
Config choices
Version 1.1

Block 5 - Gmail

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 6 - Supabase-search_cust

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 7 - Google Drive-delete_dup

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 8 - If-check_dup

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 9 - Supabase_cust_info

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 10 - Google Drive-search

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 11 - Google Drive-upload

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 12 - Basic LLM Chain-offerLetter

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.6

Block 13 - Basic LLM Chain-email

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.6

Block 14 - Google Drive-get_file

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 15 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Generate AI-powered lease renewal offers with Ollama LLM, Supabase and Gmail
Complexity advanced
Nodes 17
Categories Document Extraction, Multimodal AI
Author Lakindu Siriwardana
Published 09 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7201/7201.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Generate AI-powered lease renewal offers with Ollama LLM, Supabase and Gmail do?

Automated Lease Renewal Offer by Email Features Automated Lease Offer Generation using AI (Ollama model). Duplicate File Check to avoid reprocessing the same customer. Personalized Offer Lette...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, Multimodal AI use case.