Skip to main content

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:

  1. Add PDF4me node to workflow
  2. Select "AI-Process Tax Document" action
  3. Configure input parameters (see below)
AI-Process Tax Document

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.

ParameterTypeDescriptionExample
Input Data Type***StringTax Document Input Format Selection
• Choose the format of your tax document data input
• PDF4me supports multiple input types
• Options: Binary Data, Base64 String, or URL
Binary Data
Input Binary Field***BinaryBinary Tax Document File Input (Required if Binary Data)
• Reference tax document file (.pdf, .png, .jpg, .jpeg) from previous n8n node or file upload
• PDF4me processes binary tax document files with automatic format detection and AI-powered data extraction
• Required when Input Data Type is "Binary Data"
{{ $binary.data }}
Base64 Tax Document Content***StringBase64 Encoded Tax Document Input (Required if Base64 String)
• Provide tax document content (.pdf, .png, .jpg, .jpeg) as base64 encoded string for secure transmission
• PDF4me automatically decodes and processes the tax document content using AI technology
• Required when Input Data Type is "Base64 String"
JVBERi0xLjQKJ...
Tax Document URL***StringPublic Tax Document URL Input (Required if URL)
• Provide a public/open permission URL to the tax document file (.pdf, .png, .jpg, .jpeg) to be processed
• PDF4me downloads and processes the tax document file from the provided URL using AI technology
• Required when Input Data Type is "URL"
https://abc.com/tax_document.pdf
Tax Document Name***StringTax Document Input Filename
• Specify the name of the input tax document file with proper extension (.pdf, .png, .jpg, .jpeg)
• PDF4me uses this for format detection and AI processing optimization
tax_document_2024.pdf
Tax ModelStringOptional Tax Model for Improved Parsing Accuracy
• Specify tax form type to enhance extraction precision
• Examples: "W2", "1099", "1099-SSA", "1040", "1040-SR", "1040-NR", "1098", "1098-E", "1098-T", "1095A", "1095C", "W-4", "UnifiedTaxUS"
• Helps AI engine optimize field recognition for specific tax form formats
W2
Custom Field KeysArrayOptional Custom Field Keys List
• Optional list of custom field keys to extract from the tax document
• Specify additional fields beyond standard tax document data
• Supports multiple custom field keys for enhanced data extraction
["customField1", "customField2"]

Output

Output Parameters

ParameterTypeDescriptionExample
taxDocumentDataObjectPDF4me extracted tax document data - Object containing all extracted tax document fields including form type, tax year, warnings, fallback indicator, raw OCR text, and all tax form-specific fields (W2, 1099, 1040, 1098, 1095, W-4 fields){"formType": "", "taxYear": "", "warnings": [...], "fallbackUsed": false, ...}
jobIdStringPDF4me processing job identifier - Unique identifier for the AI processing job, used for tracking and debugging purposes00000000-0000-0000-0000-000000000000
jobIdExtStringPDF4me external job identifier - External job identifier for integration with third-party systems, if applicablenull
successBooleanPDF4me AI extraction status indicator - Boolean flag indicating the success or failure of the AI-powered tax document data extraction process. PDF4me returns true for successful extractions and false for any errorstrue
messageStringPDF4me AI extraction status message - Descriptive message indicating the result of the AI-powered tax document data extraction process. PDF4me provides clear status messages for successful extractions and detailed error informationTax document data extracted successfully using AI technology

Tax Document Data Fields:

The taxDocumentData object contains the following fields:

Field NameTypeDescriptionExample
formTypeStringThe type of tax form extracted (e.g., W2, 1099, 1040, 1098, 1095A, W-4)"" (empty if not detected)
taxYearStringThe tax year for which the document applies (e.g., "2024", "2023")"" (empty if not detected)
warningsArrayArray of warning messages indicating potential data quality issues or extraction challenges["Some fields such as filing status, SSNs, address, wages..."]
fallbackUsedBooleanBoolean flag indicating whether fallback extraction methods were usedfalse
rawOcrTextStringThe raw OCR text extracted from the tax document"" (empty if not available)
W2 FieldsStringEmployee/employer information, wages, tax withheld, Social Security, Medicare fields (e.g., employerName, employerEin, employerAddress, employeeName, employeeSsn, employeeAddress, wagesTips, socialSecurityWages, socialSecurityTaxWithheld, medicareWages, medicareTaxWithheld, state, stateWages, stateIncomeTax, localIncomeTax, box12Codes)W2 forms
1099 FieldsStringPayer/recipient information, income amounts, tax withheld (e.g., payerName, payerTin, payerAddress, recipientName, recipientTin, recipientAddress, recipientSsn, nonemployeeCompensation, otherIncome, accountNumber, stateTaxWithheld, benefitsPaid, taxWithheld, box7VoluntaryFederalIncomeTaxWithheld, box8StateTaxWithheld)1099, 1099-SSA forms
1040 FieldsStringTaxpayer information, income, deductions, tax calculations (e.g., filingStatus, taxpayerName, taxpayerSsn, spouseName, spouseSsn, address, wages, taxableInterest, taxExemptInterest, dividends, iraDistributions, socialSecurityBenefits, totalIncome, adjustedGrossIncome, standardDeduction, taxableIncome, totalTax, federalIncomeTaxWithheld, refundAmount, amountOwed, dependents, virtualCurrency, additionalIncome, adjustmentsToIncome)1040, 1040-SR, 1040-NR forms
1098 FieldsStringMortgage interest, student loan interest, tuition payments (e.g., lenderName, lenderTin, mortgageInterest, pointsPaid, refundOverpaidInterest, mortgageInsurancePremiums, propertyAddress, mortgageAcquisitionDate, outstandingMortgagePrincipal, borrowerName, borrowerTin, studentLoanInterestReceived, studentName, studentTin, schoolName, schoolTin, qualifiedTuitionAndRelatedExpenses, scholarshipsOrGrants, serviceProviderTin, refunds)1098, 1098-E, 1098-T forms
1095 FieldsStringHealth insurance coverage information (e.g., policyNumber, startDate, endDate, monthlyPremium, advancePayment, issuerName, coverageMonths, offerOfCoverage, safeHarbor, offerOfCoverageCode, employeeShareOfLowestCostMonthlyPremium)1095A, 1095C forms
W-4 FieldsStringWithholding information (e.g., multipleJobsOrSpouseWorks, claimDependents, deductions, extraWithholding, step3DependentsTotal, step4aOtherIncome, step4bDeductions, income, credits, totalAssets, liabilities, investments)W-4 forms

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

Get Help