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:
- Add PDF4me node to workflow
- Select "AI-Process Pay Stub Payslip" action
- Configure input parameters (see below)

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.
| Parameter | Type | Description | Example |
|---|---|---|---|
| Input Data Type*** | String | Pay 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*** | Binary | Binary 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*** | String | Base64 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*** | String | Public 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*** | String | Pay 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 Keys | Array | Optional 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
| Parameter | Type | Description | Example |
|---|---|---|---|
| payStubData | Object | PDF4me 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, ...} |
| jobId | String | PDF4me processing job identifier - Unique identifier for the AI processing job, used for tracking and debugging purposes | 00000000-0000-0000-0000-000000000000 |
| jobIdExt | String | PDF4me external job identifier - External job identifier for integration with third-party systems, if applicable | null |
| success | Boolean | PDF4me 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 errors | true |
| message | String | PDF4me 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 information | Pay stub data extracted successfully using AI technology |
Pay Stub Data Fields:
The payStubData object contains the following pay stub related fields:
| Field Name | Type | Description | Example |
|---|---|---|---|
| warnings | Array | Array of warning messages indicating potential data quality issues or extraction challenges | ["Vision AI processing completed successfully"] |
| fallbackUsed | Boolean | Boolean flag indicating whether fallback extraction methods were used | false |
| rawOcrText | String | The raw OCR text extracted from the pay stub document | "" (empty if not available) |
| grossPay | Number | The gross pay amount before deductions | 1627.74 |
| netPay | Number | The net pay amount after all deductions | 1040.23 |
| payPeriod | String | The pay period for the pay stub (e.g., date range) | "07/10/2017 - 07/23/2017" |
| payDateStr | String | The pay date as a string | "08/04/2017" |
| PayDate | String | The pay date | "08/04/2017" |
| federalIncomeTax | Number | The federal income tax amount deducted | 182.98 |
| stateIncomeTax | Number | The state income tax amount deducted | 61 |
| socialSecurityTax | Number | The Social Security tax amount deducted | 0 |
| medicareTax | Number | The Medicare tax amount deducted | 22.12 |
| localCityTax | Number | The local or city tax amount deducted | 0 |
| employeeName | String | The name of the employee | "Franklin St" |
| employeeIdSsn | String | The employee ID or Social Security Number | "000000000" |
| employeeAddress | String | The address of the employee | "123 Franklin St, CHAPEL HILL, NC 27517" |
| jobTitle | String | The job title or position of the employee | "Admin Support Specialist" |
| companyName | String | The name of the company or employer | "The University of North Carolina at Chapel Hill" |
| employerAddress | String | The address of the employer | "103 South Building, Campus Box 9100, Chapel Hill, NC 27599-9100" |
| employerEin | String | The Employer Identification Number (EIN) | "" (empty if not available) |
| regularHours | Number | The number of regular hours worked during the pay period | 74.5 |
| overtimeHours | Number | The number of overtime hours worked during the pay period | 0 |
| regularRate | Number | The regular hourly rate of pay | 20.346846 |
| overtimeRate | Number | The overtime hourly rate of pay | 0 |
| totalHours | Number | The total hours worked during the pay period | 80 |
| healthInsurance | Number | The health insurance deduction amount | 0 |
| retirement401k | Number | The retirement 401k deduction amount | 97.66 |
| otherBenefits | Number | The amount deducted for other benefits | 0 |
| garnishments | Number | The amount deducted for garnishments | 0 |
| ytdGrossPay | Number | The year-to-date gross pay total | 28707.21 |
| ytdNetPay | Number | The year-to-date net pay total | 18396.25 |
| ytdFederalTax | Number | The year-to-date federal tax total | 3319.78 |
| ytdStateTax | Number | The year-to-date state tax total | 1126 |
| checkNumber | String | The check number or payment reference number | "Advice #0000000002214873" |
| directDepositInfo | String | The direct deposit information including account details | "Checking XXXXXXX0000 Deposit Amount 1,040.23" |
| vacationSickTime | String | The vacation and sick time balance information | "Vacation End Balance: 213.66, Sick End Balance: 272.50" |
| commissionBonus | Number | The commission or bonus amount | 0 |
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