The flow structure looks good. The issue is that filenames like NVP0201_422124009.pdf and BWS1.pdf contain no obvious invoice keywords, so the filename scoring gives 0 points and the files get skipped or classified as non-invoice.
For the scoring engine, shift the weight away from filename and toward the email subject and body since you don't have PDF text extraction:
For the PositiveScore compose, combine checks:
- Email subject contains 'invoice', 'inv', 'tax invoice': +3
- Email body contains 'invoice no', 'amount due', 'total amount': +2
- Sender domain is a known supplier: +1
- Filename starts with known prefixes (NVP, BWS, etc. from your suppliers): +1
For the NegativeScore:
- Subject or body contains 'quotation', 'proforma', 'quote', 'credit note': -3
For the filename specifically, you can build a known prefix list for your suppliers over time. Store them in a SharePoint list and check if the filename starts with any of those prefixes using a Get items call against your prefix list.
The key insight: with these filenames, the email context (subject, sender, body) is more reliable than the filename itself. Your pre-filter condition before the Apply to each loop is actually the most important classification step make sure it's doing the heavy lifting.
Best regards,
Valantis
ā
If this helped solve your issue, please Accept as Solution so others can find it quickly.
ā¤ļø If it didnāt fully solve it but was still useful, please click āYesā on āWas this reply helpful?ā or leave a Like :).
🏷ļø For follow-ups @Valantis.
📝 https://valantisond365.com/