AI-Process Receipt in n8n
AI-Process Receipt is an n8n node by PDF4me that extracts merchant details, transaction data, line items, and totals from receipt PDFs and images using AI. Use it to automate expense capture, receipt digitization, or expense-report data entry without manual keying, across 11 specialized receipt categories.
What this node does
PDF4me: AI-Process Receipt parses a receipt PDF or image and returns structured merchant information, transaction date/time, line items, and financial totals, plus category-specific fields for hotel, fuel and energy, training, and healthcare receipts. Accepts input via Binary Data, Base64 String, or URL. Ideal for expense automation, spend analysis, and receipt digitization workflows.
Authenticating Your API Request
Every PDF4me node in n8n requires a valid Credential to connect with. Create or select one that holds your PDF4me API key so the workflow can authenticate AI extraction requests securely.
Important Facts You Should Not Miss
What Parameters Does AI-Process Receipt Need?
Required: Input Data Type and Receipt Name, plus the field matching your chosen input type (Input Binary Field, Base64 Receipt Content, or Receipt URL). Receipt Type, Analyze Items, Extract Merchant Info, Calculate Totals, and Custom Field Keys are all optional, enable only what your workflow needs.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| Input Data Type | Required | Format of the receipt input. Choose Binary Data (from a previous node), Base64 String, or URL. | Binary Data |
| Input Binary Field | Conditional | Name of the binary property on the incoming n8n item that holds the receipt. Required when Input Data Type is Binary Data. | data |
| Base64 Receipt Content | Conditional | Base64-encoded receipt content. Required when Input Data Type is Base64 String. | JVBERi0xLjQK... |
| Receipt URL | Conditional | Publicly reachable HTTPS URL to the receipt file. Required when Input Data Type is URL. | https://example.com/receipt.pdf |
| Receipt Name | Required | Filename of the input receipt with the correct extension (.pdf, .png, .jpg, .jpeg), used for format detection and processing accuracy. | receipt_2026_03_15.pdf |
| Receipt Type | Optional | Category hint for the AI: meal, supplies, hotel, fuel and energy, transportation, communication, subscriptions, entertainment, training, healthcare, or generic. | supplies |
| Analyze Items | Optional | Set to true to extract individual line items with name, quantity, unit price, and category. Default false. | true |
| Extract Merchant Info | Optional | Set to true to extract merchant name, address, phone, website, and store number. Default false. | true |
| Calculate Totals | Optional | Set to true to extract subtotal, tax amount, and total amount. Default false. | true |
| Custom Field Keys | Optional | Array of extra field names to extract beyond standard receipt data, returned in additionalInfo. | ["loyaltyPoints"] |
Output Fields
| Field | Type | What it contains |
|---|---|---|
success | Boolean | True when extraction succeeded. Use to route error-handling branches. |
receiptType | String | The receipt type extracted or supplied, e.g. supplies, hotel, fuel and energy. |
transactionDateStr | String | Transaction date in ISO 8601 format (YYYY-MM-DD). |
transactionTime | String | Transaction time (HH:MM:SS format), when present on the receipt. |
receiptNumber | String | Receipt or transaction identifier printed on the receipt. |
analyzeItems | Array | Line item objects with name, quantity, unit price, total price, and category, present when Analyze Items is enabled. |
merchantInfoList | Array | Merchant name, address, phone, website, cashier name, and store number, present when Extract Merchant Info is enabled. |
financialInfoList | Array | Subtotal, tax amount, total amount, payment method, and card last four digits, present when Calculate Totals is enabled. |
roomNumber, checkInDate, checkOutDate | String | Hotel-specific fields, populated when Receipt Type is hotel. |
fuelType, fuelQuantity, fuelUnit, vehicleNumber | Mixed | Fuel and energy-specific fields, populated when Receipt Type is fuel and energy. |
trainingProvider, courseName | String | Training-specific fields, populated when Receipt Type is training. |
healthcareProvider, patientName, insuranceInfo | String | Healthcare-specific fields, populated when Receipt Type is healthcare. |
additionalInfo | Object | Values for any Custom Field Keys requested beyond standard receipt data. |
warnings | Array | Data-quality warnings encountered during extraction, empty array when none. |
fallbackUsed | Boolean | True when a fallback extraction method was needed, useful for flagging low-confidence results. |
jobId | String | Unique identifier for the AI processing job, used for tracking and debugging. |
How Do I Set Up AI-Process Receipt in n8n?
- Add PDF4me to your n8n workflow and choose the AI-Process Receipt action.
- In Credential to connect with, select your PDF4me credential or click Create New Credential and paste your API key.
- Set Input Data Type to Binary Data (default), Base64 String, or URL and supply the matching source field.
- Set Receipt Name with the correct extension (
.pdf,.png,.jpg,.jpeg). - Optionally set Receipt Type to a specific category for better accuracy on hotel, fuel and energy, training, or healthcare receipts.
- Enable Analyze Items, Extract Merchant Info, and Calculate Totals as needed, and add Custom Field Keys for anything beyond standard fields.
- Execute the node and map the extracted fields into your expense tool, spreadsheet, or accounting system.
Typical Setups
Workflow ExamplesCommon n8n workflow patterns using AI-Process Receipt.
- A Gmail trigger fires on emails with a receipt attachment.
- PDF4me AI-Process Receipt runs with Extract Merchant Info and Calculate Totals enabled.
- merchantName, totalAmount, and transactionDateStr are appended to a Google Sheets expense log.
- A mobile-upload webhook receives a photographed fuel receipt from a driver.
- PDF4me AI-Process Receipt runs with Receipt Type fuel and energy, extracting fuelQuantity, fuelUnit, and vehicleNumber.
- The record is written to a fleet-management database keyed by vehicleNumber.
- A traveler uploads a hotel folio PDF through a form.
- PDF4me AI-Process Receipt runs with Receipt Type hotel, extracting roomNumber, checkInDate, and checkOutDate alongside the standard totals.
- The parsed data flows into the company's travel expense-report workflow.
- A Loop Over Items node iterates a batch of receipt files from a shared Drive folder.
- PDF4me AI-Process Receipt runs with Analyze Items enabled to break out individual line items.
- analyzeItems is flattened and appended to a BigQuery table for category-level spend analysis.
Practical Tips
Cheat Sheet
| Field | Value |
|---|---|
| Action | AI-Process Receipt |
| Input Data Type | Binary Data |
| Input Binary Field | data |
| Receipt Name | receipt.pdf |
| Receipt Type | generic (or a specific category) |
| Analyze Items | true |
| Extract Merchant Info | true |
| Calculate Totals | true |
| Custom Field Keys | [] (optional) |
| Credentials | PDF4me API credential |