AI-Process Tax Document using n8n action
PDF4me AI-Process Tax Document extracts structured data from tax documents using AI-powered machine learning through n8n automation workflows. Process tax document PDFs or images via n8n triggers, binary data, base64 strings, or public URLs to automatically extract tax form types, tax years, tax fields, and tax document data from supported tax models (W2, 1099, 1099-SSA, 1040, 1040-SR, 1040-NR, 1098, 1098-E, 1098-T, 1095A, 1095C, W-4, UnifiedTaxUS) with high accuracy and intelligent field recognition. This solution is ideal for tax document processing automation, tax form digitization, automated tax data extraction, tax return processing, tax compliance tracking, automated tax filing, tax document management, and tax processing workflows that require AI-powered extraction with structured output and seamless integration.
Setup
Add the PDF4me "AI-Process Tax Document" node to your n8n workflow and configure the required parameters. For initial setup instructions, see our n8n Integration Guide.
Prerequisites:
- PDF4me API credentials
- n8n workflow access
Configuration:
- Add PDF4me node to workflow
- Select "AI-Process Tax Document" action
- Configure input parameters (see below)

Parameters
Complete list of parameters for the AI-Process Tax Document action. Configure these parameters to control tax document processing.
Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| Input Data Type | Required | Choose how to provide the tax document to process. Options: Base64 String, Binary Data, URL. Default is `Binary Data`. | Binary Data |
| Base64 Document Content | Conditional | Base64 encoded tax document content. Shown when Input Data Type is Base64 String. | JVBERi0xLjQKJ... |
| Input Binary Field | Conditional | Name of the binary property that contains the tax document file (usually "data" for file uploads). Shown when Input Data Type is Binary Data. Default is `data`. | data |
| Document URL | Conditional | URL to the tax document file to process. Shown when Input Data Type is URL. | https://abc.com/tax_document.pdf |
| Document Name | Required | Name of the tax document file for reference. Default is `tax_document.pdf`. | tax_document.pdf |
| Tax Model | Optional | Optional tax model for improved parsing accuracy. Options: 1040, 1040-NR, 1040-SR, 1095A, 1095C, 1098, 1098-E, 1098-T, 1099, 1099-SSA, None, UnifiedTaxUS, W-4, W2. | 1040 |
| Custom Field Keys | Optional | Comma-separated list of custom field keys to extract (e.g., "field1,field2,field3"). | ["customField1", "customField2"] |
| Advanced Options | Optional | Optional settings, collapsed behind Add Option. | Add Option |
| Custom Profiles | Optional | Use 'JSON' to adjust custom properties. Review Profiles at https://developer.pdf4me.com/api/profiles/index.html to set extra options for API calls. | |
Output
Output Parameters
| Field | Type | What it contains |
|---|---|---|
_metadata | String | Object added by the node: success (always true), message (`Tax document processed successfully`), processingTimestamp (time the node received the result, ISO 8601), sourceFileName (the input file's name for Binary Data, the last part of the URL for URL, and Document Name for Base64) and operation (`processTaxDocument`). |
All fields of the PDF4me response are copied into the item: the tax form details read by AI (for example from a W2, 1099, 1040, 1098, 1095 or W-4 form), such as form type, tax year, payer, employer and employee details, income and tax amounts, and the values of the custom fields. If PDF4me returns a plain value instead of an object, it is put in a result field. The exact fields depend on the PDF4me response.
All fields of PDF4me's response are copied into the item: the tax form details read by AI (for example from a W2, 1099, 1040, 1098, 1095 or W-4 form), such as form type, tax year, payer, employer and employee details, income and tax amounts, and the values of the custom fields. If PDF4me returns a plain value instead of an object, it is put in a result field. The exact fields depend on PDF4me's response.
Tax Document Data Fields:
The taxDocumentData object contains the following fields:
| Field | Type | What it contains |
|---|---|---|
_metadata | String | Object added by the node: success (always true), message (`Tax document processed successfully`), processingTimestamp (time the node received the result, ISO 8601), sourceFileName (the input file's name for Binary Data, the last part of the URL for URL, and Document Name for Base64) and operation (`processTaxDocument`). |
N8N Action Response
The PDF4me AI-Process Tax Document API returns a JSON response with the following structure:
{
"taxDocumentData": {
"formType": "",
"taxYear": "",
"warnings": [
"Some fields such as filing status, SSNs, address, wages, total income, adjusted gross income, and taxable income are missing or not visible on this page.",
"Some fields such as filing status, SSNs, address, wages, total income, adjusted gross income, and taxable income are missing or not visible on this page."
],
"fallbackUsed": false,
"rawOcrText": "",
"employerName": "",
"employerEin": "",
"employerAddress": "",
"employeeName": "",
"employeeSsn": "",
"employeeAddress": "",
"wagesTips": "",
"socialSecurityWages": "",
"socialSecurityTaxWithheld": "",
"medicareWages": "",
"medicareTaxWithheld": "",
"state": "",
"stateWages": "",
"stateIncomeTax": "",
"localIncomeTax": "",
"box12Codes": "",
"payerName": "",
"payerTin": "",
"payerAddress": "",
"recipientName": "",
"recipientTin": "",
"recipientAddress": "",
"recipientSsn": "",
"nonemployeeCompensation": "",
"otherIncome": "",
"accountNumber": "",
"stateTaxWithheld": "",
"benefitsPaid": "",
"taxWithheld": "",
"box7VoluntaryFederalIncomeTaxWithheld": "",
"box8StateTaxWithheld": "",
"filingStatus": "Married filing jointly",
"taxpayerName": "John A. Doe",
"taxpayerSsn": "124-68-8818",
"spouseName": "Sarra Johson",
"spouseSsn": "235-607-8333",
"address": "123 Main St Apt 4B, Anytown, California 90210",
"wages": "45000",
"taxableInterest": "",
"taxExemptInterest": "",
"dividends": "",
"iraDistributions": "",
"socialSecurityBenefits": "",
"totalIncome": "45150",
"adjustedGrossIncome": "44650",
"standardDeduction": "",
"taxableIncome": "30800",
"totalTax": "3500",
"federalIncomeTaxWithheld": "4000",
"refundAmount": "500",
"amountOwed": "",
"dependents": "",
"virtualCurrency": "",
"additionalIncome": "",
"adjustmentsToIncome": "",
"lenderName": "",
"lenderTin": "",
"mortgageInterest": "",
"pointsPaid": "",
"refundOverpaidInterest": "",
"mortgageInsurancePremiums": "",
"propertyAddress": "",
"mortgageAcquisitionDate": "",
"outstandingMortgagePrincipal": "",
"borrowerName": "",
"borrowerTin": "",
"studentLoanInterestReceived": "",
"studentName": "",
"studentTin": "",
"schoolName": "",
"schoolTin": "",
"qualifiedTuitionAndRelatedExpenses": "",
"scholarshipsOrGrants": "",
"serviceProviderTin": "",
"refunds": "",
"policyNumber": "",
"startDate": "",
"endDate": "",
"monthlyPremium": "",
"advancePayment": "",
"issuerName": "",
"coverageMonths": "",
"offerOfCoverage": "",
"safeHarbor": "",
"offerOfCoverageCode": "",
"employeeShareOfLowestCostMonthlyPremium": "",
"multipleJobsOrSpouseWorks": "",
"claimDependents": "",
"deductions": "",
"extraWithholding": "",
"step3DependentsTotal": "",
"step4aOtherIncome": "",
"step4bDeductions": "",
"income": "",
"credits": "",
"totalAssets": "",
"liabilities": "",
"investments": ""
},
"jobId": "12345678-1234-1234-1234-123456789012",
"jobIdExt": "TAX-2024-001",
"success": true,
"message": "Tax document data extracted successfully using AI technology"
}
Use Cases
Enterprise Tax Automation
- 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
AI-Powered Document Processing
- Multi-Format Support: Process PDF, PNG, JPG, and JPEG tax document formats
- Multi-Language Processing: Extract data from tax documents in various languages
- Intelligent Field Recognition: Automatically identify and extract relevant tax fields
Business Intelligence and Analytics
- Tax Analytics: Analyze tax data and patterns from extracted tax documents
- Compliance Monitoring: Ensure tax compliance using extracted tax information
- Performance Metrics: Track tax processing accuracy and efficiency