DEV Community

Cover image for Build an Invoice Verification App With ToolJet MCP
Athulya R for ToolJet

Posted on Originally published at blog.tooljet.com

Build an Invoice Verification App With ToolJet MCP

Introduction

Learn how to build an invoice verification app with ToolJet MCP for an accounts payable team that handles scanned supplier bills. The app keeps the scan, extracted values, duplicate checks, match results, routing reason, and approval state on one record so clerks and approvers work from the same source of truth. The output is a structured ToolJet application, not a screen or a code drop, and the team keeps running it as the invoice flow changes. In this article you see the finished app, get the prompt, and see how the build hangs together around real invoice work.

Build an invoice verification app with ToolJet MCP, the finished application: Capture & Review: the Boral Concrete scan beside what Textract read, the routing preview, and a $530 over-tolerance line in the three-way match

Capture & Review: the Boral Concrete scan beside what Textract read, the routing preview, and a $530 over-tolerance line in the three-way match

Build an invoice verification app with ToolJet MCP, the finished application: Approval Queue: waiting invoices with who each is routed to, its age and three-way match result, and the review panel below

Approval Queue: waiting invoices with who each is routed to, its age and three-way match result, and the review panel below

Build an invoice verification app with ToolJet MCP, the finished application: Monthly Summary: September KPIs, spend by supplier, the six-month trend and the supplier breakdown

Monthly Summary: September KPIs, spend by supplier, the six-month trend and the supplier breakdown

What We're Building

The main review page puts the original scan beside editable fields so you can check the source without leaving the record. Low-confidence reads stand out immediately, duplicate invoices trigger a warning, and each line shows ordered, received, and invoiced quantities with the variance that needs a clerk decision. When a variance is within tolerance, the clerk records the reason and moves on; when it is not, the invoice stays on the path that routing rules assign. The approval page then compresses the case into a queue, the scan, the routing reason, the match view, and the action buttons. The monthly page gives the same record a supplier view through summary tiles, a spend chart, a trend line, and a breakdown table.

  • Capture supplier invoices from scans and keep the original image beside the editable fields
  • Highlight low-confidence reads, duplicate invoice checks, and line-level match gaps before routing
  • Compare ordered, received, and invoiced quantities with a logged clerk tolerance decision
  • Route each invoice with a stored reason into an approval queue scoped by role
  • Review spend by supplier with monthly summary tiles, trends, and a breakdown table

Build an Invoice Verification App With ToolJet MCP for AP Review

Want to build it yourself? Start with the ToolJet MCP repository for setup instructions, supported agents, and everything you need to follow along.

The Consolidated Build Prompt

The real build took several passes, and the requirements are consolidated into one prompt that could have been used from the start. You can reproduce the same invoice verification app in a single shot from the prompt below, without reconstructing the earlier iterations.

Build a 3-page invoice verification app in ToolJet for the accounts payable team of a Melbourne construction contractor handling about 900 scanned supplier invoices a month. Use only native components, dense enterprise layouts, slightly larger fonts, and a muted Nordic theme: linen and off-white surfaces, slate-blue primary, sage and ochre accents.

Store data in an existing PostgreSQL datasource in ivp_ tables: suppliers, purchase orders, PO lines, goods receipts, invoices, invoice lines, tolerance log, app roles and settings. Put the three-way match and routing logic in SQL views. Read invoices with Amazon Textract (forms and tables) and store uploads in Amazon S3.

Roles come from the signed-in user's email: AP clerks capture and correct, site managers see only invoices routed to them, the finance controller sees everything.

Capture & Review: an Upload invoice button, the original scan on the left and an editable form on the right, each scrolling independently. Show supplier, invoice number, date, PO, subtotal, GST, total and line items, and flag any value read under 90% confidence. Warn and block routing when the same supplier, invoice number and amount was seen before. Show ordered, received and invoiced quantities per line side by side, highlight disagreements with the difference in units and dollars, and let a clerk accept a variance within 2% of the PO line or $50, whichever is smaller, logging who accepted it, the amount and the reason.

Routing, stored on the invoice with its reason: no matching PO goes to an exceptions queue at any value; an unresolved variance or a total of $10,000 or more goes to the finance controller; otherwise it goes to the site manager on the PO.

Approval Queue: KPI tiles, a queue table and a review panel with the scan, the routing reason, the match and approve, reject or send-back actions. Monthly Summary: KPI tiles, spend by supplier, a six-month trend and a supplier breakdown table.

How ToolJet MCP Builds the App

ToolJet MCP takes the requirements as one application brief and works through the whole invoice app, not just the visible form: the data model, queries, pages, components, and the wiring between them land as one structured ToolJet application. That matters because invoice verification does not end at the interface, the runtime also has to carry data connectivity, workflows, permissions, deployment, and ongoing change where supported, instead of leaving you with a codebase to operate yourself. The path stays open, so you can keep moving from AI generation to visual editing and then into code when a case needs it.

The One Thing That Broke

