Skip to main content

Build a cost estimation chatbot with Mistral AI, OCR & Supabase

Workflow preview

Workflow preview
100%
Build a cost estimation chatbot with Mistral AI, OCR & Supabase preview
Open on n8n.io

Important notice

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

1. Workflow Overview

AI Cost Estimation Chatbot (Conversational Dual Agent + OCR Workflow) Overview This workflow introduces a conversational AI Cost Estimation Chatbot with built in OCR document analysis and interacti...

Best for

  • Lead Nurturing automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.lmchatmistralcloud, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.toolcalculator, @n8n/n8n-nodes-langchain.chattrigger, n8n-nodes-base.gmailtool, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.splitout

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by DIGITAL BIZ TECH.

Original n8n.io source

1.1 Workflow description

Title
Build a cost estimation chatbot with Mistral AI, OCR & Supabase
Workflow name
Build a cost estimation chatbot with Mistral AI, OCR & Supabase

AI Cost Estimation Chatbot (Conversational Dual-Agent + OCR Workflow)

Overview

This workflow introduces a conversational AI Cost Estimation Chatbot with built-in OCR document analysis and interactive form guidance.
It helps users and teams handle pricing, measurement, and product configuration for multiple categories such as fabrics and tiles — whether data comes from an uploaded invoice, a stored RFQ, or live user input.

The system blends Mistral AI’s reasoning with n8n’s native toolsOCR Extract, Calculator, Supabase, and Gmail — to deliver clear, step-by-step cost calculations.
It automatically retrieves or parses OCR data, confirms details conversationally, performs unit conversions, and returns accurate estimates in real time.
Escalation and recordkeeping are handled via Gmail and Supabase.


Chatbot Flow

Trigger: Chat message (from n8n Chat UI) or Webhook (from a live site).
Model: Mistral Cloud Chat Model (mistral-medium-latest)
Memory: Simple Memory (Buffer Window, 15-message history)

Tools:

  • OCR Extract: Reads and converts invoices, receipts, and RFQs into structured data.
  • Supabase: Stores and retrieves OCR data for re-use in future calculations.
  • Calculator: Performs all material, area, and cost computations.
  • Gmail: Escalates customer queries or sends quote summaries.
  • Agent: ai agent cost estimate

Workflow Behavior:

  • Retrieves or parses OCR data, confirms and completes missing details interactively.
  • Guides users step-by-step through product setup (Fabric or Tile).
  • Calculates costs transparently using MATERIAL_COSTS and PROCESSING_COSTS.
  • Handles GSM ↔ sqm, area, and weight conversions automatically.
  • Escalates support or order confirmations via Gmail when requested.

Integrations Used

Service Purpose
** Chat** User-facing chatbot interface
OCR Extract Processes uploaded documents or receipts
Supabase Stores and retrieves OCR / quote data
Mistral AI Chat model and reasoning engine
Calculator Handles all numeric and cost calculations
Gmail Sends escalations or quote summaries

Agent System Prompt Summary

> “You are an AI cost estimation assistant for a brand.
> Retrieve or parse OCR data from Supabase, confirm details with the user, and calculate costs transparently.
> Use the Calculator for all numeric logic based on MATERIAL_COSTS and PROCESSING_COSTS.
> Handle GSM-to-sqm and other conversions automatically.
> If support or follow-up is needed, send a message through Gmail.
> Always guide the user conversationally, confirm assumptions, and explain every step clearly.”


Key Features

input: Chat Interface
Conversational guidance even when OCR data doesnt exist
OCR + Supabase integration for document reuse
Interactive cost estimator for fabrics and tiles
Transparent calculations and unit conversions
Gmail integration for escalation or order confirmation
Modular design for scaling to other product types


Summary

A powerful AI + OCR conversational cost estimation assistant that retrieves or parses order data, guides users through setup, and calculates costs transparently.
It combines intelligence (Mistral), precision (Calculator), and automation (OCR + Supabase + Gmail) to create a complete, human-like quotation system — perfect for brands, manufacturers, and B2B platforms.


We can help you set it up for free — from connecting credentials to deploying it live.

Contact: [email protected]
Website: https://www.digitalbiz.tech
LinkedIn: https://www.linkedin.com/company/digital-biz-tech/
You can also DM us on LinkedIn for any help.

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 - Mistral Cloud Chat Model4

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

Block 2 - Simple Memory1

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 3 - Calculator1

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

Block 4 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.3

Block 5 - Send a message in Gmail

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

Block 6 - Sticky Note

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

Block 7 - ai agent cost estimate

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 8 - Sticky Note1

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

Block 9 - Sticky Note2

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

Block 10 - Sticky Note3

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

Block 11 - Sticky Note5

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

Block 12 - Sticky Note6

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

Block 13 - Split Out

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

Block 14 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.1

Block 15 - CHECK IF BINARY FILE IS PRESENT OR NOT

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

Block 16 - NORMALIZE binary file

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 17 - OCR (ANY OCR API )

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 18 - STORE OCR OUTPUT

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

Block 19 - Sticky Note7

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

Block 20 - Sticky Note8

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

Block 21 - Sticky Note9

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

Block 22 - Sticky Note10

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

Block 23 - Supabase Get

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

Block 24 - Sticky Note4

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

Showing the first 24 of 28 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Build a cost estimation chatbot with Mistral AI, OCR & Supabase
Complexity advanced
Nodes 28
Categories Lead Nurturing, AI Chatbot
Author DIGITAL BIZ TECH
Published 03 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10467/10467.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 Build a cost estimation chatbot with Mistral AI, OCR & Supabase do?

AI Cost Estimation Chatbot (Conversational Dual Agent + OCR Workflow) Overview This workflow introduces a conversational AI Cost Estimation Chatbot with built in OCR document analysis and interacti...

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 Lead Nurturing, AI Chatbot use case.