Skip to main content

AI-Process Pay Stub Payslip using n8n action

PDF4me AI-Process Pay Stub Payslip extracts structured data from pay stubs and payslips using AI-powered machine learning through n8n automation workflows. Process pay stub PDFs or images via n8n triggers, binary data, base64 strings, or public URLs to automatically extract gross pay, net pay, tax information, employee details, employer information, earnings breakdown, deductions, benefits, year-to-date totals, and other pay stub fields with high accuracy and intelligent field recognition. This solution is ideal for pay stub processing automation, payroll digitization, employee verification, income verification, tax document processing, automated payroll data extraction, wage statement processing, and pay stub management workflows that require AI-powered extraction with structured output and seamless integration.

Setup

Add the PDF4me "AI-Process Pay Stub Payslip" 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 Pay Stub Payslip" action
  3. Configure input parameters (see below)
AI-Process Pay Stub Payslip

Parameters

Complete list of parameters for the AI-Process Pay Stub Payslip action. Configure these parameters to control pay stub processing.

Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.

ParameterTypeDescriptionExample
Input Data Type***StringPay Stub Input Format Selection
• Choose the format of your pay stub data input
• PDF4me supports multiple input types
• Options: Binary Data, Base64 String, or URL
Binary Data
Input Binary Field***BinaryBinary Pay Stub File Input (Required if Binary Data)
• Reference pay stub or payslip file (.pdf, .png, .jpg, .jpeg) from previous n8n node or file upload
• PDF4me processes binary pay stub files with automatic format detection and AI-powered data extraction
• Required when Input Data Type is "Binary Data"
{{ $binary.data }}
Base64 Pay Stub Content***StringBase64 Encoded Pay Stub Input (Required if Base64 String)
• Provide pay stub or payslip content (.pdf, .png, .jpg, .jpeg) as base64 encoded string for secure transmission
• PDF4me automatically decodes and processes the pay stub content using AI technology
• Required when Input Data Type is "Base64 String"
JVBERi0xLjQKJ...
Pay Stub URL***StringPublic Pay Stub URL Input (Required if URL)
• Provide a public/open permission URL to the pay stub or payslip file (.pdf, .png, .jpg, .jpeg) to be processed
• PDF4me downloads and processes the pay stub file from the provided URL using AI technology
• Required when Input Data Type is "URL"
https://abc.com/paystub.pdf
Pay Stub Name***StringPay Stub Input Filename
• Specify the name of the input pay stub or payslip file with proper extension (.pdf, .png, .jpg, .jpeg)
• PDF4me uses this for format detection and AI processing optimization
paystub_2024_03.pdf
Custom Field KeysArrayOptional Custom Field Keys List
• Optional list of custom field keys to extract from the pay stub or payslip
• Specify additional fields beyond standard pay stub data
• Supports multiple custom field keys for enhanced data extraction
["customField1", "customField2"]

Output

Output Parameters

