Demos & Use Cases

    Lawlift Integration: Connect Legal Bots via API

    Build a Legal Bot that extracts term sheet data with AI, lets users review and edit it, then auto-generates a Lawlift document — step-by-step in Lexemo e!.

    Lawlift

    Hello! Today I'll guide you through building a bot that can:

    1. Extract data from a term sheet
    2. Allow you to review and manually edit it
    3. Automatically push the data into Lawlift platform to create a document using a Lawlift template.

    Ready to see the bot in action? Let's begin!

    Step 1: Term Sheet Upload

    The first section of the bot allows the user to upload the term sheet we want to process. This is the starting point of the workflow.

    1. Add a Section Node and name it "Termsheet Upload."
    2. Add a Text Field Node named "text-field-intro" to give clear instructions to the user.
      – Edit the node and paste your introductory text.

    Tutorial image 1

    Tutorial image 2

    1. Add a File Upload Node to allow users to upload the term sheet.
    • Provide a name and description for clarity.
    • Configure file type and AI settings, toggle "Use in AI Output," and mark the node as "Required" so users cannot proceed without completing this step.

    Tutorial image 3

    Step 2: Data Extraction

    In this section, the bot will extract the data from the uploaded document and format it for editing before sending it to Lawlift.

    1. Create a Section named "Data Extraction."
    2. Add an AI Output Node to parse the uploaded term sheet. The AI should extract specific fields such as names, addresses, and amounts according to the field names specified in Lawlift.
    3. Configure the prompts:

    System Prompt:

    Instruct the AI to analyze the term sheet, extract the required fields, and return them as machine-readable JSON.

    "You are an expert data extraction AI. Your task is to analyze the provided document and extract specific fields. The final output must be a single, valid JSON object without any markdown, such as "`json, or other formatting.

    Extract the following fields:

    • borrower_name (no salutations)
    • borrower_street_no
    • borrower_plz
    • borrower_city
    • lender_name
    • lender_representative
    • lender_street_no
    • lender_plz
    • lender_city
    • loan_amount (as a number, not a string)
    • loan_purpose
    • loan_interest (as a number, not a string)

    For the following fields, output a boolean value (true or false without quotes):

    • borrower_male_tf
    • borrower_female_tf
    • lender_male_tf
    • lender_female_tf
    • lender_private_tf
    • lender_company_tf
    • interest_settlement_quarterly_tf
    • interest_settlement_semi-annually_tf
    • interest_settlement_annually_tf

    If a value cannot be found, use an empty string "" for text fields, 0 for the loan amount, and false for boolean fields".

    Dynamic Prompt:

    Include the text variable from the uploaded file and specify the output format as JSON.

    "Bitte analysiere das hochgeladene Dokument und extrahiere die angeforderten Daten in dem vorgegebenen JSON-Format".

    Tutorial image 4

    Once the AI completes the extraction, we need to map the JSON data into individual variables:

    1. Locate the JSON using the Debugger in the Preview area:
    • Upload a sample term sheet
    • Click Upload → then Next
    • Open Prediction and copy the extracted JSON
    1. Add a Variable Mapper Node:
    • Select AI-Output Extraction Prediction as the source node
    • Set source type to JSON
    • Paste the JSON from the Debugger into the settings
    • Filter out any unnecessary fields if needed

    Tutorial image 5

    Tutorial image 6

    Step 3: Making Extracted Data Editable

    Now we want each extracted data point to appear as default, editable values so users can review and correct information before sending it to Lawlift.

    1. Use AutoMate to automatically create:
    • Input fields with default values prefilled from the JSON and a Boilerplate Node containing a JSON referencing the input fields (required for Lawlift)

    • Toggle "Include Node Above" so AutoMate identifies variables from the Variable Mapper

    • Provide a prompt for AutoMate to:

    • Generate all the editable input fields

    • Create the boilerplate JSON for Lawlift

    • Wait a few seconds while AutoMate generates the nodes

    Tutorial image 7

    Add the Lawlift Template ID to the boilerplate JSON

    Tutorial image 8

    Step 4: Generating the Contract in Lawlift

    Before generating the document, add a logical step to ensure AI Output Extraction is not empty

    Tutorial image 9

    Once the data is verified, we need to use an API Connector node to send extracted data to Lawlift in form of a JSON and use a Variable Mapper Node to Map the API response

    Tutorial image 10

    Add a logical condition to handle API response codes:

    • 200–300: Continue processing
    • 300+: Flag an error

    Tutorial image 11

    Step 5: Document Link and Completion

    In the final stage, we will display a clickable document link for the user.

    Add an AI Output Node with a prompt to generate a clickable HTML link

    Tutorial image 12

    Add a logic condition to ensure the node has finished processing and Add a Text Field Node to show the clickable link on the front end

    Tutorial image 13

    Add a Send & Result Node to complete the workflow

    Tutorial image 14

    Congratulations!
    You've successfully built a Lawlift Data Extraction Bot that:

    • Extracts and maps term sheet data
    • Allows manual review and edits
    • Generates a Lawlift document with updated fields

    Stay Ahead in Legal Automation

    Structured updates. Practical insights. No noise.

    Join legal teams who value clarity over hype. One focused Newsletter, no clutter.

    Just relevant insights to help you move faster and stay in control of your workflows.

    ISO/IEC 27001 CertifiedAllianz für Cyber-Sicherheit Teilnehmer
    Lexemo

    © 2026 Lexemo GmbH. All rights reserved. GDPR & EU AI Act Ready.

    Made with ❤️ in Frankfurt am Main