Skip to main content

AI-Invoice Parser using n8n action

PDF4me AI-Invoice Parser extracts structured data from invoices using AI-powered machine learning through n8n automation workflows. Process invoice PDFs or images via n8n triggers, binary data, base64 strings, or public URLs to automatically extract vendor details, invoice numbers, line items, amounts, dates, payment terms, tax information, and other invoice fields with high accuracy and intelligent field recognition. This solution is ideal for accounts payable automation, invoice digitization, financial data extraction, accounting system integration, automated data entry, and invoice processing workflows that require AI-powered extraction with structured output and seamless integration.

Setup

Add the PDF4me "AI-Invoice Parser" 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-Invoice Parser" action
  3. Configure input parameters (see below)
AI-Invoice Parser

Parameters

Complete list of parameters for the AI-Invoice Parser action. Configure these parameters to control invoice parsing.

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

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

Custom Fields

You can extract additional custom fields from invoices beyond the standard invoice data. To add custom fields:

  1. Field Name (Required): Specify the unique identifier for the custom field you want to extract (e.g., "phone", "email", "tax_id", "vendor_code")
  2. Field Description (Optional): Provide a description of what the custom field represents (e.g., "Phone number of the vendor", "Email address for billing inquiries")

Add custom field names to the Custom Field Keys array parameter. The AI will attempt to extract these fields from the invoice document and include them in the response.

Example:

["vendor_phone", "vendor_email", "tax_id", "purchase_order_number"]

Output

Output Parameters

ParameterTypeDescriptionExample
invoiceNumberStringPDF4me extracted invoice number - The unique invoice number or reference identifier extracted from the invoice document by PDF4me's AI technologyINV-2024-001
vendorNameStringPDF4me extracted vendor information - The complete name of the vendor or supplier extracted from the invoice using AI-powered text recognition and analysisAcme Corporation Ltd.
vendorAddressStringPDF4me extracted vendor address - The complete address of the vendor including street, city, state, and postal code extracted by AI technology123 Business St, New York, NY 10001
vendorEmailStringPDF4me extracted vendor contact - The email address of the vendor extracted from the invoice using AI-powered pattern recognition[email protected]
vendorPhoneStringPDF4me extracted vendor phone - The phone number of the vendor extracted from the invoice using AI technology+1-555-123-4567
billToNameStringPDF4me extracted billing name - The name of the entity being billed, extracted from the invoice using AI technologyABC Company Inc.
billToAddressStringPDF4me extracted billing address - The complete billing address including street, city, state, and postal code extracted by AI technology456 Customer Ave, Los Angeles, CA 90210
billToStateStringPDF4me extracted billing state - The state or province of the billing address extracted from the invoice using AI technologyCalifornia
billToPincodeStringPDF4me extracted billing postal code - The postal code or ZIP code of the billing address extracted by AI technology90210
invoiceDateStringPDF4me extracted invoice date - The date when the invoice was issued, extracted and formatted by AI technology in ISO 8601 format2024-01-15
dueDateStringPDF4me extracted payment due date - The payment due date extracted from the invoice using AI-powered date recognition and parsing2024-02-14
subTotalNumberPDF4me extracted subtotal amount - The subtotal amount before taxes and fees, extracted by AI technology with precise decimal handling585
cgstNumberPDF4me extracted CGST amount - The Central Goods and Services Tax amount extracted from the invoice using AI-powered tax calculation recognition0
sgstNumberPDF4me extracted SGST amount - The State Goods and Services Tax amount extracted from the invoice using AI technology0
cgstRateNumberPDF4me extracted CGST rate - The Central GST rate percentage extracted from the invoice using AI-powered tax rate recognition0
sgstRateNumberPDF4me extracted SGST rate - The State GST rate percentage extracted from the invoice using AI technology0
totalNumberPDF4me extracted total amount - The final total amount including all taxes and fees, extracted by AI technology with high accuracy585
currencyStringPDF4me extracted currency code - The currency code (ISO 4217) of the invoice amounts extracted by AI technologyUSD
paymentTermsStringPDF4me extracted payment terms - The payment terms and conditions extracted from the invoice using AI-powered text analysisNet 30
lineItemsArrayPDF4me extracted line items - Array of individual line items with descriptions, quantities, unit prices, HSN codes, and tax details extracted by AI technology[{"hsnCode": "", "description": "PDF4me 25k calls", "unitPrice": 585, "quantity": 1, "total": 585}]
confidenceObjectPDF4me AI confidence scores - Object containing confidence scores for specific extracted fields, provided by PDF4me's AI technology for quality assessment{"invoiceNumber": 1, "vendorName": 1}
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 invoice 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 invoice data extraction process. PDF4me provides clear status messages for successful extractions and detailed error informationInvoice data extracted successfully using AI technology

N8N Action Response

The PDF4me AI-Invoice Parser API returns a JSON response with the following structure:

{
"invoiceNumber": "INV-2024-001",
"vendorName": "Sample Corporation Ltd.",
"vendorAddress": "123 Business Street, New York, NY 10001",
"vendorEmail": "[email protected]",
"vendorPhone": "+1-555-123-4567",
"billToName": "Customer Company Inc.",
"billToAddress": "456 Customer Avenue, Los Angeles, CA 90210",
"billToState": "California",
"billToPincode": "90210",
"invoiceDate": "2024-01-15",
"dueDate": "2024-02-14",
"subTotal": 1250.00,
"cgst": 125.00,
"sgst": 125.00,
"cgstRate": 10,
"sgstRate": 10,
"total": 1500.00,
"currency": "USD",
"paymentTerms": "Net 30",
"lineItems": [
{
"hsnCode": "12345678",
"description": "Software License - Premium Package",
"unitPrice": 1000.00,
"discount": 50.00,
"quantity": 1,
"taxableValue": 950.00,
"cgstAmount": 95.00,
"sgstAmount": 95.00,
"total": 1140.00
},
{
"hsnCode": "87654321",
"description": "Support Services - Annual",
"unitPrice": 300.00,
"discount": 0.00,
"quantity": 1,
"taxableValue": 300.00,
"cgstAmount": 30.00,
"sgstAmount": 30.00,
"total": 360.00
}
],
"confidence": {
"invoiceNumber": 0.95,
"vendorName": 0.98,
"total": 0.92
},
"jobId": "12345678-1234-1234-1234-123456789012",
"jobIdExt": "EXT-2024-001",
"success": true,
"message": "Invoice data extracted successfully using AI technology"
}

Use Cases

Enterprise Financial Automation

  • Accounts Payable Processing: Automate invoice data entry and validation
  • Financial Data Integration: Seamlessly integrate with ERP and accounting systems
  • Invoice Approval Workflows: Streamline approval processes with extracted data

AI-Powered Document Processing

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

Business Intelligence and Analytics

  • Spend Analysis: Aggregate and analyze vendor spending patterns
  • Compliance Monitoring: Ensure invoice data meets regulatory requirements
  • Performance Metrics: Track processing accuracy and efficiency

Get Help