AI-Process Receipt using n8n action
PDF4me AI-Process Receipt extracts structured data from receipts using AI-powered machine learning through n8n automation workflows. Process receipt PDFs or images via n8n triggers, binary data, base64 strings, or public URLs to automatically extract merchant information, transaction dates, receipt numbers, line items, financial totals, payment methods, and specialized receipt data from supported receipt types (meal, supplies, hotel, fuel and energy, transportation, communication, subscriptions, entertainment, training, healthcare, generic) with high accuracy and intelligent field recognition. This solution is ideal for receipt processing automation, expense management digitization, automated expense tracking, invoice processing, transaction data extraction, merchant information extraction, expense reporting automation, and receipt management workflows that require AI-powered extraction with structured output and seamless integration.
Setup
Add the PDF4me "AI-Process Receipt" 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 Receipt" action
- Configure input parameters (see below)

Parameters
Complete list of parameters for the AI-Process Receipt action. Configure these parameters to control receipt 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 | Receipt Input Format Selection • Choose the format of your receipt data input • PDF4me supports multiple input types • Options: Binary Data, Base64 String, or URL | Binary Data |
| Input Binary Field*** | Binary | Binary Receipt File Input (Required if Binary Data) • Reference receipt file (.pdf, .png, .jpg, .jpeg) from previous n8n node or file upload • PDF4me processes binary receipt files with automatic format detection and AI-powered data extraction • Required when Input Data Type is "Binary Data" | {{ $binary.data }} |
| Base64 Receipt Content*** | String | Base64 Encoded Receipt Input (Required if Base64 String) • Provide receipt content (.pdf, .png, .jpg, .jpeg) as base64 encoded string for secure transmission • PDF4me automatically decodes and processes the receipt content using AI technology • Required when Input Data Type is "Base64 String" | JVBERi0xLjQKJ... |
| Receipt URL*** | String | Public Receipt URL Input (Required if URL) • Provide a public/open permission URL to the receipt file (.pdf, .png, .jpg, .jpeg) to be processed • PDF4me downloads and processes the receipt file from the provided URL using AI technology • Required when Input Data Type is "URL" | https://abc.com/receipt.pdf |
| Receipt Name*** | String | Receipt Input Filename • Specify the name of the input receipt file with proper extension (.pdf, .png, .jpg, .jpeg) • PDF4me uses this for format detection and AI processing optimization | receipt_2024_03_15.pdf |
| Receipt Type | String | Optional Receipt Type for Improved Parsing Accuracy • Specify receipt type to enhance extraction precision • Supported receipt types: "meal", "supplies", "hotel", "fuel and energy", "transportation", "communication", "subscriptions", "entertainment", "training", "healthcare", "generic" • Helps AI engine optimize field recognition for specific receipt formats | supplies |
| Analyze Items | Boolean | Line Item Analysis Enable • Enable or disable detailed line item analysis and extraction • Yes = enables extraction of individual line items with names, quantities, prices, and descriptions • No = processes receipt without detailed line item extraction | Yes |
| Extract Merchant Info | Boolean | Merchant Information Extraction Enable • Enable or disable merchant information extraction • Yes = enables extraction of merchant name, address, phone, website, store number, and cashier name • No = processes receipt without merchant information extraction | Yes |
| Calculate Totals | Boolean | Financial Totals Calculation Enable • Enable or disable financial totals calculation and extraction • Yes = enables extraction and calculation of subtotal, tax amount, and total amount • No = processes receipt without financial totals calculation | Yes |
| Custom Field Keys | Array | Optional Custom Field Keys List • Optional list of custom field keys to extract from the receipt • Specify additional fields beyond standard receipt data • Supports multiple custom field keys for enhanced data extraction | ["customField1", "customField2"] |
Output
Output Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| receiptType | String | PDF4me extracted receipt type - The type of receipt extracted (e.g., supplies, retail, restaurant, hotel, fuel, healthcare, training) by PDF4me's AI technology | supplies |
| transactionDateStr | String | PDF4me extracted transaction date - The transaction date extracted and formatted in ISO 8601 format (YYYY-MM-DD) | 2024-03-15 |
| transactionTime | String | PDF4me extracted transaction time - The transaction time extracted from the receipt (HH:MM:SS format) | 14:30:00 |
| receiptNumber | String | PDF4me extracted receipt number - The receipt number or transaction identifier extracted from the receipt | REC-12345 |
| analyzeItems | Array | PDF4me extracted line items - Array of receipt item objects with name, quantity, unit price, total price, category, description, item code, brand, size, color, and SKU | [{"name": "Office Supplies", "quantity": 2, "unitPrice": 25.00}] |
| merchantInfoList | Array | PDF4me extracted merchant information - Array of merchant information objects with merchant name, address, phone, website, cashier name, and store number | [{"merchantName": "Office Supply Store", "merchantAddress": "123 Main Street"}] |
| financialInfoList | Array | PDF4me extracted financial information - Array of financial information objects with subtotal, tax amount, total amount, payment method, and card last four digits | [{"subtotal": 65.00, "taxAmount": 5.20, "totalAmount": 70.20}] |
| merchantName | String | PDF4me extracted merchant name - The name of the merchant extracted from the receipt | Office Supply Store |
| merchantAddress | String | PDF4me extracted merchant address - The address of the merchant extracted from the receipt | 123 Main Street, New York, NY 10001 |
| merchantPhone | String | PDF4me extracted merchant phone - The phone number of the merchant extracted from the receipt | +1-555-123-4567 |
| merchantWebsite | String | PDF4me extracted merchant website - The website URL of the merchant extracted from the receipt | www.officesupply.com |
| storeNumber | String | PDF4me extracted store number - The store number or location identifier extracted from the receipt | STORE-001 |
| cashierName | String | PDF4me extracted cashier name - The name of the cashier extracted from the receipt | John Doe |
| subtotal | Number | PDF4me extracted subtotal - The subtotal amount before taxes, with precise decimal handling | 65.00 |
| taxAmount | Number | PDF4me extracted tax amount - The tax amount charged, with precise decimal handling | 5.20 |
| totalAmount | Number | PDF4me extracted total amount - The total amount after taxes, with precise decimal handling | 70.20 |
| paymentMethod | String | PDF4me extracted payment method - The payment method used (e.g., Cash, Credit Card, Debit Card) | Credit Card |
| cardLastFour | String | PDF4me extracted card last four - The last four digits of the payment card, if applicable | 1234 |
| roomNumber | String | PDF4me extracted room number - The room number for hotel receipts | 101 |
| checkInDate | String | PDF4me extracted check-in date - The check-in date for hotel receipts, formatted in ISO 8601 format (YYYY-MM-DD) | 2024-03-15 |
| checkOutDate | String | PDF4me extracted check-out date - The check-out date for hotel receipts, formatted in ISO 8601 format (YYYY-MM-DD) | 2024-03-17 |
| fuelType | String | PDF4me extracted fuel type - The type of fuel for fuel receipts (e.g., Regular, Premium, Diesel) | Regular |
| fuelQuantity | Number | PDF4me extracted fuel quantity - The quantity of fuel purchased, with precise decimal handling | 15.50 |
| fuelUnit | String | PDF4me extracted fuel unit - The unit of fuel measurement (e.g., Gallons, Liters) | Gallons |
| vehicleNumber | String | PDF4me extracted vehicle number - The vehicle number or license plate for fuel receipts | ABC-1234 |
| serviceType | String | PDF4me extracted service type - The type of service for service receipts | Consulting |
| subscriptionPeriod | String | PDF4me extracted subscription period - The subscription period for subscription receipts | Monthly |
| trainingProvider | String | PDF4me extracted training provider - The training provider name for training receipts | Training Academy |
| courseName | String | PDF4me extracted course name - The course name for training receipts | Advanced Training Course |
| healthcareProvider | String | PDF4me extracted healthcare provider - The healthcare provider name for healthcare receipts | Medical Center |
| patientName | String | PDF4me extracted patient name - The patient name for healthcare receipts | John Doe |
| insuranceInfo | String | PDF4me extracted insurance information - The insurance information for healthcare receipts | Insurance Provider ABC |
| additionalInfo | Object | PDF4me extracted additional information - Dictionary containing additional extracted fields beyond standard receipt data | {"customField1": "Value 1"} |
| warnings | Array | PDF4me processing warnings - Array of warning messages indicating potential data quality issues or extraction challenges encountered during processing | [] |
| fallbackUsed | Boolean | PDF4me fallback indicator - Boolean flag indicating whether fallback extraction methods were used during processing | false |
| rawOcrText | String | PDF4me raw OCR text - The raw OCR text extracted from the receipt document | RECEIPT... |
| 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 receipt 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 receipt data extraction process. PDF4me provides clear status messages for successful extractions and detailed error information | Receipt data extracted successfully using AI technology |
N8N Action Response
The PDF4me AI-Process Receipt API returns a JSON response with the following structure:
{
"receiptType": "supplies",
"transactionDateStr": "2024-03-15",
"transactionTime": "14:30:00",
"receiptNumber": "REC-12345",
"analyzeItems": [
{
"name": "Office Supplies",
"quantity": 2,
"unitPrice": 25.00,
"totalPrice": 50.00,
"category": "Office Supplies",
"description": "Notebooks and pens",
"itemCode": "OS-001",
"brand": "BrandName",
"size": "Standard",
"color": "Blue",
"sku": "SKU123456"
}
],
"merchantInfoList": [
{
"merchantName": "Office Supply Store",
"merchantAddress": "123 Main Street, New York, NY 10001",
"merchantPhone": "+1-555-123-4567",
"merchantWebsite": "www.officesupply.com",
"cashierName": "John Doe",
"storeNumber": "STORE-001"
}
],
"financialInfoList": [
{
"subtotal": 65.00,
"taxAmount": 5.20,
"totalAmount": 70.20,
"paymentMethod": "Credit Card",
"cardLastFour": "1234"
}
],
"merchantName": "Office Supply Store",
"merchantAddress": "123 Main Street, New York, NY 10001",
"merchantPhone": "+1-555-123-4567",
"merchantWebsite": "www.officesupply.com",
"storeNumber": "STORE-001",
"cashierName": "John Doe",
"subtotal": 65.00,
"taxAmount": 5.20,
"totalAmount": 70.20,
"paymentMethod": "Credit Card",
"cardLastFour": "1234",
"additionalInfo": {
"customField1": "Value 1",
"customField2": "Value 2"
},
"warnings": [],
"fallbackUsed": false,
"rawOcrText": "RECEIPT...",
"jobId": "12345678-1234-1234-1234-123456789012",
"jobIdExt": "REC-2024-001",
"success": true,
"message": "Receipt data extracted successfully using AI technology"
}
Use Cases
Enterprise Expense Automation
- Expense Processing: Automate expense processing using extracted receipt data
- Expense Tracking: Track expenses using extracted receipt information
- Tax Reporting: Generate tax reports from extracted receipt data
- Financial Reporting: Generate financial reports from extracted receipt information
AI-Powered Document Processing
- Multi-Format Support: Process PDF, PNG, JPG, and JPEG receipt formats
- Multi-Language Processing: Extract data from receipts in various languages
- Intelligent Field Recognition: Automatically identify and extract relevant receipt fields
Business Intelligence and Analytics
- Spend Analysis: Aggregate and analyze vendor spending patterns
- Compliance Monitoring: Ensure receipt data meets regulatory requirements
- Performance Metrics: Track processing accuracy and efficiency