Makani Tech: Build. Automate. Evolve.

Order Reader for WhatsApp Photos and PDFs with n8n + Claude (free workflow)

How to turn WhatsApp photos of handwritten orders into clean order rows with AI

FreeWorkflowBy Kishan Makani · updated 19 October 2026 · 6 min read

WhatsAppClaude visionGoogle SheetsSlack

Downloads

  • Download the n8n workflow (JSON)

    order-reader-photos-pdfs-n8n-claude.json · n8n workflow · 21 steps · starts with WhatsApp Trigger · uses WhatsApp, Anthropic, Google Sheets, Slack · 33 KB

    Import into n8n: Create Workflow, then the menu, then Import from File.

How to import it into n8n
  1. In n8n, create a new workflow.
  2. Open the ⋯ menu at the top right and choose Import from File, then pick the downloaded .json. (Or open the file, copy everything and paste it on the canvas.)
  3. Open each node with a warning and connect your own account: the file carries no passwords or keys.
  4. Run it once with Test workflow, check the result, then switch it to Active.

What it does

Customers send a photo of a handwritten order or a PDF purchase order to your WhatsApp number. n8n downloads it; photos go to Claude's vision and PDFs are turned into text first. Claude returns every line as written with product, quantity and unit, and marks anything hard to read as unclear instead of guessing. Code then matches each line to a SKU in your product list using names and aliases, adds rate and amount, and flags unmatched lines or missing quantities. Clean orders become one row per line in your Orders sheet and the customer gets a WhatsApp confirmation. Orders with any flag wait in Slack until your team chooses to save them with flags or call the customer.

Who it is for

Wholesalers, FMCG distributors, kirana suppliers, pharma and hardware distributors who receive orders as photos, chits and PDFs and retype them every morning.

What you need

  • An n8n account reachable from the internet
  • WhatsApp Business Cloud API
  • An Anthropic API key (Claude reads images)
  • A Google Sheet with tabs Products and Orders
  • Slack (#orders)

How the workflow runs, node by node

The slides show the same steps. Open the workflow in n8n and you will see a sticky note over each one.

Step 1 · Catch the photo or PDF

When a customer sends a photo or a PDF order on WhatsApp, n8n skips anything it has seen before, gets the file from WhatsApp and downloads it.

  • WhatsApp Trigger: Fires when a customer sends anything to your business WhatsApp number.
  • Photos and PDFs only: Lets through photos and PDF documents. Text messages are left for your normal chat or the WhatsApp Lead Agent.
  • Skip repeats: Remembers WhatsApp message ids, so an order photo delivered twice is never entered twice.
  • Get media URL: Asks WhatsApp for a short-lived download link for the photo or PDF.
  • Download file: Downloads the file using your WhatsApp credential and keeps it as binary data.

Step 2 · Claude reads every line

Photos go to Claude's vision, PDFs to text first. Claude returns each line as written, the product, quantity and unit. Hard to read? It marks the line unclear instead of guessing.

  • PDF or photo?: PDFs go to text extraction first. Photos go straight to Claude's vision.
  • Extract PDF text: Pulls the text out of the PDF purchase order (first 5 pages).
  • Read PDF with Claude: Reads the PDF text and returns one item per order line, with unclear lines marked.
  • Claude: Claude (claude-sonnet-5-5) at temperature 0, so answers stay consistent from run to run.
  • Order schema: One shared format for both readers: readable, customer name, items (raw text, product, qty, unit, unclear, note) and any delivery note.
  • Read photo with Claude: Looks at the photo (Claude vision) and returns one item per handwritten line, with unclear lines marked instead of guessed.

Step 3 · Match to your product list

Code matches each line to a SKU using names and the aliases customers really write, adds rate and amount, and flags lines with no match or no quantity.

  • Read product list: Reads your Products tab (SKU, Name, Aliases, Unit, Price). Aliases are what customers actually write, like 'parle g, parleg, PG'.
  • Match items to products: Matches every line to a SKU in your product list using names and aliases, adds price and amount, and flags lines that are unclear, unmatched or missing a quantity. Nothing is guessed.
  • Anything unclear?: If even one line is flagged (or the photo is unreadable), the order waits for a person. Clean orders go straight in.

Step 4 · Saved, confirmed, flagged

Clean orders become one row per line and the customer gets a confirmation. Orders with flagged lines reach Slack first: save with flags, or call the customer.

  • Ask team in Slack: Posts only the unclear lines to #orders with 'Save with flags' and 'Call customer', and waits up to 4 hours.
  • Team approved?: Save with flags continues to the sheet. Call customer sends a holding message instead.
  • One row per item: Turns the order into one item per line, carrying the order id, phone and name along.
  • Save order rows: Writes one row per order line in the Orders tab, keyed on order id plus line number. Flagged lines keep their 'Check: ...' status.
  • Confirm on WhatsApp: Sends one confirmation with the order id, item count and approximate total, and says which items you will call about. Free text is fine: the customer just messaged.
  • Tell customer we'll call: If the team chooses 'Call customer', the customer gets a polite holding message and nothing is saved yet.
  • Alert: confirm failed: Tells #orders if the confirmation did not send, so someone can message the customer.

Setup

  1. Import the JSON file into a new n8n workflow.
  2. Connect WhatsApp: OAuth on WhatsApp Trigger, and the WhatsApp API credential on Get media URL, Download file, Confirm on WhatsApp and Tell customer we'll call. Replace YOUR_PHONE_NUMBER_ID.
  3. Create an Anthropic credential on Claude (shared by both readers) and put your business name in both reader prompts.
  4. Make tab Products (SKU, Name, Aliases, Unit, Price) and tab Orders (LineId, OrderId, Date, Customer, Phone, Line, Written, SKU, Product, Qty, Unit, Rate, Amount, Status). Replace YOUR_SHEET_ID.
  5. Fill Aliases with what customers really write, comma separated.
  6. Connect Slack on Ask team in Slack and Alert: confirm failed.
  7. Activate, then send a photo of a real order chit from another phone. Compare the rows with the photo.

How to customise it

  • Push rows to your billing or ERP (Tally, Zoho, Vyapar import) instead of, or after, Google Sheets.
  • Add a Customers tab and look up the phone number to fill the customer's GSTIN and route.
  • Accept orders by email too: add a Gmail trigger that feeds PDFs into PDF or photo?.
  • Change the Slack wait (4 hours) or send flagged orders to a WhatsApp group of your order desk.

Guardrails

Unclear lines are flagged, never guessed, and any order with a flag waits for your team in Slack.

  • Claude is told never to guess silently. Unclear lines are marked and shown to a person.
  • SKU matching and amounts are done by code against your own product list.
  • Any order with a flag waits for your team. 'Call customer' saves nothing.
  • Duplicate WhatsApp deliveries are skipped, so an order is never entered twice.
  • The confirmation says 'approx' total and promises no dispatch time.

Troubleshooting

  • Download file fails with 401. It must use the same WhatsApp API credential (predefined type whatsAppApi). Media links expire after a few minutes, so do not re-run old executions.
  • Many lines say 'no matching product'. Add aliases. Look at the Written column of flagged rows and copy those words into Aliases.
  • Claude reads quantities wrongly. Ask customers for photos in good light, flat, one page per photo. Keep temperature at 0.
  • PDF orders come out empty. Scanned PDFs have no text. Convert the first page to an image or ask for a photo.

Want the members-only resources too?

A free account unlocks them all, including the ones shared in DMs.

Create a free account