cost. Each convert() call routed to Content Understanding or Document Intelligence is a billable Azure API call, and some add-ons cost extra.
Who it is forAn operations person who wants vendor names, dates and totals out of invoices as data, not just text.
The problemPlain conversion gives you text, but a workflow needs specific fields in a predictable place.
The outcomeMarkdown with YAML front matter holding the extracted fields, ready for a script or an agent to read.
What you need first
- Python 3.10 through 3.14, ideally in a virtual environment
- Optional dependency groups for each format, or [all] for everything
- Optional: an OpenAI-compatible client for image descriptions and the markitdown-ocr plugin
- Optional: an Azure Document Intelligence or Content Understanding resource, which is billed per call
Steps
- Install the extra with
pip install 'markitdown[az-content-understanding]' - Set the MARKITDOWN_CU_ENDPOINT environment variable once to your Content Understanding endpoint
- Convert with
markitdown path-to-file.pdf --use-cu - For domain fields, pass a custom analyzer such as
cu_analyzer_id="my-invoice-analyzer"in Python and read the fields block - Use
cu_file_typesto send only PDFs to the cloud, since every routed convert() call is billed
Prompt for your agent
Using microsoft/markitdown with Azure Content Understanding, convert the invoices in <folder> to Markdown with structured fields. Restrict cloud routing to PDFs with cu_file_types and give me a table of VendorName and InvoiceDate from the front matter.
Caveat. You need your own Azure resource; the README links to setup docs rather than walking through it.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for microsoft/markitdown and "Extract invoice fields into YAML front matter"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer