{
 "schema_version": 1,
 "generated": "2026-10-31",
 "id": "microsoft-markitdown--extract-invoice-fields-with-azure",
 "repo": "microsoft/markitdown",
 "repo_url": "https://github.com/microsoft/markitdown",
 "repo_slug": "microsoft-markitdown",
 "title": "Extract invoice fields into YAML front matter",
 "page_title": "How to extract invoice fields into YAML front matter with Markitdown",
 "summary": "Route PDFs through Azure Content Understanding or Document Intelligence to get structured fields with the Markdown.",
 "who": "An operations person who wants vendor names, dates and totals out of invoices as data, not just text.",
 "problem": "Plain conversion gives you text, but a workflow needs specific fields in a predictable place.",
 "outcome": "Markdown with YAML front matter holding the extracted fields, ready for a script or an agent to read.",
 "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_types` to send only PDFs to the cloud, since every routed convert() call is billed"
 ],
 "agent_prompt": "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.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Advanced",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "You need your own Azure resource; the README links to setup docs rather than walking through it.",
 "category": "Research",
 "tags": [
  "Research"
 ],
 "lang": "python",
 "requirements": [
  "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"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "cost",
   "notice": "Each convert() call routed to Content Understanding or Document Intelligence is a billable Azure API call, and some add-ons cost extra."
  }
 ],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/microsoft-markitdown/extract-invoice-fields-with-azure/",
 "md": "https://dedupedai.com/use-cases/microsoft-markitdown/extract-invoice-fields-with-azure/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/microsoft-markitdown--extract-invoice-fields-with-azure.json",
 "api_version": "v1"
}
