Skip to main content

AI-Tax Document Parser in Power Automate

AI-Tax Document Parser is a Power Automate action by PDF4me that reads a tax document with AI and returns the form type, tax year, and a structured fields dictionary. Use it on W2, 1099, 1040, 1098, 1095, or W-4 forms to move data straight into SharePoint, Excel, Dynamics 365, or Power BI without manual entry.

What this action does

PDF4me AI-Tax Document Parser reads a tax document (PDF, PNG, JPG, or JPEG) and returns formType, taxYear, and a fields dictionary of extracted values. Supports W2, 1099, 1099-SSA, 1040, 1040-SR, 1040-NR, 1098, 1098-E, 1098-T, 1095A, 1095C, W-4, and UnifiedTaxUS. Optionally set Body/TaxModel for higher accuracy on a known form, or Body/customFieldKeys to pull additional fields beyond the standard set.

Related Blog Posts(1)

How Do I Authenticate My Power Automate Flow?

Every PDF4me action in Power Automate requires a valid connection. Create or select one that holds your PDF4me API key so the flow can authenticate AI tax document processing requests securely.

Important Facts You Should Not Miss

Only two fields are always required
File Content (the document bytes) and Body/Document/Name (the filename with extension). Everything else lives under Advanced parameters and is optional.
Body/TaxModel is a hint, not a filter
Leave it blank and the parser still auto-detects the form type, returned in formType. Set it to a known code (W2, 1040, 1099, etc.) only to sharpen field recognition accuracy.
Check warnings and fallbackUsed before trusting the output
A non-empty warnings array or fallbackUsed: true signals the AI hit a low-confidence field or an unusual layout. Route these cases to manual review in compliance-sensitive flows.
Power Automate AI - Tax Document Parser action configured with File Content, Body/Document/Name, and Advanced parameters showing Body/TaxModel and Body/customFieldKeys with one item

Map File Content and Body/Document/Name, then expand Advanced parameters for Body/TaxModel and Body/customFieldKeys.

Parameters

Required: File Content and Body/Document/Name must always be provided. Body/TaxModel and Body/customFieldKeys are optional Advanced parameters.

ParameterRequiredWhat it doesExample
File ContentRequiredBinary content of the tax document, mapped from a previous action (Get file content, SharePoint, OneDrive, email attachment). Supports .pdf, .png, .jpg, .jpeg.body('Get_file_content')
Body/Document/NameRequiredFilename of the tax document including its extension. Used for format detection and processing.tax_document_2024.pdf
Body/TaxModelOptionalAdvanced parameter. Known form type to improve extraction accuracy. Leave blank to let the AI auto-detect the form type.W2
Body/customFieldKeysOptionalAdvanced parameter. Array of additional field names to extract beyond the standard tax data set.["customField1", "customField2"]

Supported Tax Forms

Form GroupBody/TaxModel codesTypical fields
Wage statementW2Wages, federal/state tax withheld, Social Security wages, Medicare wages.
Information returns1099, 1099-SSAIncome amounts, payer information, tax withheld, recipient information.
Individual return1040, 1040-SR, 1040-NRAdjusted gross income, taxable income, tax owed, refund amount, filing status.
Interest and education1098, 1098-E, 1098-TMortgage interest paid, student loan interest, tuition payments.
Health coverage1095A, 1095CHealth insurance coverage information, employer information.
WithholdingW-4Withholding allowances, additional withholding, filing status.

Output Fields

FieldTypeWhat it contains
formTypeStringThe detected or specified tax form type, for example W2, 1099, or 1040.
taxYearStringThe tax year the document applies to, for example 2024.
fieldsObjectDictionary of extracted values, keyed by field name, plus any custom fields requested.
warningsArrayMessages flagging potential data quality issues or extraction challenges. Empty when none.
fallbackUsedBooleantrue if fallback extraction logic was used for this document.
rawOcrTextStringThe raw OCR text extracted from the document.
jobIdStringUnique identifier for the AI processing job.
successBooleantrue if extraction completed, false if it failed.
messageStringDescriptive result message for the processing run.

How Do I Set Up AI-Tax Document Parser in Power Automate?

  1. Add PDF4meAI-Tax Document Parser to your Power Automate flow.
  2. Map File Content from a previous action (SharePoint, OneDrive, or an email attachment).
  3. Set Body/Document/Name with the file's extension (.pdf, .png, .jpg, or .jpeg).
  4. Optionally expand Advanced parameters and set Body/TaxModel to a known form code for higher accuracy.
  5. Optionally set Body/customFieldKeys for any fields beyond the standard set. Run the flow, the parsed result returns as formType, taxYear, and fields.

