12 - Read PDF Invoices into Excel: Copy-paste

Hover over a grey box and click the copy icon in its top-right corner. Values between percent signs, like %Files%, are Power Automate for desktop variables: paste them exactly as shown.


Flow name (section 12.1)

PA - Invoice log

File filter (section 12.2)

*.pdf

For each, Value to iterate (section 12.4)

%Files%

Extract text from PDF, PDF file (section 12.5)

%CurrentItem%

Parse text (section 12.6)

Text to parse, in all three:

%ExtractedPDFText%

Invoice number pattern, then rename Match to InvoiceNo:

(?<=Invoice No:\s*)\S+
InvoiceNo

Invoice date pattern, then rename Match to InvoiceDate:

(?<=Invoice Date:\s*)\d{2} \w{3} \d{4}
InvoiceDate

Total pattern, then rename Match to InvoiceTotal:

(?<=Total Due:\s*RM\s*)[\d,.]+
InvoiceTotal

Write to Excel worksheet (section 12.8)

Row, in all four:

%FirstFreeRow%

Values to write, for columns 1 to 4:

%CurrentItem.Name%
%InvoiceNo%
%InvoiceDate%
%InvoiceTotal%