The moment it happens
Read invoice details from a PDF or photo
Each invoice you send comes back as supplier, date, totals and line items, ready to file.
- Runs
- The moment it happens
- Apps
- Mistral AI
- AI
- Not needed
- Access
- API key
Send this to your assistant
Create a ClickRuntime automation: give me a link I can post invoice PDFs or photos to. Run Mistral OCR on each one, extract the supplier, invoice date, total, VAT and line items as JSON, and email me the result.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Accounts payable still runs on PDFs and phone photos. A supplier emails an invoice, a driver snaps a receipt, a client sends a scan, and someone retypes the vendor name, invoice number, date, total and VAT into the accounting system. It takes a few minutes per invoice, mistakes creep in, and a transposed digit in a total can mean a wrong payment or a reconciliation problem weeks later.
You send the invoice file or a link to a web address provided by ClickRuntime. The document is read by Mistral's OCR service, turned into text, and a chat completion extracts the fields into structured JSON, such as supplier, number, date and total. The JSON is returned to you and also emailed. It runs as soon as the file arrives.
Bookkeepers, small finance teams and developers building invoice workflows use it to skip manual typing.
What you get out of it
Data entry time drops sharply
Reading fields from the document replaces minutes of retyping per invoice. Over a month with hundreds of invoices, that is days of work given back to the finance team. That is a clear saving.
Fewer transcription errors
Machines do not transpose digits in an invoice number. Cleaner data reduces payment mistakes and the awkward emails with suppliers that follow. Each corrected digit saves a later correction in the books.
Photos and scans work
OCR handles phone pictures and scanned PDFs, not just digital ones. Receipts from the field can be processed the same day instead of waiting for someone to retype them at the office.
Structured output fits your systems
Getting JSON means the fields can be passed on to accounting software, a spreadsheet or another automation. You do not need to copy values from a text blob. That makes follow-on automation straightforward.
Faster approvals and payments
When data is extracted within seconds, an invoice can enter the approval queue the same day. That helps you capture early payment discounts and keep suppliers happy. Faster handling improves relationships too.
Consistent fields every time
Every invoice produces the same set of fields, whatever the layout. Reports and checks can rely on them, which is not true of hand-typed notes. Reviewers then know exactly where to look in each document.
How it works
What happens, step by step
When you send a link to an invoice PDF or photo to your personal ClickRuntime link, the automation starts straight away.
Mistral reads the text from every page of the invoice.
AI pulls out the supplier, invoice date, total, VAT and each line item with its quantity and amount.
The details are emailed to you, ready to file or copy into your accounts.
Before it runs live
- Connect Mistral AI
- Paste your automation's link into the other app's webhook settings
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Act only on the items that match your own rules, and skip the rest
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other Mistral AI steps into one automation
Under the hood
The code that runs this automation
import json
from clickruntime import on_event, credentials, notify, http
API = "https://api.mistral.ai/v1"
@on_event
def handle(event):
url = (event.json or {})["url"]
headers = {"Authorization": f"Bearer {credentials.secret('MISTRAL_API_KEY')}"}
kind = "image_url" if url.lower().endswith((".png", ".jpg", ".jpeg")) else "document_url"
ocr = http.post(f"{API}/ocr", headers=headers, timeout=120,
json={"model": "mistral-ocr-latest", "document": {"type": kind, kind: url}}).json()
markdown = "\n".join(p["markdown"] for p in ocr["pages"])
chat = http.post(f"{API}/chat/completions", headers=headers, json={
"model": "mistral-small-latest", "response_format": {"type": "json_object"},
"messages": [{"role": "user", "content": "Extract supplier, invoice_date, total, vat and line_items "
f"(description, quantity, amount) as JSON from:\n{markdown}"}],
}).json()
invoice = json.loads(chat["choices"][0]["message"]["content"])
notify.email_me(f"Invoice from {invoice.get('supplier')}", json.dumps(invoice, indent=2))
return invoiceFAQ
Common questions
Which fields does it extract?
Do I need a Mistral account?
How accurate is the extraction?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Get a morning digest written by Mistral
New posts from your feeds arrive at 7am as one short summary, without repeats.
See how it worksPost new orders and sign-ups to Slack
When something happens in your shop, app or form, the details land in the right channel straight away.
See how it worksBook appointments only when you're free
Booking requests are accepted only for free slots within your hours, and land on your calendar with the attendee.
See how it worksKeep exploring
Set up “Read invoice details from a PDF or photo” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.