ParameterTypeDescriptionExample
payStubDataObjectPDF4me extracted pay stub data - Object containing all extracted pay stub fields including earnings, taxes, deductions, employee details, employer information, year-to-date totals, benefits, warnings, fallback indicator, and raw OCR text{"grossPay": 1627.74, "netPay": 1040.23, "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 pay stub 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 pay stub data extraction process. PDF4me provides clear status messages for successful extractions and detailed error informationPay stub data extracted successfully using AI technology

Pay Stub Data Fields:

The payStubData object contains the following pay stub related fields:

Field NameTypeDescriptionExample
warningsArrayArray of warning messages indicating potential data quality issues or extraction challenges["Vision AI processing completed successfully"]
fallbackUsedBooleanBoolean flag indicating whether fallback extraction methods were usedfalse
rawOcrTextStringThe raw OCR text extracted from the pay stub document"" (empty if not available)
grossPayNumberThe gross pay amount before deductions1627.74
netPayNumberThe net pay amount after all deductions1040.23
payPeriodStringThe pay period for the pay stub (e.g., date range)"07/10/2017 - 07/23/2017"
payDateStrStringThe pay date as a string"08/04/2017"
PayDateStringThe pay date"08/04/2017"
federalIncomeTaxNumberThe federal income tax amount deducted182.98
stateIncomeTaxNumberThe state income tax amount deducted61
socialSecurityTaxNumberThe Social Security tax amount deducted0
medicareTaxNumberThe Medicare tax amount deducted22.12
localCityTaxNumberThe local or city tax amount deducted0
employeeNameStringThe name of the employee"Franklin St"
employeeIdSsnStringThe employee ID or Social Security Number"000000000"
employeeAddressStringThe address of the employee"123 Franklin St, CHAPEL HILL, NC 27517"
jobTitleStringThe job title or position of the employee"Admin Support Specialist"
companyNameStringThe name of the company or employer"The University of North Carolina at Chapel Hill"
employerAddressStringThe address of the employer"103 South Building, Campus Box 9100, Chapel Hill, NC 27599-9100"
employerEinStringThe Employer Identification Number (EIN)"" (empty if not available)
regularHoursNumberThe number of regular hours worked during the pay period74.5
overtimeHoursNumberThe number of overtime hours worked during the pay period0
regularRateNumberThe regular hourly rate of pay20.346846
overtimeRateNumberThe overtime hourly rate of pay0
totalHoursNumberThe total hours worked during the pay period80
healthInsuranceNumberThe health insurance deduction amount0
retirement401kNumberThe retirement 401k deduction amount97.66
otherBenefitsNumberThe amount deducted for other benefits0
garnishmentsNumberThe amount deducted for garnishments0
ytdGrossPayNumberThe year-to-date gross pay total28707.21
ytdNetPayNumberThe year-to-date net pay total18396.25
ytdFederalTaxNumberThe year-to-date federal tax total3319.78
ytdStateTaxNumberThe year-to-date state tax total1126
checkNumberStringThe check number or payment reference number"Advice #0000000002214873"
directDepositInfoStringThe direct deposit information including account details"Checking XXXXXXX0000 Deposit Amount 1,040.23"
vacationSickTimeStringThe vacation and sick time balance information"Vacation End Balance: 213.66, Sick End Balance: 272.50"
commissionBonusNumberThe commission or bonus amount0

N8N Action Response

The PDF4me AI-Process Pay Stub Payslip API returns a JSON response with the following structure:

{
"payStubData": {
"warnings": [
"Vision AI processing completed successfully"
],
"fallbackUsed": false,
"rawOcrText": "",
"grossPay": 1627.74,
"netPay": 1040.23,
"payPeriod": "07/10/2017 - 07/23/2017",
"payDateStr": "08/04/2017",
"federalIncomeTax": 182.98,
"stateIncomeTax": 61,
"socialSecurityTax": 0,
"medicareTax": 22.12,
"localCityTax": 0,
"employeeName": "Franklin St",
"employeeIdSsn": "000000000",
"employeeAddress": "123 Franklin St, CHAPEL HILL, NC 27517",
"jobTitle": "Admin Support Specialist",
"companyName": "The University of North Carolina at Chapel Hill",
"employerAddress": "103 South Building, Campus Box 9100, Chapel Hill, NC 27599-9100",
"employerEin": "",
"regularHours": 74.5,
"overtimeHours": 0,
"regularRate": 20.346846,
"overtimeRate": 0,
"totalHours": 80,
"healthInsurance": 0,
"retirement401k": 97.66,
"otherBenefits": 0,
"garnishments": 0,
"ytdGrossPay": 28707.21,
"ytdNetPay": 18396.25,
"ytdFederalTax": 3319.78,
"ytdStateTax": 1126,
"checkNumber": "Advice #0000000002214873",
"directDepositInfo": "Checking XXXXXXX0000 Deposit Amount 1,040.23",
"vacationSickTime": "Vacation End Balance: 213.66, Sick End Balance: 272.50",
"commissionBonus": 0,
"PayDate": "08/04/2017"
},
"jobId": "12345678-1234-1234-1234-123456789012",
"jobIdExt": "PAY-2024-001",
"success": true,
"message": "Pay stub data extracted successfully using AI technology"
}

Use Cases

Enterprise Payroll Automation

  • Payroll Processing: Automate payroll processing using extracted pay stub data
  • Employee Verification: Verify employee information using extracted pay stub details
  • Income Verification: Verify income for loan applications and financial services
  • Tax Reporting: Generate tax reports from extracted pay stub data

AI-Powered Document Processing

  • Multi-Format Support: Process PDF, PNG, JPG, and JPEG pay stub formats
  • Multi-Language Processing: Extract data from pay stubs in various languages
  • Intelligent Field Recognition: Automatically identify and extract relevant payroll fields

Business Intelligence and Analytics

  • Payroll Analytics: Analyze payroll costs using extracted pay stub information
  • Compliance Monitoring: Ensure payroll compliance using extracted tax information
  • Performance Metrics: Track processing accuracy and efficiency

Get Help