Typical Setups

Workflow ExamplesCommon Power Automate flow patterns using AI-Tax Document Parser.
W2 intake to HR system
  1. A flow triggers when an employee uploads a W2 to a SharePoint intake folder.
  2. AI-Tax Document Parser runs with Body/TaxModel set to W2 for higher accuracy.
  3. The extracted wages and withholding fields are written to a SharePoint list.
  4. A Condition checks the warnings array and routes low-confidence rows to manual review.
1099 batch reconciliation
  1. A flow triggers for each 1099 attachment received via Outlook.
  2. AI-Tax Document Parser extracts payer information and income amounts into a fields dictionary.
  3. The data is inserted into an Excel workbook for accounting reconciliation.
1040 return archival
  1. A flow triggers when a filed 1040 return lands in a records library.
  2. AI-Tax Document Parser extracts filing status, adjusted gross income, and refund amount.
  3. A Dynamics 365 record is created with the extracted tax year and summary fields for audit lookup.

Practical Tips

Set Body/TaxModel when you already know the form
Leaving it blank still works via auto-detection, but a known code sharpens field recognition, especially on scanned or lower-quality images.
Always branch on success and warnings
Check success before writing extracted data downstream, and inspect warnings for any fields the AI flagged as uncertain before treating the output as final.
Custom fields extend, they do not replace
Body/customFieldKeys adds extra entries to the fields dictionary alongside the standard form fields, it does not narrow or filter the standard set.
rawOcrText is useful for debugging
When a field looks wrong, compare it against rawOcrText to see whether the source scan quality, not the parser, is the root cause.
Match the file extension to the real format
Body/Document/Name must carry the true extension (.pdf, .png, .jpg, .jpeg) of the mapped File Content, a mismatched extension can affect processing.

Cheat Sheet

FieldValue
ActionAI-Tax Document Parser
Required fieldsFile Content, Body/Document/Name
Optional advanced fieldsBody/TaxModel, Body/customFieldKeys
Supported form codesW2, 1099, 1099-SSA, 1040, 1040-SR, 1040-NR, 1098, 1098-E, 1098-T, 1095A, 1095C, W-4, UnifiedTaxUS
Supported file types.pdf, .png, .jpg, .jpeg
OutputformType, taxYear, fields, warnings, fallbackUsed, rawOcrText, jobId, success, message

Common Questions

Which tax forms does the AI-Tax Document Parser support?+
W2, 1099, 1099-SSA, 1040, 1040-SR, 1040-NR, 1098, 1098-E, 1098-T, 1095A, 1095C, W-4, and UnifiedTaxUS. Set Body/TaxModel to the exact form code to improve extraction accuracy for a known type.
Do I have to tell the parser which tax form type I am sending?+
No. Body/TaxModel is optional. Leaving it blank lets the AI detect the form type automatically and return it in the formType output field. Setting it improves accuracy when you already know the form.
How do I extract fields that are not part of the standard tax data set?+
Populate Body/customFieldKeys with an array of the field names you need. Each key you list is extracted alongside the standard fields dictionary, in addition to the built-in form fields. See <a href="https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/prebuilt/tax-document" target="_blank" rel="noopener noreferrer">Microsoft's tax document data extraction reference</a> for the kind of structured fields these forms typically expose.
What does the warnings array in the output mean?+
Warnings flag potential data quality issues, such as a low-confidence field or an unusual layout, without failing the run. Check the warnings array in automated pipelines before trusting extracted values without review.
Can I process scanned images as well as digital PDFs?+
Yes. File Content accepts .pdf, .png, .jpg, and .jpeg formats, so scanned tax documents work the same way as digitally generated PDFs. Retention requirements for the underlying tax records should still follow guidance such as the <a href="https://www.irs.gov/businesses/small-businesses-self-employed/how-long-should-i-keep-records" target="_blank" rel="noopener noreferrer">IRS recordkeeping guidelines</a>.

Industry Use Cases & Applications

  • Tax Return Processing: Automate tax return processing using extracted tax document data
  • Tax Filing: Automate tax filing preparation using extracted tax form information
  • Tax Compliance: Ensure tax compliance using extracted tax document data
  • Tax Reporting: Generate tax reports from extracted tax document information
  • Audit Preparation: Prepare audits using extracted tax document data

Same Task on Other Platforms

Get Help