🔬 Automate rental agreements with BoldSign, Google Sheets & Gemini AI

⚡ 97 views · 🔬 Document Extraction & Analysis

Description

Complete Video Documentation: https://youtu.be/O-bKlX3G7_4

Explanation WITH clean Video timestamps:


Prerequisites

Before you build this, you’ll need a few things:


In BoldSign, you would replace the {{...}} and [Date] parts with draggable form fields.


Understanding the BoldSign API Node

The key to sending the agreement is the Send aggrement to Tenant's Email node. This is a standard HTTP Request node, not a special BoldSign node.


Workflow Explanation (From Scratch)

This workflow is actually three separate flows that work together.

Flow 1: New Tenant Onboarding (Form to Agreement)

This is the main flow that kicks everything off when a new tenant is interested.

  1. Node: Tenant Form (Form Trigger)

    • What it is: This node creates a public web form [03:10]. This is the starting point.
    • From Scratch: You’d drag in a Form Trigger node. You add fields for “Your Name” (tenant’s name) and “Your Email” (tenant’s email).
    • This Workflow: It also cleverly uses hidden fields [03:18] to store the owner’s details, the property address, and the rent. This is a simple way to manage a single property. For multiple properties, you might use a database or a Google Sheet lookup.
  2. Node: Retrive Data from submitted form (Set)

    • What it is: This node takes the messy data from the form and organizes it into clean, named variables (like tenant_name, address, estimated_rent) [05:25].
    • From Scratch: It’s good practice to do this so the rest of your workflow is easy to read. It also calculates the expiry_date as one year from today.
  3. Node: Save the tenant Details (Google Sheets)

    • What it is: This logs the new tenant in your Google Sheet before the agreement is sent [05:51].
    • From Scratch: You’d set this to “Append or Update” mode. It maps the variables ( tenant_name, tenant_email, etc.) to the correct columns in your sheet.
  4. Node: Send aggrement to Tenant's Email (HTTP Request)

    • What it is: This is the BoldSign API call we just detailed. It takes all the data and sends the official signing request to both the owner’s and tenant’s email addresses [06:47].
  5. Node: Update Agreement Status (Google Sheets)

    • What it is: After the email is successfully sent, this node finds the row you just created (using the tenant’s email as a key) and updates the agreement status column to “Pending Signing” [08:55]. This is great for tracking.

Flow 2: Handling Signed Agreements (Webhook)

This flow listens for activity. It doesn’t run on a schedule; it waits for BoldSign to tell it something happened.

  1. Node: Webhook (Webhook Trigger)

    • What it is: This node generates a unique URL [02:45]. You copy this URL and paste it into your BoldSign account’s webhook settings [09:28].
    • From Scratch: Now, any time an event happens in BoldSign (like the document is viewed, signed, or completed), BoldSign will send a data packet to this URL, triggering the workflow.
  2. Node: If (If)

    • What it is: This is a filter. The webhook gets all events, but we only care about the final one [10:49].
    • From Scratch: It’s set to check the incoming data from the webhook. It looks at a header called x-boldsign-event and only continues if the value equals “Completed” [11:02]. This means it will ignore the “Signed” event (when just one person signs) and only proceed when both parties have signed.
  3. Node: Retrieve Tenant Email (Set)

    • What it is: This node digs into the large JSON data packet from the webhook to find the tenant’s email [11:17].
    • From Scratch: It uses a JavaScript .find() function to look through the signerDetails and pull the email for the person whose role was “Tenent” (Tenant). This gives us the unique key to update our spreadsheet.
  4. Node: Update Agreement Status as completed (Google Sheets)

    • What it is: The final step! Just like in Flow 1, this node finds the correct row in the Google Sheet (using the tenant’s email) and updates the agreement status column to “Completed” [11:32].

Flow 3: AI-Powered Status Bot (Telegram)

This is a bonus flow that lets the owner “chat” with the Google Sheet.

  1. Node: Telegram Trigger

    • What it is: This listens for any new message sent to your Telegram bot [11:52].
  2. Node: AI Agent (Langchain Agent)

    • What it is: This is the “brain”. It takes the message.text from the Telegram user [12:30].
    • From Scratch: Its prompt tells it to be a helpful assistant for rental agreements and to use the tools it’s given.
  3. Node: Google Gemini Chat Model (Google Gemini)

    • What it is: This is the Large Language Model (LLM) that the agent uses to think and form sentences.
  4. Node: Fetch Rental Agreements (Google Sheets Tool)

    • What it is: This is not a regular node, but a Tool plugged into the AI Agent [12:35].
    • From Scratch: You give the AI agent this “tool” and tell it: “This tool, named ‘Fetch Rental Agreements’, can get all the data from the Google Sheet.” When the user asks, “What’s the status of Jane Doe’s agreement?”, the AI knows it must use this tool to get the sheet data before it can answer.
  5. Node: Send a text message (Telegram)

    • What it is: This takes the final output from the AI Agent and sends it as a reply to the user in Telegram.

🔗 Nodes Used

Google Sheets, HTTP Request, Webhook, Telegram, Telegram Trigger, AI Agent

đŸ“„ Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup