YukiLogic_
Blog
July 9, 2026·6 min read

Extracting Invoices from WhatsApp Conversations

When WhatsApp is your primary B2B channel, invoices get buried in chat. Here's how to pull them out automatically.

WhatsAppMakeWebhooks

A lot of B2B relationships — especially with smaller suppliers — run entirely on WhatsApp. Purchase confirmations, delivery notes, and invoices all arrive as images or PDFs in a chat thread, and someone has to scroll back through the conversation history every time finance needs a document.

This is the setup for pulling those documents out automatically as they arrive, instead of hunting for them later.

The setup

Three pieces working together:

  • WhatsApp Business Cloud API — receives incoming messages via webhook in real time, including media attachments.
  • Routing logic — incoming media is checked against simple heuristics first (file type, and whether accompanying message text or the sender matches known invoice-sending contacts) before being treated as a candidate invoice.
  • Extraction & storage — candidate documents are saved to cloud storage, run through an AI document analysis step to pull vendor, amount, and date, and the structured result is written to a central table alongside a link to the original file.

Handling the false positives

Not every image sent in a WhatsApp thread is an invoice — product photos, delivery confirmations, and casual chat images will hit the same webhook. Rather than trying to make the classifier perfect, route uncertain cases to a lightweight review step instead of silently discarding or silently accepting them. A wrongly-skipped invoice is a much more expensive mistake than a few seconds of manual review on an ambiguous image.

Why this beats a shared inbox forward rule

The obvious alternative — "just forward invoices to an email inbox" — depends on a human remembering to do the forwarding every time, which is exactly the failure mode you're trying to remove. Intercepting at the API level means nothing depends on someone remembering a manual step.

// next step

Want this built for your business?

Let’s talk about what I can automate for you.