The Boral invoice briefly showed Reece supplier data, so the captured fields looked wrong on screen. The editor-mode query run endpoint had persisted a Reece image as the Textract query document, which meant later reads used the wrong scan. Resetting that document link fixed the issue.

Data Created

The app ended up with nine tables in three groups. ivp_suppliers, ivp_purchase_orders, ivp_po_lines, and ivp_goods_receipts hold the purchasing trail, ivp_invoices, ivp_invoice_lines, and ivp_tolerance_log hold capture and variance handling, and ivp_app_roles plus ivp_settings control access and thresholds.

Page Components What they cover
Capture & Review 36 routing banner, upload and action toolbar, scan beside the editable form, checks strip, line items, three-way match and tolerance log
Approval Queue 16 queue KPIs, queue table with Review, scan, routing reason, facts, match table and approve/reject/back actions
Monthly Summary 10 month picker, six KPI tiles, spend-by-supplier and six-month charts, supplier breakdown table

What Got Generated

Metric Result
Pages 3
PostgreSQL tables 9
Queries 33
Components 62
Code files to maintain 0
Repair cycles 1
Final validation 0 errors

Industries That Run This

Construction and civil contractors, facilities and property maintenance firms, manufacturers, wholesalers and distributors, and any accounts payable team that pays suppliers against purchase orders and goods receipts, especially where invoices still arrive as scans, PDFs and phone photos.

Who Gets Access To The Built App

As built, access is decided by the signed-in user's email in the app's own roles table and enforced in every query. AP clerks upload, correct and route invoices and accept small variances within tolerance. Site managers see and decide only the invoices routed to them from their purchase orders. The finance controller sees every queue, approves high-value and escalated invoices, and works the exceptions queue with AP. The build did not create ToolJet user groups or page permissions; in production, add groups for these three roles and restrict pages to match.

Enterprise Features for Your Invoice Verification App

An invoice verification app handles supplier invoices, payment totals, and approval reasons. ToolJet covers that governance at the platform layer, so you configure it once instead of rebuilding it in every app.

  • SSO and SCIM: sign in with SAML, OIDC or LDAP, and provision users automatically
  • Role-based access control: scope permissions to the app, the data source, and each query
  • Audit logs: track every login, edit, and approval decision for compliance review
  • Air-gapped deployment: self-host on Docker or Kubernetes so your data stays in your network
  • Multiplayer editing: several builders work on the same app, with versioning and Git sync
  • ToolJet AI inside your own deployment: run the AI features in your tenancy rather than a shared service

Final Takeaways

This build shows an invoice verification app that pulls scan data, catches duplicates, compares ordered, received, and invoiced quantities, and routes each record with a stored reason. The result is a structured ToolJet application on a mature runtime, so you keep editing the same app after generation instead of owning a handoff to code. That matters because visual editing, code where needed, data connectivity, workflow logic, and access rules where supported all stay attached to one application as the process changes. The article shows the shape of a business app, not just a page.

Three to four builds per model across four-page apps. 1 credit = 1 cent. Credits and time are estimates only and will vary with the complexity of what you ask for. This measures cost and speed only, not how complete or polished the result is.

Even averaging across model tiers, ToolJet MCP can turn $10 into a dozen or more working 4-page apps.

Try ToolJet MCP

Build your own invoice verification app with ToolJet MCP around your existing invoices, then request a ToolJet demo.

FAQs

What does ToolJet MCP do for an invoice verification app?

ToolJet MCP takes the app requirements and turns them into a structured ToolJet application with pages, queries, components, and wiring. For this build, that means the invoice scan, duplicate check, match logic, routing reason, approval queue, and monthly review stay in one app.

What does the capture screen do with a scanned invoice?

The Capture and Review page shows the scan beside editable fields so you can correct Textract output while the source image stays visible. Low-confidence values stand out, duplicate invoices raise a warning, and line items show the three-way match context.

Can you reproduce the build from the prompt in this article?

Yes, the prompt in this article is the single build spec the article uses for reproduction. You can paste it into the agent flow and get the same three-page invoice verification workflow without reconstructing the earlier iteration history.

Do you need to write code to use this app?

No code is required to get the first version of the app. The generated app is still editable, so you can adjust the layout, routing rules, and record handling visually, then drop into code when a case calls for it.

What happens to the app after the agent finishes?

The output is a structured ToolJet application, not a throwaway screen or a code bundle. That means the runtime keeps the data connections, workflow logic, and app shape together, and you keep iterating on the same record as the process changes.

Can this app use existing PostgreSQL, S3, and Textract data?

Yes, this build stores invoice data in an existing PostgreSQL datasource, keeps uploads in Amazon S3, and reads documents with Amazon Textract. The app then uses those sources for capture, matching, routing, and monthly review.

Can several people keep working on the same app?

Yes, the app is a shared ToolJet project, so more than one person can continue the same build instead of creating separate copies. That keeps the invoice flow, tables, and queries aligned while different people update the same application.

Top comments (0)